Warning: THE VOID WIKI IS DEPRECATED. It is no longer being maintained, contains outdated and incorrect information, and will eventually be shut down. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues

Install Void Linux onto a USB Stick

From Void Linux Wiki
Revision as of 17:12, 6 December 2016 by Userx (talk | contribs) (Created page with "'''Install Void Linux onto a USB Stick''' If you want a full blown Void Linux OS on a USB Stick to give to your friends or for yourself. Then you've come to the right place....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Install Void Linux onto a USB Stick

If you want a full blown Void Linux OS on a USB Stick to give to your friends or for yourself. Then you've come to the right place.

I've installed this on as little as a 8GB USB Stick.

First create two partitions on your USB Stick, using your favorite method. One for the system, and the other for your swap drive.

create a new directory on root to work in, or use an existing one.

   mkdir /void

Remember to use the correct device address when mounting. blkid will give you the correct address.

sudo blkid

/dev/sdd1: UUID="1ef89660-45dc-49b2-b16b-c4fb74903dd4" TYPE="ext4" PARTUUID="3f012745-01"

/dev/sdd2: UUID="2e925665-7ffe-489d-ad9c-6ab2c8809aea" TYPE="swap" PARTUUID="3f012745-02"

   mount /dev/sdd1 /void

Before installing the base-system. You will have to decided what more you want to install on your OS before going ahead with this installation. Things like your video driver, desktop, method of gaining internet, and utilities you love to use. They all can be added within this part of your install, or afterwords. This install is for Fluxbox, with basic utilities for internet connection, alsa sound system, firefox, video player, file access, etc..

sudo xbps-install -S -R http://repo3.voidlinux.eu/current -r /void base-system xorg-minimal xinit xf86-input-evdev xf86-video-ati xorg-input-drivers xf86-video-vesa ipw2100-firmware ipw2200-firmware inetutils dhclient NetworkManager network-manager-applet AlsaMixer.app alsa-tools alsa-utils nano volumeicon Thunar pcmanfm gvfs adwaita-icon-theme terminator mplayer gkrellm file-roller polkit gparted dbus pavucontrol firefox xterm usbutils menumaker usbmuxd grub wireless_tools xorg-fonts xf86-input-synaptics xauth inetutils fluxbox

Now to prepare to mount the system with chroot

sudo mount --rbind /dev /void/dev

sudo mount --rbind /proc /void/proc

sudo mount --rbind /sys /void/sys

sudo chroot /void


passwd root

chown root:root / ;

chmod 755 / ;

You can give your HOSTNAME whatever you want.

echo USB8Void64Linux > /etc/hostname ;

grub-install /dev/sdd


your system should boot without error without you editing your fstab file, but it is still needed to be done before you continue using your USB Stick. If you want you can edit your fstab to make entries to your partitions here. Using Either UUID, or old school, /dev/sdxx method. UUID would be a preferred if you intend on using it everywhere.


nano /etc/fstab

/dev/sdd1 / ext4 defaults,nodiratime,noatime 0 1

/dev/sdd2 none swap sw 0 0

make your entries now. Save, exit nano.

Now edit your libc-locales to set your Country. Either by hand, or just shoot it into your file.

nano /etc/default/libc-locales


echo en_US.UTF-8 UTF-8 >> /etc/default/libc-locales

xbps-reconfigure -f glibc-locales

echo hostonly=yes > /etc/dracut.conf.d/hostonly.conf

xbps-reconfigure -f linux4.8

dbus-uuidgen > /var/lib/dbus/machine-id

Add a user to your system besides root.

useradd username

passwd username

Setting up wifi connection via iwconfig.

I've written a script. I call it upwifi. I just run it off the command line, and/or have .xinitrc run it.

nano /home/userame/upwifi

If you already know your wifi providers name, then add it here.


sudo ifconfig wlo1 up

sleep 1

sudo iwconfig wlo1 essid "WiFi Provider" key "off" or key "whatever the key is"

save and exit nano, next

chmod +x /home/userame/upwifi

To manually set up your wifi network using ifconfig

ifconfig wlo1 up

iwlist wlo1 scan

Find the provider and key from the list. You can send the list into a pipe | using more or less to prevent the list from going out of sight if it is a long list.

iwconfig wlo1 essid NETWORK_NAME key WIRELESS_KEY

For NetworkManager, and other methods that can be used, You can find more on this Void Wiki Page to do that.

Because Fluxbox is not using a login manager in this install, we create a logout script to use in a terminal get back to the login screen (cli console).

nano /home/userName/logout

sudo pkill -u userName

save and exit

Add user to the groups needed, you can add more groups to suit your needs.

usermod -aG wheel,storage,network,audio userName

nano /etc/sudoers

uncomment only one wheel for sudo privages

nano /etc/sudoers

       Uncomment to allow members of group wheel to execute any command
    %wheel ALL=(ALL) ALL
       Same thing without a password


For your .xinitrc file to start Fluxbox and other items

nano /home/userName/.xinitrc

then add what is needed to that, save, exit nano.

   Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then

for f in /etc/X11/xinit/xinitrc.d/*; do
  [ -x "$f" ] && . "$f"
unset f


   exec gnome-session
   exec startkde
   exec startxfce4
   ...or the Window Manager of your choice
   For NetworkManager
   nm-applet 2>&1 > /dev/null &

gkrellm & volumeicon &


dbus-launch --exit-with-session fluxbox

udiskie -2 -s &

       test for an existing bus daemon, just to be safe
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
    ## if not found, launch a new one
    eval `dbus-launch --sh-syntax`
    echo "D-Bus per-session daemon address is: 


  echo "Session started with $DBUS_SESSION_BUS_ADDRESS"

exec startfluxbox

For alsa audio

nano /etc/modprobe.d/snd-hda-intel.conf

options snd-hda-intel model=auto

For hotplug

For make the things work you have to create as root this Policykit rule file:

nano /etc/polkit-1/rules.d/55-storage.rules

with this content

// See the polkit(8) man page for more information // about configuring polkit.

// Allow udisks2 to mount devices without authentication // for users in the "storage" group. polkit.addRule(function(action, subject) {

  if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" 


       action.id == "org.freedesktop.udisks2.filesystem-mount") &&

subject.isInGroup("storage")) {

      return polkit.Result.YES;


Give the files to the user.

chown userName:userName /home/userName/*




Nothing works on first boot, you have to add services then start them.

ln -s /etc/sv/dbus /var/service

ln -s /etc/sv/dhcpcd /var/service

ln -s /etc/sv/alsa /var/service

ln -s /etc/sv/udevd /var/service

ln -s /etc/sv/uuidd /var/service

Start all Services

sv start /var/service/*

reboot if needed.