Since build of August 2012, ArchLinux has removed the setup menu. Now when launching an iso image for a new installation, it is necessary to set up all the disk partitions from scratch, then create a file system on them, and finally install the system by yourself. This is already nicely defined in [ArchLinux Wiki] (https://wiki.archlinux.org/index.php/Beginners%27_Guide), but this beginner’s guide is far too long and does not focus on the main points of the installation. So here is in successive steps how to install ArchLinux on a system easily, until the point where you are able to boot your system. More detailed settings can come later.
You can change the layer of your keyboard with this command.
loadkeys layout
Or set up the locale like this with localectl (more useful when using for example xorg coupled with awesome).
localectl set-x11-keymap jp jp106
Then check its status.
localectl status
All the available layers are located in /usr/share/kbd/keymaps/. For example in my case, the Japanese keyboard is jp106.
Use this command or similar.
ping -c 3 www.google.com
If you are unable to reach the network, you might need to setup your network properly. You can refer to the [ArchLinux Wiki] (https://wiki.archlinux.org/index.php/Beginners%27_Guide#Setup_network_in_the_live_installation_environment) to perform that.
You need to create all your partitions from scratch. This can be done natively with fdisk. The following architecture is recommended.
When using fdisk for the setup, you will need to use the following commands.
When using ‘t’, you will need to use the partition number. To define a swap, you need to use 82 as type. For a Windows NTFS, use 7. You can see the list of available types with ‘L’. Create all the partitions successively, in the order written above. You will need to precise the size of each partition, you should use the default for start point and then a grammar like ‘+100M’ or ‘+15GB’ to add a given size. The last partition sda4 cannot be set as Extended or it will not be able to use a system file. Be sure to set it as Linux (type 83). Do not forget to check the partition table with ‘p’! Then exit with ‘w’.
So for the partitions root, boot and home.
mkfs.ext4 /dev/sda1 #root
mkfs.ext4 /dev/sda3 #home
Then for the swap partition.
mkswap /dev/sda2 && swapon /dev/sda2
You need to mount the partitions to allow installation of the packages on disk.
mount /dev/sda1 /mnt
mkdir /mnt/home && mount /dev/sda3 /mnt/home
Package installation can be done with this command once partitions are mounted.
pacstrap /mnt base base-devel
If you need to go through a proxy, you need special settings for pacman here.
This allows to mount automatically all the partitions defined.
genfstab -p /mnt >> /mnt/etc/fstab
Then say that the newly-installed system is.
arch-chroot /mnt
This is used to allow loading kernel modules.
mkinitcpio -p linux
The bootloader that is going to be used is syslinux. grub2 has too many configuration files and your host prefers simplicity.
pacman -S syslinux
Then you need to edit the file /boot/syslinux/syslinux.cfg.
...
LABEL arch
...
APPEND root=/dev/sda3 ro
...
Change /dev/sda3 to indicate your root partition, here /dev/sda1. If you do not do that correctly, ArchLinux will not boot. Then, do the same for the section LABEL archfallback.
Finally you just need to install files (-i), to set up the boot flag (-a) and to install MBR boot code (-m).
syslinux-install_update -iam
It may be worth checking if the boot flag is already set for the partition holding /boot/. If it is already set, the -a switch would just cause the previous command to fail without doing the important -m phase to install the MBR. In this case, just using -i and -m, without -a is fine.
Note that in the case of a proxy environment, wget might be necessary to fetch the packages you need. You need to launch that before entering in arch-chroot mode.
pacstrap /mnt wget
Setup a root password with:
passwd
Leave chroot environment.
exit
Unmount all the partitions.
umount /mnt/home
umount /mnt
And reboot. Remove the disk media. And then you should be able to run ArchLinux.
reboot
Unless otherwise specified, the contents of this website are (C)Copyright Michael Paquier 2010-2024 and are licensed for use under CC BY-SA 3.0.