0

Unfortunately I can't find an answer to this for ubuntu 21.10 or 22.04.

I'm attempting to remaster ubuntu 22.04 for the expressed purpose of autoinstall with cloud-init. For the below example I am 'simply' extracting the iso and repackaging with xorriso (I have tried apt version, V1.5.2 and latest V1.5.4). No mater what I have tried, the resulting ISO gets past grub and errors on "Unable to find a medium containing a live filesystem".

Below are the (generalized) exact steps I took and received this error:

wget https://releases.ubuntu.com/22.04.1/ubuntu-22.04.1-live-server-amd64.iso
mkdir -p /mnt/tmp
mount -t iso9660 -o loop *.iso /mnt/tmp
mkdir -p ./iso
rsync -a /mnt/tmp/* ./iso/

These results are appended to my xorriso image creation command bellow.

xorriso -indev ubuntu-22.04.1-live-server-amd64.iso -report_system_area as_mkisofs

xorriso -as mkisofs
-V 'Ubuntu-Server 22.04.1 LTS amd64'
--modification-date='2022080916483300'
--grub2-mbr --interval:local_fs:0s-15s:zero_mbrpt,zero_gpt:'ubuntu-22.04.1-live-server-amd64.iso'
--protective-msdos-label
-partition_cyl_align off
-partition_offset 16
--mbr-force-bootable
-append_partition 2 28732ac11ff8d211ba4b00a0c93ec93b --interval:local_fs:2871452d-2879947d::'ubuntu-22.04.1-live-server-amd64.iso'
-appended_part_as_gpt
-iso_mbr_part_type a2a0d0ebe5b9334487c068b6b72699c7
-c '/boot.catalog'
-b '/boot/grub/i386-pc/eltorito.img'
-no-emul-boot
-boot-load-size 4
-boot-info-table
--grub2-boot-info
-eltorito-alt-boot
-e '--interval:appended_partition_2_start_717863s_size_8496d:all::'
-no-emul-boot
-boot-load-size 8496
-o "Ubuntu.iso"
./iso/

Resulting on ISO boot in error Unable to find a medium containing a live filesystem.

Results of report_system_area as_mkisofs in V1.5.2 as seen ran above:

xorriso -indev ubuntu-22.04.1-live-server-amd64.iso -report_system_area as_mkisofs
xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.

xorriso : NOTE : Loading ISO image tree from LBA 0 xorriso : UPDATE : 803 nodes read in 1 seconds libisofs: NOTE : Found hidden El-Torito image for EFI. libisofs: NOTE : EFI image start and size: 717863 * 2048 , 8496 * 512 xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded Drive current: -indev 'ubuntu-22.04.1-live-server-amd64.iso' Media current: stdio file, overwriteable Media status : is written , is appendable Boot record : El Torito , MBR protective-msdos-label grub2-mbr cyl-align-off GPT Media summary: 1 session, 720153 data blocks, 1407m data, 73.9g free Volume id : 'Ubuntu-Server 22.04.1 LTS amd64' -V 'Ubuntu-Server 22.04.1 LTS amd64' --modification-date='2022080916483300' --grub2-mbr --interval:local_fs:0s-15s:zero_mbrpt,zero_gpt:'ubuntu-22.04.1-live-server-amd64.iso' --protective-msdos-label -partition_cyl_align off -partition_offset 16 --mbr-force-bootable -append_partition 2 28732ac11ff8d211ba4b00a0c93ec93b --interval:local_fs:2871452d-2879947d::'ubuntu-22.04.1-live-server-amd64.iso' -part_like_isohybrid -iso_mbr_part_type a2a0d0ebe5b9334487c068b6b72699c7 -c '/boot.catalog' -b '/boot/grub/i386-pc/eltorito.img' -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info -eltorito-alt-boot -e '--interval:appended_partition_2_start_717863s_size_8496d:all::' -no-emul-boot -boot-load-size 8496 -isohybrid-gpt-basdat

V1.5.4

xorriso -indev ubuntu-22.04.1-live-server-amd64.iso -report_system_area as_mkisofs
GNU xorriso 1.5.4.pl02 : RockRidge filesystem manipulator, libburnia project.

xorriso : NOTE : Loading ISO image tree from LBA 0 xorriso : UPDATE : 803 nodes read in 1 seconds libisofs: NOTE : Found hidden El-Torito image for EFI. libisofs: NOTE : EFI image start and size: 717863 * 2048 , 8496 * 512 xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded Drive current: -indev 'ubuntu-22.04.1-live-server-amd64.iso' Media current: stdio file, overwriteable Media status : is written , is appendable Boot record : El Torito , MBR protective-msdos-label grub2-mbr cyl-align-off GPT Media summary: 1 session, 720153 data blocks, 1407m data, 73.9g free Volume id : 'Ubuntu-Server 22.04.1 LTS amd64' -V 'Ubuntu-Server 22.04.1 LTS amd64' --modification-date='2022080916483300' --grub2-mbr --interval:local_fs:0s-15s:zero_mbrpt,zero_gpt:'ubuntu-22.04.1-live-server-amd64.iso' --protective-msdos-label -partition_cyl_align off -partition_offset 16 --mbr-force-bootable -append_partition 2 28732ac11ff8d211ba4b00a0c93ec93b --interval:local_fs:2871452d-2879947d::'ubuntu-22.04.1-live-server-amd64.iso' -appended_part_as_gpt -iso_mbr_part_type a2a0d0ebe5b9334487c068b6b72699c7 -c '/boot.catalog' -b '/boot/grub/i386-pc/eltorito.img' -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info -eltorito-alt-boot -e '--interval:appended_partition_2_start_717863s_size_8496d:all::' -no-emul-boot -boot-load-size 8496

The xorriso output is different depending on version, and I have tried both, as well as a few other versions.

I have also tried to extract the efi and mbr as outlined here, resulting in the same error: Remaster Installation Image for Ubuntu 20.10

This is probably a simple correction but I've been beating my head against the wall so any help is 100% appreciated. Sadly, aside from a few solutions that don't seem to work for me, all of the information on this seems to be pre 21.10 and based on ISOLinux. I will specify here that I do not want to repackage 22.04 with ISOLinux to make it work, but I need a method for doing this with the supported iso.

======= More Info =======

After troubleshooting some more, I have determined (Thanks to a helpful comment below) that this is exactly where it's failing in the boot process. The issue seems to be that casper-premount is failing to detect the mountable image and silently failing on boot here. I believe that this is the specific script that's silently failing. It may be worth noting that I can mount the rootfs to /cdrom from within initramfs without issue from /dev/sr0.

Mike B
  • 11

2 Answers2

0

Sorry. This was meant as comment, not as answer. But i find no way to delete it:

I tried unmkinitramfs with /casper/initrd of 22.04 meanwhile on Debian 11. No luck. It unpacks some processor firmware and then errors out. So if you find a way to get to the 100+ MB inside the initrd, i would be interested to learn it. (Mail to bug-xorriso@gnu.org if it becomes lengthy.)

Now that it is an answer, i add as info that i'm the developer of xorriso and that i believe that the shown xorriso arguments are what is needed for repacking Ubuntu 22.04.

0

I'm going to preface this 'answer' with the acknowledgement that I really don't have a deep understanding of what I did to fix this. If anyone knows more than I or can elaborate, please do so, or even just a point to good documentation on how to properly make this work would be super appreciated.

I have successfully built a GitLab runner to extract and repackage a ubuntu 22.04 ISO with cloud-init and it seems to work beautifully. I did so by referencing this project here, and stripping out the isolinux bits to make it a standard supported image. You can see in said project that there are a couple major differences including specifying locale when executing the build, the xorriso command itself (in which I substituted all of the isolinux bits successfully), and the grub menu config.

Mike B
  • 11