Void Linux installation scripts
Following the example set by Jake@Linux’s blog for installing Void Linux the hard way, I decided to write a series of scripts to simplify installing Void Linux from either the musl or glibc live image.
I had previously written Ansible playbooks/scripts to set up a void-workstation to my liking after running the standard void-installer
script.
I have created scripts for an ext4 installation, BTRFS installation and BTRFS with encryption (as with Jake’s tutorial above) installation.
So far I have completed and published the script which does a full ext4 installation.
My void-setup
script detects your location using my IP-Locator.xyz service and
will set your locale, timezone, closest repositories mirror and keyboard layout based on this.
To use the script, first obtain either the musl or glibc live image of Void Linux. The script will detect whether to use the musl or glibc packages based on the image you use (you can also force a musl installation on the glibc image or vice versa with the CLI parameters, --musl
or --glibc
when invoking the script). You will need an internet connection with Ethernet.
To use the script, when you boot into the image, and login in as root with password voidlinux, enter the following on the root prompt to run bash, update Void’s package manager and install curl (used to get the script and within the script itself).
bash
xbps-install -Syu xbps curl
Then get and execute the installation script with:
curl -s https://playbooks.stpettersen.xyz/void-setup > void-setup
bash void-setup
(If you want to inspect the script first (to check it’s safe), you can inspect via my playbooks index or
you can inspect it with cat void-setup
before running bash void-setup
).
void-setup
supports the following CLI arguments:
--layout [qwerty-en] - Set keyboard layout - where an acceptable layout is:
qwerty-en, qwerty-uk, azerty-fr, etc.
--skip-location - Do not detect the user location;
defaults to US English, UTC timezone, CDN mirror
and QWERTY English/US layout.
--musl - Force a musl packages installation on glibc image.
--glibc - Force a glibc packages installation on a musl image.
--skip-musl - Skip location detection as above and use musl packages.
--skip-glibc - Skip location detection as above and use glibc packages.
If you want to use the void-setup
script with a machine with a WiFi connection,
please save it onto a Flash drive which you can access while in the Void live image.
For example, save to the Flash drive on another machine with curl:
curl -s https://playbooks.stpettersen.xyz/void-setup > /mnt/flash/void-setup
Then when in the Void live environment, mount the drive and copy the file to /root:
cd
mkdir /mnt/flash
mount [-t vfat] /dev/sdNX /mnt/flash
(where N is drive and X is partition)
cp /mnt/flash/void-setup .
Then run:
bash void-setup
The script prompts you if you want to use WiFi, where you will be given the opportunity to enter your SSID and passphrase. The script will then install curl and other dependencies as necessary.
So far I have only published the scripts to install with an ext4 filesystem. Please check back soon for BTRFS and BTRFS encryped installations.