Installation script or something

Having trouble installing Void? Not sure how to partition your drive or which filesystem to use? Here's the place to come for help.
Post Reply
kora-kora
Posts: 38
https://dekodeco.com.pl/producent-mebli-na-wymiar-w-warszawie-nowoczesne-kuchnie/
Joined: Thu May 09, 2024 2:48 pm

Installation script or something

Post by kora-kora »

Hi,

I am experimenting a lot and re-installing a Base Void on my Chromebook every day, sometimes a few times a day. The process is easy, but is there a way to create a file with answers and use it while installing?

Thank you.
pid1
Site Admin
Posts: 113
Joined: Sun Nov 21, 2021 2:50 am
Location: USA

Re: Installation script or something

Post by pid1 »

If you want to start from an identical install every time, you might be served better with a USB stick with an image of your ideal Void setup and dd it over to the Chromebook. Also using a filesystem like Btrfs can have multiple base Void installations within while preserving others (i.e. /home). Make your ideal Void install, snapshot it readonly, and make a new writable subvolume from there and boot from that.

This option assumes your Void root (/) is on a subvolume of the root Btrfs filesystem and the Btrfs top level volume is mounted at /broot.
cd /broot
mkdir .snapshots
btrfs sub snap -r voidroot .snapshots/voidroot@mybaseinstall
btrfs send ./snapshots/voidroot@mybaseinstall | btrfs send newvoidroot

Then edit /boot/grub/grub.cfg or modify the line manually in Grub during boot: (change highlighted)
linux /vmlinuz-6.6.34_1 root=UUID=379dfe84-e25e-4eae-85c9-247b095a388d ro rootflags=subvol=newvoidroot loglevel=4
Then modify the new root's fstab which is at newvoidroot/fstab:
LABEL=os / btrfs noatime,nodiratime,acl,compress=zstd,ssd,discard,space_cache=v2,subvol=newvoidroot 0
Then reboot into the new root filesystem and mess around with it as you please. Note, the original Btrfs subvolume is not touched so if you go back, you only need to modify the /boot/grub/grub.cfg file (assuming a shared /boot filesystem or subvolume) and not the fstab.


Alternatively, you can condense the entire installation process of Void down to some lines of commands, just hard-code the variables you desire for the installation options and skip the void-installer script entirely. Here is an example of how to do that and some of the interactive parts (i.e. disk partition) can be non-interactive with your known partition setup.

https://docs.voidlinux.org/installation ... hroot.html
Linux/BSD since 2001. Void Linux+KDE/Plasma since 2015. Windows? Not even in a virtual machine :D
kora-kora
Posts: 38
Joined: Thu May 09, 2024 2:48 pm

Re: Installation script or something

Post by kora-kora »

Thank you very much!
pid1
Site Admin
Posts: 113
Joined: Sun Nov 21, 2021 2:50 am
Location: USA

Re: Installation script or something

Post by pid1 »

I thought it might also be worthwhile that you can send a snapshot of a Btrfs subvolume to a file and put the file on a NAS, USB drive, anywhere for the same purposes.

Code: Select all

btrfs send -f mybaseinstall_btrfs.img ./snapshots/voidroot@mybaseinstall
Then you can move the mybaseinstall_btrfs.img file as desired.

To import the subvolume on any Btrfs filesystem it will be the opposite:

Code: Select all

btrfs receive -f /media/usbdrive/mybaseinstall_btrfs.img /btrfs/mybaseinstall
Linux/BSD since 2001. Void Linux+KDE/Plasma since 2015. Windows? Not even in a virtual machine :D
kora-kora
Posts: 38
Joined: Thu May 09, 2024 2:48 pm

Re: Installation script or something

Post by kora-kora »

Thanks a lot again!
Post Reply