The following steps will get you the basics of Arch running. It will install a fully encrypted root partition using LUKS on LVM and then boot into a GUI environment.
fdisk /dev/sda
Create a GPT partition table and create 1 512M EFI partition and fill the rest with
Linux Filesystem
cryptsetup luksFormat --type luks2 /dev/sda2
cryptsetup open /dev/sda2 cryptolvm
pvcreate /dev/mapper/cryptolvm
vgcreate MyVol /dev/mapper/cryptolvm
lvcreate -L 4GB MyVol -n swap
lvcreate -l 100%FREE MyVol -n root
mkfs.vfat -F 32 /dev/sda1
mkfs.xfs /dev/mapper/MyVol-root
mkswap /dev/mapper/MyVol-swap
mount /dev/mapper/MyVol-root /mnt
swapon /dev/mapper/MyVol-swap
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
pacstrap /mnt base base-devel vim git
genfstab -U /mnt > /mnt/etc/fstab
arch-chroot /mnt
- Setup time
ln -sf /usr/share/zoneinfo/Europe/Dublin /etc/localtime
- Setup locale
- Uncomment GB and US locales from
/etc/locale.gen
- Generate locale files -
locale-gen
echo LANG=en_GB.UTF-8 > /etc/locale.conf
- Uncomment GB and US locales from
- Setup hostname
echo drothera-vm > /etc/hostname
- Add hostname to
/etc/hosts
passwd
pacman -S sudo
groupadd sudo
useradd -m -G sudo david
passwd david
# Uncomment line for sudo group inside /etc/sudoers
pacman -S gnome xfce4 networkmanager
systemctl enable gdm
systemctl enable NetworkManager
pacman -S open-vm-tools xf86-video-vmware xf86-input-vmmouse
systemctl enable vmware-vmblock-fuse
systemctl enable vmtoolsd
bootctl install
- Edit
/etc/mkinitcpio.conf
...
HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt sd-lvm2 filesystems fsck)
...
- Generate new files
mkinitcpio -p linux
- Copy examples
cp /usr/share/systemd/bootctl/loader.conf /boot/loader/
cp /usr/share/systemd/bootctl/arch.conf /boot/loader/entries/
- Dump UUID of LVM partition into entry to use later
blkid | grep sda2 >> /boot/loader/entries/arch.conf
- Set entry to boot from encrypted volume (in /boot/loader/entries/arch.conf)
...
options rd.luks.uuid=UUID root=/dev/mapper/MyVol-root add_efi_memmap
...
Delete output from
blkid
once you have used the UUID
exit
reboot
- Clone
yaourt
andpackage-query
git clone https://aur.archlinux.org/package-query.git
git clone https://aur.archlinux.org/yaourt.git
- Build and install
package-query
cd package-query
makepkg -si
- Build and install
yaourt
cd ..
cd yaourt
makepkg -si
yaourt powerline-fonts-git
git clone https://github.com/svetlyak40wt/dotfiler.git .dotfiles
.dotfiles/bin/dot add https://github.com/davidrothera/dotfiles-zsh
.dotfiles/bin/dot add https://github.com/davidrothera/dotfiles-vim
.dotfiles/bin/dot update
- Install neovim
sudo pacman -S neovim
- Install vim-plug
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- Install plugins
# open nvim
:PlugInstall
- Install zsh
sudo pacman -S zsh
- Install zprezto
zsh
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
exit
- Set zsh as shell
chsh -s /bin/zsh
# Logout and log back in to take affect