On Fri, 22 Aug 2025, Robert P. J. Day via linux wrote: > > i will recap the fight i am currently having in trying to create a > bootable USB drive from Ubuntu Server 24.04.3 ["24.04"], and i will > interac $100 to the first person who can solve the problem i am about > to describe. (i will start writing this up in detail at my > crashcourse.ca wiki, but i'll supply enough here that you will have > enough information to take a crack at it.) > > previously, i described how i want to customize a 24.04 ISO image to > add some autoinstall configuration, but the problem here is way > simpler -- i just want to take that original ISO and turn it into a > bootable USB drive *as is*. but wait ... there's more. > > if i just want an equivalent bootable USB drive from the ISO image, > well, that's trivial -- just "dd" from the ISO image to the USB drive. > that works just fine and, when i do that, the USB drive is recognized > by two different appliances i'm playing with when i go into the BIOS > on either appliance, go top the "Boot" menu, and i can see that both > BIOSes list the USB drive as a boot option. in short, those USB drives > are visible as bootable devices. and that's what i'm after. > > but i don't just want to use "dd" -- that's too easy. rather, i want > to take the 24.04 ISO image and *unpack* it ("mount -o loop", > "bsdtar", whatever) to get the directory structure, which is where i > would add the autoinstall stuff, but i want to keep it simple, and > after i unpack the ISO image, i'm happy to *immediately* pack it up > again (unchanged) to get the equivalent bootable ISO image. then i can > "dd" that to a USB drive and boot from that. > > that's it -- i want to take canonical's 24.04 ISO image, unpack it > (however you want), then recreate a bootable ISO image from that (most > likely with "xorriso"), dd to USB drive and boot from that. and from > my poking around, it seems like the work involves invoking "xorriso" > with all of the appropriate options, a good example seen here: > > https://www.reddit.com/r/Ubuntu/comments/1g0cq09/how_to_create_a_custom_ubuntu_24041_image_by/ > > that makefile ostensibly does what i want, except we can ignore all > the cloud-init stuff since i don't want to make any changes, and the > real work is done by the "ubuntu" target, which runs "xorriso" with a > truckload of options in order to recreate a bootable ISO image. > > i used something very much like that but, no matter how i tweak it, > once i recreate an ISO image and copy to USB drive, neither appliance > recognizes that USB drive as a boot option, so i am clearly > overlooking something critical. > > there's the $100 bounty -- figure out the magic incantation of > "xorriso" that allows me to do the above: > > 1) start with canonical 24.04.3 ubuntu server image > 2) unpack into directory structure > 3) use xorriso to immediately repack into bootable ISO image > 4) copy to USB drive, and boot from that USB drive > > i've played with those options all morning and haven't succeeded. > thoughts? > > rday i see a couple proposed solutions, but i'll add the following incantation of "xorriso" which ostensibly dumps all of the information about an ISO image that you need later to rebuild it: $ xorriso -dev ubuntu-24.04.3-live-server-amd64.iso -report_el_torito as_mkisofs xorriso 1.5.6 : RockRidge filesystem manipulator, libburnia project. xorriso : NOTE : Loading ISO image tree from LBA 0 xorriso : UPDATE : 1073 nodes read in 1 seconds libisofs: NOTE : Found hidden El-Torito image for EFI. libisofs: NOTE : EFI image start and size: 1610304 * 2048 , 10160 * 512 xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded Drive current: -dev 'ubuntu-24.04.3-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, 1613010 data blocks, 3150m data, 465g free Volume id : 'Ubuntu-Server 24.04.3 LTS amd64' -V 'Ubuntu-Server 24.04.3 LTS amd64' --modification-date='2025080523540700' --grub2-mbr --interval:local_fs:0s-15s:zero_mbrpt,zero_gpt:'ubuntu-24.04.3-live-server-amd64.iso' --protective-msdos-label -partition_cyl_align off -partition_offset 16 --mbr-force-bootable -append_partition 2 28732ac11ff8d211ba4b00a0c93ec93b --interval:local_fs:6441216d-6451375d::'ubuntu-24.04.3-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_1610304s_size_10160d:all::' -no-emul-boot -boot-load-size 10160 $ so you can see how to extract from the original 24.04.3 ISO image so much of the information that was used to build it originally and which is used subsequently in the repacking command. i added as much of that as i could in my attempt but still couldn't get a bootable USB drive. I will now examine the solutions proposed already. rday To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org To visit the archives: https://lists.linux-ottawa.org