June 22, 2021
Dual boot setup with Windows and Arch: Installation notes
These are notes that I gathered for myself while setting up and installing a dual boot system on an old laptop that I repaired and resurrected. The laptop has a 1TB hard drive so it’s got plenty of space for fun stuff like this.
The first step is to install Windows. I won’t cover that here. I installed it on the first 100GB of the 1TB hard drive and then rebooted from the Arch Live Iso to start the arch installation to take up the rest of the drive. The installation will make the windows partition accessible from the Arch environment.
I don’t cover the audio tuning that happens after the setup here but will do that in a seperate post / note at some point.
If need someone to hold your hand while doing this (I did) then check out this video which I found helpful during the process, even though it isn’t 100% accurate I found.
Initial setup
loadkeys dk
connect to wifi
iwctl station wlan0 connect "<network-name>"
network time:
timedatectl set-ntp true
Use reflector to setup mirrors
pacman -S reflector
reflector -c Norway -a 5 --sort rate --save /etc/pacman.d/mirrorlist
pacman -Syyy
Setup dual boot
Create partition on disk:
cfdisk /dev/nvme0n1
Choose free space Hit enter Write
Make filesystem
Find the linux partition:
lsblk
mkfs.ext4 /dev/nvmen0n5
Now mount it
mount /dev/nvmen0n5 /mnt
Mount windows boot partition
mkdir /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot
Mount main windows fs
mkdir /mnt/windows
mount /dev/nvme0n1p3 /mnt/windows
Install base system
pacstrap /mnt base linux linux-firmware intel-ucode vim
Generate fstab
genfstab -U /mnt >> /mnt/etc/fstab
Check fstab
cat /mnt/etc/fstab
If it looks okay, its time to lave the iso:
arch-chroot /mnt
Swap
fallocate -l 10GB /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
vim /etc/fstab
Add:
/swapfile none swap defaults 0 0
Timezone
ln -sf /usr/share/zoneinfo/Europe/Oslo /etc/localtime
hwclock --systohc
Locale
vim /etc/locale.gen
uncomment da_DK.UTF-8 UTF-8
then run
locale-gen
echo "LANG=da_DK.UTF-8" >> /etc/locale.conf
Keymap
echo "KEYMAP=dk" >> /etc/vconsole.conf
loadkeys dk
Hostname
vim /etc/hostname
add “lysendebjerg”
Then open
vim /etc/hosts
And add
127.0.0.1 localhost
::1 localhost
127.0.1.1 lysendebjerg.localdomain lysendebjerg
Root password
passwd
Base packages
pacman -S sudo grub efibootmgr base-devel linux-headers git networkmanager network-manager-applet wireless_tools wpa_supplicant dialog git bluez bluez-utils pulseaudio-bluetooth cups openssh jack
if dual boot with windows:
pacman -S os-prober ntfs-3g mtools dosfstools
Grub
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
Allow os-prober (for dual boot only):
vim /etc/default/grub
Add
GRUB_DISABLE_OS_PROBER=false
Create config:
grub-mkconfig -o /boot/grub/grub.cfg
Enable services
systemctl enable sshd
systemctl enable NetworkManager
systemctl enable bluetooth
New user
useradd -mG wheel mads
passwd mads
sudo
EDITOR=vim visudo
uncomment %wheel ALL=(ALL) ALL
Enable color pacman
sudo vim /etc/pacman.conf
uncomment Color
Change shell to zsh
sudo pacman -S zsh
chsh /bin/zsh
Install AUR helper (paru)
sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
Install desktop environment and basic necessities
I use bspwm at the moment because it’s extremely minimalistic and very very nice. This will install pretty much everything I need in a full desktop environment including terminals, browser, file managers statusbar and other tidbits.
paru -S xorg-server xorg-twm xorg-xprop xorg-xkill xorg-xinit xautolock rofi sxhkd bspwm bsp-layout alacritty kitty blueman neovim-git htop neomutt tmux ncdu namcap picom polybar polkit-gnome xfce4-power-manager tuned vlc topgrade timew task taskwarrior-tui-git scrot ripgrep skim fzf redshift ranger thunar telegram-desktop the_silver_searcher starship-bin sudo pass firefox downgrade bashmount arandr mbsync-git mons exa bat
Install development stuff
paru -S platformio teensyduino lazygit kicad gdb gcc cmake cppcheck openscad rust
Install audio stuff
paru -S reaper-bin sws supercollider sc3-plugins jack2 mpv sox qjackctl pulseaudio-bluetooth pulseaudio-jack pulseaudio njconnect flac cadence alsa-firmware alsa-plugins alsa-utils realtimeconfigquickscan-git
Install dotfiles
First setup ssh keys to github account: https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account
ssh-keygen -t ed25519 -C "mail@madskjeldgaard.dk"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
Then get the new key:
cat ~/.ssh/id_ed25519.pub
and paste it into github account
git clone git@github.com:madskjeldgaard/dotfiles.git && cd dotfiles && ./install
Install neovim plugins
nvim -c "PlugInstall" --headless