Skip to content

Instantly share code, notes, and snippets.

@carlwgeorge
Last active October 29, 2016 12:41
Show Gist options
  • Select an option

  • Save carlwgeorge/616b4dffcf38e97c8a26 to your computer and use it in GitHub Desktop.

Select an option

Save carlwgeorge/616b4dffcf38e97c8a26 to your computer and use it in GitHub Desktop.

partitioning

parted -s /dev/sda mklabel gpt
parted -s /dev/sda mkpart - 2048s 1050623s
parted -s /dev/sda set 1 boot on
parted -s /dev/sda mkpart - 1050624s 100%

filesystems

mkfs.vfat -F32 -n BOOT /dev/sda1
mkfs.btrfs -L ROOT /dev/sda2

btrfs subvolume setup

mount /dev/sda2 /mnt
btrfs subvolume create /mnt/ROOT
btrfs subvolume list /mnt # look at subvolid of ROOT
btrfs subvolume set-default $your_subvolid /mnt
umount /mnt

mount filesystems in preparation for arch-chroot

mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot

install package groups and packages

  • you need dosfstools and btrfs-progs to properly read your partitions
pacstrap /mnt base base-devel dosfstools btrfs-progs sudo

fstab

genfstab -t LABEL /mnt | grep LABEL >> /mnt/etc/fstab

locale, timezone, hostname

sed -i '/^#en_US/ s_^#__' /mnt/etc/locale.gen
arch-chroot /mnt locale-gen
arch-chroot /mnt systemd-firstboot --locale=en_US.UTF-8 --timezone=US/Central --hostname=$your_hostname

initrd

arch-chroot /mnt mkinitcpio -p linux

root password

arch-chroot /mnt passwd

bootloader

arch-chroot /mnt bootctl install
echo -e "default\tarch\ntimeout\t3" > /mnt/boot/loader/loader.conf
echo -e "title\tArch Linux\nlinux\t/vmlinuz-linux\ninitrd\t/initramfs-linux.img\noptions\troot=LABEL=ROOT rw quiet" > /mnt/boot/loader/entries/arch.conf
echo -e "title\tArch Linux (rescue)\nlinux\t/vmlinuz-linux\ninitrd\t/initramfs-linux.img\noptions\troot=LABEL=ROOT rw systemd.unit=rescue.target" > /mnt/boot/loader/entries/arch-rescue.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment