Let’s create a single root partition:
> fdisk /dev/sda ...
and put an ext4 filesystem on it:
> mkfs.ext4 /dev/sda1
Oops, what is this: an error message says “/dev/sda1 is apparently in use by the system” and mkfs is refusing to create a file system here. After some Googling, it turns out that the OS thinks the drive is part of a RAID array (it used to be in a former life). To stop it thinking that:
> cat /proc/mdstat md127 # yeah, right > mdadm --stop /dev/md127 > mkfs.ext4 /dev/sda1
Now it works.
Next: put a system on. Arch Linux is “a bit” manual compared to other Linux distro’s, but never mind. Mount the new root drive at /mnt, so we can put stuff on it:
mount /dev/sda1 /mnt
Now we need a network. DHCP client is already configured. (Here, the narrative is interrupted by puzzlement and poking around in /etc/dhcpc.conf, and a Duh, and the network cable is plugged into the right port, this time.)
Network is here:
> ip addr
and we can install the base system:
> pacstrap /mnt base
Generate fstab. I didn’t know about using UUIDs instead of device names. That seems like a good idea:
> genfstab -p /mnt >> /mnt/etc/fstab
Arch Linux loves chroots. Here’s one. I’m just going to write down commands uncommented if it is obvious what they do.
> arch-chroot /mnt % echo myhost >
/etc/hostname% ln -s
/usr/share/zoneinfo/America/Los_Angeles /etc/localtime % mkinitcpio -p linux % passwd
Now we need a bootloader. This turned out to be a bit more complicated than expected because the Arch Linux wiki was missing the second one of these commands (I corrected it), and upon reboot, grub would attempt to boot off somebody else’s disks instead of mine. Surprisingly disks with somebody else’s UUIDs weren’t found in my computer…
% pacman -S grub % grub-mkconfig -o /boot/grub/grub.cfg % grub-install --target=i386-pc --recheck /dev/sda
Now, quit the chroot environment, sync for better measure, remove boot memory stick, and:
shutdown -r now
Voila, a new system. Go to step 3.