r/voidlinux • u/[deleted] • 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=1The 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=12
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
--hostonlywould make this work, but only temporarily, it has to be enabled in a dracut configuration file. If its enabled correctly,xbps-reconfigureis 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 thedracutcommand line interface.
1
2
u/Duncaen Nov 22 '19
You need to enable
hostonly=yesin a configuration file in/etc/dracut.conf.d, otherwise it will not include host specific configuration files into the initramfs. If thats done, the normalxbps-reconfigure -f linux5.3or whatever linux series package you want to regenerate for.