From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: GuixSD bootable ISO-9669 image Date: Thu, 27 Apr 2017 15:42:48 +0200 Message-ID: <87shku6k6f.fsf@gnu.org> References: <20170418141719.llp77itz7vyq5rij@abyayala> <87k26hwxt0.fsf@gmail.com> <8760i0m7vg.fsf@gnu.org> <87pog3u3ms.fsf@gmail.com> <87k26afl07.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3jhD-0002Rw-Rc for guix-devel@gnu.org; Thu, 27 Apr 2017 09:43:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3jh9-0001pK-Qo for guix-devel@gnu.org; Thu, 27 Apr 2017 09:42:59 -0400 In-Reply-To: <87k26afl07.fsf_-_@gmail.com> (Chris Marusich's message of "Sun, 23 Apr 2017 22:11:04 -0700") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Chris Marusich Cc: guix-devel@gnu.org Hello! Chris Marusich skribis: > Chris Marusich writes: > >> ludo@gnu.org (Ludovic Court=C3=A8s) 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 > > I discovered that grub-mkrescue also lets you pass through options to > xorriso. So, you can set the volume ID as follows: > > $ sudo grub-mkrescue -V gnu-disk-image -v -o /tmp/test-img.iso /mnt/disk-= image-partition-1 > ... > grub-mkrescue: info: enabling BIOS support .... > grub-mkrescue: info: grub-mkimage --directory '/gnu/store/2hxz9cpipsbf2hk= iz5aq70k73wjj0fw1-grub-2.02rc1/lib/grub/i386-pc' --prefix '/boot/grub' --ou= tput '/tmp/grub.zilpbK/boot/grub/i386-pc/eltorito.img' --format 'i386-pc-el= torito' --compression 'auto' --config '/tmp/grub.N4OuA5' 'biosdisk' 'iso96= 60'=20 > ... > grub-mkrescue: info: executing xorriso -as mkisofs -graft-points --modifi= cation-date=3D2017042404413800 -b boot/grub/i386-pc/eltorito.img -no-emul-b= oot -boot-load-size 4 -boot-info-table --grub2-boot-info --grub2-mbr /gnu/s= tore/2hxz9cpipsbf2hkiz5aq70k73wjj0fw1-grub-2.02rc1/lib/grub/i386-pc/boot_hy= brid.img --protective-msdos-label -o /tmp/test-img.iso -r /tmp/grub.zilpbK = --sort-weight 0 / --sort-weight 1 /boot -V gnu-disk-image /mnt/disk-image-p= artition-1. > ... > xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 ru= les > ... > Writing to 'stdio:/tmp/test-img.iso' completed successfully. > > > Looks like setting the volume ID worked (despite the warning above): > > $ sudo blkid /tmp/test-img.iso > /tmp/test-img.iso: UUID=3D"2017-04-24-04-41-38-00" LABEL=3D"gnu-disk-imag= e" TYPE=3D"iso9660" PTTYPE=3D"dos" Excellent. So we would first need to add support for reading ISO9660 labels in (gnu build file-systems), which is what we use instead of libblkid. With that in place, we should be almost done. Ludo=E2=80=99.