Installing alongside Arch Linux

From Void Linux Wiki
Jump to: navigation, search

This is a guide for advanced Arch users, that wish to try out Void Linux side by side with their usual setup. Instead of the usual GRUB2 and Dracut, we'll use Syslinux and mkinitcpio, which we already know and love from Arch. This guide may be incomplete, please extend and fix it.

Arch Linux Installation

Start by doing a full arch install.


  • LVM with a spare partition for Void Linux
  • Full disk encryption
  • Syslinux

Install Void from Arch

Install the Void Linux Package manager (xbps-git) from the AUR using the AUR helper of your choice.

Create a new partition for Void Linux and mount it:

 mkfs.ext4 /dev/mapper/lvm-voidlinux
 mount /dev/mapper/lvm-voidlinux /mnt/voidlinux

Mount boot:

 mkdir /mnt/voidlinux/boot
 mkdir /boot/voidlinux # subfolder avoids conflicts with arch
 mount --bind /boot/voidlinux /mnt/voidlinux/boot

Install the base system (option A: glibc - as used in Arch and other mainstream distributions):

 xbps-install -S -R -r /mnt/voidlinux base-system

Install the base system (option B: musl libc - for the cool kids):

 export XBPS_ARCH=x86_64-musl
 xbps-install -S -R -r /mnt/voidlinux base-system


Chroot into Void Linux:

 pacman -S arch-install-scripts # contains arch-chroot
 touch /mnt/voidlinux/etc/resolv.conf # otherwise arch-chroot doesn't work
 arch-chroot /mnt/voidlinux/

Set a root password and whatnot (detailed version):

 bash # enter a better interactive shell
 passwd root
 chown root:root /
 chmod 755 /
 echo totallynotarchlinux > /etc/hostname
 vi /etc/rc.conf
 vi /etc/fstab
 vi /etc/default/libc-locales # glibc only

Install Arch Linux' mkinitcpio in Void Linux and build your initramfs:

 xbps-install -S mkinitcpio mkinitcpio-encrypt mkinitcpio-udev
 exit # leave chroot
 cp /etc/mkinitcpio.conf /mnt/voidlinux/etc/mkinitcpio.conf
 sudo cp /etc/vconsole.conf /mnt/voidlinux/etc/vconsole.conf # needed for keymap hook
 arch-chroot /mnt/voidlinux
 mkinitcpio -g /boot/initramfs-4.2.8_1.img -k 4.2.8_1
 exit # leave chroot

Note: This setup will not create new initramfs images on kernel updates. A custom XBPS hook should be able to do that though, so this is your homework. Add it to the wiki, when you're done.

Configure Syslinux

Copy-paste the Arch Linux target in your /boot/syslinux/syslinux.cfg, rename it to Void Linux and change the root LVM partition, kernel image to (../voidlinux/vmlinuz-4.5.7_1) and initramfs (to something like ../voidlinux/initramfs-4.7.5_1.img). Now reboot.

Post Installation

Familiarise with xbps and xbps-src, they work a bit different than pacman and makepkg. Runit is what you traded in systemd for. Also check out the Post Installation article.