hackerncoder / multibootusb

A collection of GRUB files and scripts that will allow you to create a pendrive capable of booting different ISO files
https://mbusb.aguslr.com
GNU General Public License v3.0
68 stars 21 forks source link

Add NixOS support #52

Open nothingnesses opened 3 years ago

nothingnesses commented 3 years ago

Support for NixOS would be nice. I tried using the generic loopback.cfg but it didn't work properly as the OS was expecting a certain directory hierarchy which wasn't present. To make this work, I guess the cfg would have to somehow let the OS know where to find the directories it expects. Hopefully someone smarter than me can figure out how to do this.

xfnw commented 2 years ago

i managed to get it to boot from the generic loopback with some changes:

nixos seems to depend on the bootloader knowing some stuff about which derivation to boot to via kernal parameters, you need to copy the init= kernel parameter of /isolinux/isolinux.cfg from the iso into bootoptions, which is different for every new nixos iso because of the store's hashes

linux can be set to (loop)/boot/bzImage $bootoptions, and initrd to (loop)/boot/initrd