Mathieu Othacehe writes: Hello Mathieu! >> The conclusion here is that, I think that we very few adaptations to >> your branch, we should be able to produce Hurd ISO images or Hurd EFI >> compatible disk-images. Maybe it would be a first step. >> >> Then, we could find a way to create "MBR compatible" Hurd and Linux >> disk-images in (gnu system image). > > Ok, I made further progress. Turns out the Hurd EFI solution was a > dead-end, because I have a "no console will be available to os" message > in Qemu, instead of Hurd console output. I don't feel like debugging > this. Ah, well that's the only result that I also came up with and wanted to share. Maybe Ludo has an idea how to fix that; I could not find anything helpful yet. > So, back to the MBR solution. I had another look to what OpenWrt is > doing. They found a really nice work-around! As I stated, we cannot use > "grub-install", but this command is in reality a wrapper around > "grub-mkimage" and "grub-bios-setup". Ah! That's good to know. > ####################################### > # # # # > # MBR # MBR-GAP # FIRST PARTITION # > # # # # > ####################################### > > > grub-mkimage generates a Grub image, small enough so that it can fit in > the MBR-GAP (the space between the MBR and the first partition). Okay... > It cannot contain all Grub modules, but that's not an issue, because > Grub will be able to find missing modules from the first partition when > started. aha... > They also patched grub-bios-setup[1] so that it can work on a raw > disk-image, and install the previously generated "grub.img". So, this is one aspect of what we're avoiding by running grub-install in a qemu vm, right? Any idea on the upstream status of this patch? (I don't think it matters all that much for us, let's use it :-) > So with the following commands: > > grub-mkimage -O i386-pc -o core.img biosdisk part_msdos ext2 > echo "(hd0) /tmp/my-disk-image" > device.map > grub-bios-setup -m device.map -r "hd0,msdos1" -d tmp /tmp/qemu-image2 > > I'm able to make a Guix system image bootable, without root > permissions. It then starts the Hurd kernel and crashes, but that's > another story :p Thats *great*, no really! > So, if it's ok for you, I can integrate this stuff cleanly, and we won't > need the vm-image stuff anymore. > > WDYT? That seems a very good idea, I'm cc'ing Ludo to ping him about this. I'm attaching some hacky work that I did on the patch that you paste'd to me via IRC, adding som Hurd'y things. Maybe the pointers are helpful, but it's all pretty obvious. Greetings, Janneke > [1]: > https://github.com/openwrt/openwrt/blob/master/package/boot/grub2/patches/100-grub_setup_root.patch