l...@gnu.org (Ludovic Courtès) writes: >> There appear to be (at least) two problem that prevent this naive >> solution from working, which might point us in the right direction: >> >> First, the GRUB menu is trying to find a file system with label >> "gnu-disk-image" (via "search --label --set gnu-disk-image"), which >> won't work because there is no file system with that label in the >> resulting image. > > So it seems that the crux of the problem is that ISO9660 lacks file > system labels, which breaks the whole thing, right?
Yes, probably. It seems we can set a "volume id", but not a label like in EXT file systems. For example, see here: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/installer/cd-dvd/iso-image.nix >> Second, the init process from the initrd (I think that's what it's >> called?) is trying to look for a file system with label >> "gnu-disk-image", which it never finds. It just sits there waiting to >> find it, and it never shows up, so it freaks out. Possible solution: >> modify the behavior of our initrd's init process. I'm not sure how to >> customize the init process here, but there must be a way. We'll >> probably also need the kernel module that enables reading of iso9660 >> file systems, if it wasn't present already. > > So we could try detecting the root partition by a mechanism other than > partition labels/UUIDs, but I don’t know which mechanism. Ideas? How > do people address this? Volume ID seems like the right thing to try first. What do we need to change to support this, I wonder? I'm not familiar with the initrd stuff but would be willing to poke around in there and experiment. I just don't really know where to begin. >> If you don't like grub-mkrescue, you can "roll your own" ISO generation >> program, like Nix does by customizing the xorriso invocation [1]... But >> honestly, it looks pretty complicated [2]. So if we can let >> grub-mkrescue do that work for us, that would be swell. > > Indeed, though of course grub-mkrescue invokes xorriso behind the > scenes. > > Once we’ve figured out the partition designation issue above, I guess we > could integrate that and have, say, > > guix system iso-image … > > to produce an ISO image. Sounds doable! Yeah, that'd be cool. It looks like with the right incantations (see Nix's scripts), you can create a "hybrid" ISO image that boots correctly in PC-BIOS, UEFI, from CD/DVD or USB stick. But any ISO image that will boot from a CD is a good start. By the way, do you think it's possible to build an ISO image from a manifest of files? I ask because it seems like that's what Nix is doing; however, the code involved in 'guix system disk-image' seems to actually boot the target system before the final disk image is built. I was playing around by mounting the disk image as a loopback device only because that provided me with a convenient way to access all the files that need to be in a bootable system; it seems to me like it would be great if we could build an ISO image without first building an entire disk image. That seems redundant. -- Chris
signature.asc
Description: PGP signature