This is an FirstRib Void build log. The build itself is put together with "off the shelf" components using simple commands instead of scripts to create the root file system. Scripts are certianly the way to build quickly and reproducibly, and this log offers no real advantages except to help understand the usually scripted process.
The log itself is not executable as the commands are intended to be copied and pasted into a terminal. It is only presented inside code tags to retain formatting. It is intended to select, copy and save to a file which can be opened in a text editor.
Some of the commands are the same as found in Firstrib build scripts and plug files and hopefully my added comments and/or instructions wil help show how simple the build process really is.
Logs will be added, here and again as sfs's are added to comlete the build into a working desktop. Following the logs can yield a reproducable build.
Recommendations:
Uses a text editor and terminal with mutual copy/paste support. YMMV with middle mouse click.
Runs commands from your build folders path with a linux distro.
console_base (no X)
494 MB uncompressed
void-x86_64-ROOTFS-20230628
235 MB uncompressed
Code: Select all
Create a build directory that will also be your frugal install directory. Open a terminal in it's path.
The commands are indented and comments and instructions start at the left margin.
Download a compressed rootfs from the Void project
wget -c https://repo-default.voidlinux.org/live/current/void-x86_64-ROOTFS-20230628.tar.xz
Download build components from the Firstrib project
wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/initrd-latest.gz -O initrd.gz
wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/huge_kernels/upup_22_04/vmlinuz
wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/huge_kernels/upup_22_04/00zdrv_upup_22.04.sfs
wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/huge_kernels/upup_22_04/01fdrv_upup_22.04.sfs
wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/12KL_gtkdialogGTK3filemnt64.sfs
Download tools from the Firstrib project
wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wd_grubconfig
wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/modify_initrd_gz.sh
wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/mount_chroot.sh
wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/umount_chroot.sh
Create a rootfs folder
mkdir console_base
Extract the void rootfs from the download ed tarball to 07_rootfs
tar -xvf void* -C console_base
Set a hostname in /etc/hostname
echo elvis > console_base/etc/hostname
Create ~.bashrc with a useful prompt
echo 'PS1="\`if [ \$? = 0 ]; then echo \[\e[0m\]0\[\e[0m\]; else echo \[\e[0m\]1\[\e[0m\]; fi\` \w # "' > console_base/root/.bashrc
Create ~.profile to enable ~.basrc
echo " . ~/.bashrc" > console_base/root/.profile
Check the files with less. Type q to exit less.
less console_base/etc/hostname
less console_base/root/.bashrc
less console_base/root/.profile
Sometimes it is easier to make edits in a text editor, rather than to write more advanced commands to run in the terminal.
For example:
One could run the following to remove a "#" in order to uncomment the line needed to choose the locale for the US in /etc/default/libc-locales.
sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/default/libc-locales
But that line is already uncommented in /etc/default/libc-locales, so, if one wanted to choose a different locale, one would have to run
sed -i 's/en_US.UTF-8 UTF-8/#en_US.UTF-8 UTF-8/' /etc/default/libc-locales to comment the uncommented line, then run
sed -i 's/#lt_LT ISO-8859-13 /lt_LT ISO-8859-13 /' /etc/default/libc-locales to uncomment the desired locale for Italy.
Navigate to console_base/etc with your file manager and open rc.conf with an editor. Look over the defaults and uncomment or construct lines as neccessary
to set the hardwareclock, timezone and keymap. These settings can always be adjusted later. https://docs.voidlinux.org/config/rc-files.html
add FONT="ter-132b" to line 27 for larger fonts in the console. Other fonts and sizes are in /usr/share/kbd/consolefonts
The chroot envrionment allows one to make normal file creations, deletions and edits from the termainal just as above, and also allows
you to run the Void xbps package manager and configuration utilities without having to boot into the install.
Make your Firstrib tools executable.
chmod +x mount_chroot.sh umount_chroot.sh wd_grubconfig modify_initrd_gz.sh
Enter the chroot envrionment. mount_chroot.sh should report "chroot directory is console_base".
./mount_chroot.sh console_base
Set Bash as the default shell for user root.
usermod --shell /bin/bash root
Set a new password for user root. The passwd utility will prompt you same as if you were booted
passwd
Or remove roots password entirely. (it is presently voidlinux). passwd should return "passwd: password expiry information changed".
passwd -d root
Update xbps and its repos. If xbps needs to be updated, you will be informed how.
xbps-install -Su
Install some console and basic apps.
xbps-install -Su xterm xauth file ntfs-3g zstd wget e2fsprogs rsync squashfs-tools ranger nano NetworkManager terminus-font pulseaudio pulseaudio-utils alsa-plugins-pulseaudio alsa-utils
pulseaudio, NetworkManager and it's dependency dbus, are services that require links to be created if the service is to start at boot.
ln -s /etc/sv/NetworkManager /etc/runit/runsvdir/default/NetworkManager
ln -s /etc/sv/dbus /etc/runit/runsvdir/default/dbus
ln -s /etc/sv/pulseaudio /etc/runit/runsvdir/default/pulseaudio
Leave the chroot envrionment. mount_chroot.sh should report "Cleaning up mounts to chroot directory console_base"
exit
Run umount_chroot.sh to clean up the host filesystem
./umount_chroot.sh
Note: At this point in the build, I have had failures to exit chroot properly. The expected message after exiting mount_chroot.sh was not returned. The host has symptoms that the session has become corrupted. The host has an inability to copy, run mksquashfs or determine file sizes. Further work on your rootfs build will corrupt your build. If in doubt, reboot before making a backup.
Make a backup of console_base
mksquashfs console_base console_base.sfs
If your host does not have squash tools installed. You can back up console_base with
cp -r console_base console_base.bak
Rename console-base to 07_something which is required by the FirstRib initrd.
mv console_base 07_console_base
Create some boot hints for grub.
./wd_grubconfig
Create a boot stanza
for Limine:
Code: Select all
:build 7
COMMENT=testing
PROTOCOL=linux
TEXTMODE=yes
KERNEL_CMDLINE=w_bootfrom=LABEL=F2=/build7 w_changes=RAM2
KERNEL_PATH=fslabel://F2/build7/vmlinuz
MODULE_PATH=fslabel://F2/build7/initrd.gz
is the equivalent of
Code: Select all
menuentry "build7" {
insmod ext2
search --no-floppy --label F2 --set
linux /build7/vmlinuz w_bootfrom=LABEL=F2=/build7 w_changes=RAM2
initrd /build7/initrd.gz
Edit:
rsync added to download xbps-install -Su line, as it is a dependency for snapmergepuppy,
pulseaudio added