r/voidlinux • • Nov 22 '19

How do I update the initramfs ?

I want to disable my dGPU at boot and enable it at shutdown. So I add the following to /etc/modprobe.d/bbswitch.conf:

options bbswitch load_state=0 unload_state=1

The guide says that:

You have to update your initial ramdisk (initrd) for the changes propagate to the boot process. On Debian and Ubuntu, this can performed by running update-initramfs -u as root. 

How do i update the initramfs for Void ? is it : dracut --force ?

also, Can i have load_state=0 unload_state=1 both in the options bbswitch line ? or should I make separate lines like this:

options bbswitch load_state=0 
options bbswitch unload_state=1
3 Upvotes

8 comments sorted by

2

u/Duncaen Nov 22 '19

You need to enable hostonly=yes in a configuration file in /etc/dracut.conf.d, otherwise it will not include host specific configuration files into the initramfs. If thats done, the normal xbps-reconfigure -f linux5.3 or whatever linux series package you want to regenerate for.

1

u/[deleted] Nov 22 '19

So here is the procedure:

(1) I add:

 options bbswitch load_state=0 unload_state=1 

to /etc/modprobe.d/bbswitch.conf

(2) I add hostonly=yes to /etc/dracut.conf.d/manual.conf

(3) reboot.

(4) dracut --force --kver <kernel_version>

(5) xbps-reconfigure -f linux<kernel-version>

---------

Questions:

(1) is this correct ? can someone confirm ?

(2) Do i have to do the above everytime a new kernel is installed ?

(3) Is bbswitch built with DKMS support in Void Linux ?

1

u/[deleted] Nov 22 '19 edited Nov 22 '19

bumblebeed is easier ? lawl

Isn't this process easier ?

 xbps-install -S bumblebee nvidia bbswitch 
 gpasswd -a user bumblebee 
 ln -s /etc/sv/bumblebeed /var/service 

should I install nvidia or nvidia-dkms ?

→ More replies (2)

2

u/k4leg Nov 22 '19

Hmm... Maybe:

sudo dracut --force --hostonly --kver <5.3.12_1>; sudo xbps-reconfigure -f <linux5.3> # Instead of <5.3.12_1> put the output from ls /lib/modules.

2

u/Duncaen Nov 22 '19

Using --hostonly would make this work, but only temporarily, it has to be enabled in a dracut configuration file. If its enabled correctly, xbps-reconfigure is enough, and using dracut shouldn't be necessary and makes things unpredictable for updates if the automatically generates ones don't match the ones you created manually with the dracut command line interface.