bug-xorriso
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-xorriso] Mountable ISO and GRUB2


From: Carlo Caione
Subject: [Bug-xorriso] Mountable ISO and GRUB2
Date: Fri, 23 Dec 2016 13:09:22 +0100

Hi,
we have a pretty complex setup for our distro where we use GRUB2 as
bootloader when booting on BIOS and UEFI. In both cases we heavily
rely on GRUB embedded configuration scripts to do some preparation
work before booting Linux.

We want now to create a bootable ISO for the distro, but we have a few
constrains:
1) moving to ISOLINUX is not the preferred option (probably we could
chainload GRUB2 from ISOLINUX but let's stay away from that for now :)
2) we need a mountable ISO partition
3) we should guarantee that the ISO is bootable on both BIOS and UEFI,
from optical media and disk storage devices.

Right now we are generating the GRUB2 eltorito.img with something like:

$ grub-mkimage ... --output eltorito.img --format 'i386-pc-eltorito' ...

and the GRUB2 EFI image using something like:

$ dd if=/dev/zero of=efi.img bs=1M count=10
$ mkdosfs efi.img
$ copy -s -i efi.img ${efi_dir}/EFI '::/'

This is basically what grub-mkrescue is doing behind the curtain with
some customization we need for our setup.
Everything is then put together using xorriso and the ISO image generated with:

$ xorriso -as mkisofs -graft-points -b eltorito.img -no-emul-boot
-boot-load-size 4 -boot-info-table --grub2-boot-info --grub2-mbr
boot_hybrid.img --efi-boot efi.img -efi-boot-part --efi-boot-image
--protective-msdos-label -o image.iso -r -iso-level 4 ${iso9660_dir}

The problem we have is that the generated ISO doesn't have a mountable
ISO partition. In both MBR and GPT the first partition is starting at
512-block 64 instead that 512-block 0.

What we want to achieve is having the ISO image with a mountable
partition (starting from 512-block 0, to cover the entire CD) in both
MBR and GPT to have the maximum compatibility with BIOS and UEFI
systems and be able to mount the partition from Linux itself.
Basically what mjg is suggesting here
https://mjg59.dreamwidth.org/11285.html but using GRUB2 for BIOS and
UEFI booting.

Any hint how to achieve this?

Thank you,

-- 
Carlo Caione  |  +39.340.80.30.096  |  Endless



reply via email to

[Prev in Thread] Current Thread [Next in Thread]