Aaron’s Arch Installation Notes.

My install notes for my usual Arch Linux installation with BTRFS, much of this content is heavily stolen from other sources and this Blog is organic in that it is likely to evolve with every install I complete.


1. Create any partitions(Optional)

fdisk /dev/sda

2. Format the disks / partitions and mount

mkfs.btrfs -L "Arch-PC" /dev/sda  
mount /dev/sda /mnt  

3. Create the subvolumes

cd /mnt
btrfs subvolume create __active  
btrfs subvolume create __active/ROOT 
btrfs subvolume create __active/HOME  
btrfs subvolume create __active/VAR  
btrfs subvolume create __snapshots  

4. Mount the subvolumes

cd  
umount /mnt  
mount -o subvol=__active/ROOT /dev/sda /mnt  
mkdir /mnt/{home,var}  
mount -o subvol=__active/HOME /dev/sda /mnt/home  
mount -o subvol=__active/VAR /dev/sda /mnt/var  

5. Install Arch

nano /etc/pacman.d/mirrorlist 
 * Select the mirror to be used

pacstrap /mnt base base-devel
genfstab -U -p /mnt/ >> /mnt/etc/fstab
nano /mnt/etc/fstab
 * add "tmpfs /tmp tmpfs nodev,nosuid 0 0"
 * add "tmpfs /dev/shm tmpfs nodev,nosuid,noexec 0 0"
 * copy the partition info for / and mount it on /run/btrfs (remember to remove subvol parameter! and add nodev,nosuid,noexec parameters)

6. Configure the initial system and create your user
 
arch-chroot /mnt/

pacman -S btrfs-progs

nano /etc/locale.gen
 * Uncomment en_GB.UTF-8 & en_US.UTF-8
locale-gen
echo LANG=en_GB.UTF-8 > /etc/locale.conf
export LANG=en_GB.UTF-8

ln -s /usr/share/zoneinfo/Europe/London /etc/localtime
hwclock --systohc --utc

echo aaron-pc > /etc/hostname
nano /etc/nsswitch
 * set the hostname

nano /etc/mkinitcpio.conf
 * Remove fsck and add btrfs to HOOKS
mkinitcpio -p linux

passwd
groupadd aaron
useradd -m -g aaron -G users,wheel,storage,power,network -s /bin/bash -c "Aaron West" aaron
passwd aaron

pacman -S sudo
export EDITOR=nano;visudo
 * Enable sudo for wheel

7. Install boot loader

pacman -S grub-bios
grub-install --target=i386-pc --recheck /dev/sda
nano /etc/default/grub
 * Edit settings (e.g., disable gfx, quiet, etc.)
grub-mkconfig -o /boot/grub/grub.cfg

8. Unmount and reboot

exit

umount /mnt/home
umount /mnt/var
umount /mnt/

reboot

9. Post installation configuration

Snapshot Notes :

echo `date "+%Y%m%d-%H%M%S"` > /run/btrfs-root/__active/ROOT/SNAPSHOT
echo "Fresh install" >> /run/btrfs-root/__active/ROOT/SNAPSHOT
btrfs subvolume snapshot -r /run/btrfs-root/__active/ROOT /run/btrfs-root/__snapshot/ROOT@`head -n 1 /run/btrfs-root/__active/ROOT/SNAPSHOT`
cd /run/btrfs-root/__snapshot/
ln -s ROOT@`cat /run/btrfs-root/__active/ROOT/SNAPSHOT` fresh-install
rm /run/btrfs-root/__active/ROOT/SNAPSHOT 

Comments (0)


Add a Comment





Allowed tags: <b><i><br>Add a new comment:



Get a free giffgaff Sim