many steps taken from this tutorial
wifi-menu
(way easier than using wpa_supplicant
)
using fdisk /dev/sda
:
- /dev/sda1
: 1 MB “BIOS Boot” partition (type 4)
- /dev/sda2
: Linux LVM partition (type 31)
create LVM physical volume:
pvcreate /dev/sda2
create volume group
vgcreate vg1 /dev/sda2
create logical volumes for boot, root, and swap
lvcreate -L 500M -n boot vg1
lvcreate -L 32G -n swap vg1
lvcreate -l 100G -n root vg1
format root and boot volumes as ext4 using mkfs.ext4
mkfs.ext4 /dev/vg1/boot
mkfs.ext4 /dev/vg1/root
enable swap
mkswap /dev/vg1/swap
swapon /dev/vg1/swap
mount volumes using mount
/dev/vg1/root
-> /mnt
/dev/vg1/boot
-> /mnt/boot
mkdir /mnt/hostrun
mount —bind /run /mnt/hostrun
install base packages (plus any other packages like vim or wpa_supplicant):
pacstrap /mnt base base-devel
generate an fstab file
genfstab -pU /mnt >> /mnt/etc/fstab
change root to the new system
arch-chroot /mnt /bin/bash
set the time zone for the current region and city
ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
and regenerate adjusted time
hwclock —systohc
Uncomment en_US.UTF-8 UTF-8
and other needed locales in /etc/locale.gen
, and generate them with locale-gen
Set the LANG
variable in /etc/locale.conf
accordingly, for example:
LANG=/en_US.UTF-8/
Setup LVM
mkdir /run/lvm
mount —bind /hostrun/lvm /run/lvm
pacman -S grub
Install the bootloader to the drive Arch was installed to (not partition!)
grub-install —target=i386-pc /dev/sda
In order for Grub to access the LVM partitions you must edit the default config prior to generating your Grub config at /etc/default/grub
, add lvm to GRUB_PRELOAD_MODULES=‘ ‘
make the config with grub-mkconfig -o /boot/grub/grub.cfg
write hostname to /etc/hostname
create root password of passwd
create new user
useradd -m -g users -G wheel,storage,power [username]
passwd [username]
and add it to the sudoers file with visudo
, and uncomment %wheel ALL=(ALL) ALL
and at this point, it fails to boot... it can boot to the emergency shell, but not mount the root filesystem