Arch is a lightweight Linux operating system, and the installation is basically done through console commands. Here's the log:
You can download the system from this page. After getting the ISO, dd it to a USB drive or optical disc — either works.
Then, whether you use a USB drive or optical disc, boot into the Arch startup interface and the installation begins.
First, partition the hard drive. You can refer to this page for partitioning; I personally used fdisk.
Check /dev/sdx, where x is usually a, b, c, ... — one file per hard drive.
fdisk /dev/sdaTypically, give boot 500 MB, allocate a swap space the same size as your RAM, and assign the rest as you see fit. After saving, you'll see additional entries like sda1, sda2, sda3 under /dev...
Assume sda1 is boot, sda2 is the root directory, and sda3 is swap.
Then initialize the file system
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda2
mkswap /dev/sda3Mount the file system under /mnt
mkdir /mnt
mount -t ext4 /dev/sda2 /mnt
mkdir -p /mnt/boot
mount -t ext4 /dev/sda1 /mnt/boot
swapon /dev/sda3Pay attention to the order: mount /mnt first, then /mnt/boot.
Then begin the actual installation.
There are two installation methods: automatic and manual.
The automatic command is as follows:
pacstrap /mnt base base-develThen just wait.
Manual mode means selecting system packages yourself and installing them one by one
pacstrap /mnt linux sysvinit initscripts \
procps pacman sed less tar man net-tools \
libpcap geany wget
pacstrap /mnt xterm emacs jwm axel xorg-xinit firefox \
fcitx-gtk2 iso-codes feh scrot \
alsa-utils iputils xorg-server xf86-video-xxx \
xf86-input-evdevIn the commands above, the first part is mandatory — don't skip those in a normal system. The second part is optional; decide for yourself whether to install them. net-tools is the package for commands like ifconfig, route, and netstat; libpcap is needed for mentohust; and without wget you might find yourself in an awkward situation later. If this is a server, firefox, xorg-xinit, etc. are completely unnecessary. axel can be considered an enhanced version of wget, so you might install it later.
In most cases, there's no need to fuss over that tiny bit of disk space, so I recommend just going with the automatic method.
Then install the bootloaders grub-bios and syslinux
pacstrap /mnt grub-bios
pacstrap /mnt syslinuxSave fstab
genfstab -p /mnt >> /mnt/etc/fstabIt will automatically generate the current mount state and write it to fstab, so next time it boots it will mount according to the current settings (of course, everything is currently mounted under /mnt; next time it will be under /).
Enter Arch to make adjustments
arch-chroot /mntThen we enter the new Arch system to operate.
First, initialize the password
passwdThen enter the desired root password.
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtimeSymlink the timezone. Of course, you can also link whichever timezone you prefer.
Edit /etc/locale.gen as follows:
echo "LANG=\"en_US.UTF-8\"" >> locale.conf
echo "LC_COLLATE=\"C\"" >> locale.conf
echo "LC_TIME=\"en_US.UTF-8\"" >> locale.confGenerate the locale and related configuration:
locale-genInitialize the hostname:
echo argcv > /etc/hostnameInitialize GRUB:
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfgIf grub-install and similar tools report that they are not installed, you probably skipped installing them earlier; you can still fix that now:
pacman -S grub-biosIf pacman is not installed... then first exit, and go back to the previous pacstrap step to redo it.
Once everything is ready, reboot and boot from the hard drive; it should work normally.
P.S.: For networking, there are two configuration options. One is a static IP setup; you can refer to here. Alternatively, you can use a dynamic IP with a single command:
dhcpcdFor details on dhcpcd, see here.
The general flow is as described above. Most importantly, the official documentation is quite reliable. Visit this page and follow the information there; you should be able to figure out a viable installation path.
Comments · 10