Ventoy Forums

Full Version: converting CSM (legacy) bootable ISOs to UEFI bootable ISOs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to modify a CSM (legacy) bootable iso to a UEFI or CSM and UEFI bootable ISO for use with Ventoy?

If yes where can i find detailed instructions for the same?

Many Thanks
Yes and it's not that difficult.
Although it's hard to find a clear explanation.
The source code this software contains code that I have just altered to do just this and solved a long gave up upon sought after method to make my ISO not use isolinux and still use grub instead. Look at the LiveCD source code.
When I perfect a script to do this automatically I will post it.
Please do let me know.
(01-31-2021, 02:21 PM)paresh Wrote: [ -> ]Please do let me know.
Let me try and explan.

You need Linux, preferably an Ubuntu based 
You need to install xorriso 
I think that automatically installs mkisofs 
Hopefully you know a bit about boot files.
You need to look at the configuration files in the legacy 
Iso's .

If it's using isolinux or grub. 
for isolinux you will need to translate everything 
Into grub.cfg format, I wish there was a tool to do this,  I have yet to find one, it does seem like it would be hard to program one.

if your booting non free software this may be very difficult I haven't Done anything but windows 10. 

You should be able to just copy over the efi / EFI directory and the efi.img nomaly located in the grub folder from a similar iso to this rebuild  one you will need to make.

If not you will need to make one then build a fat image and c
REMEMBER TO KEEP THE FOLDER STRUCTURE THE SAME
Or it will not be able to find your configuration file.

You need to make a Folder with all contents of the ISO
You need to rebuild it with the xorriso utility.

example: Any questions.... Still working on a script. It can be made a lot more simple.
ISOLinux
xorriso -as mkisofs -volid "ZZZZ" -iso-level 3 -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat -o /media/zorin/ToySSD/zorin-livecdISOlinux.iso ./ISO

GRUB2
xorriso -as mkisofs -volid "What should I BE Called" -iso-level 3 -b boot/grub/cdrom.img --grub2-boot-info --grub2-mbr ./GRUB/boot_hybrid.img -c boot/grub/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -append_partition 2 0xEF ./ISO/boot/grub/efi.img -o /YOUR.iso ./FOLDERwithISOfiles

This is in the source code They are commented out so they dont get executed . but they can be used to build a new EFI image : You still need to make a fat image and copy them
The lazy way is to remove the last line in the /LiveCd/livecd.sh so it does not remove the ISO_TMP the efi.img fat image will be in there also The embed.cfg points to the config file locatation.

The --prefix '/efi/boot' < your boot location is all that may need to be changed. this command can not be ran on its own needs the full lists of modules.
grub-mkimage -v --directory "$VT_DIR/GRUB2/INSTALL/lib/grub/x86_64-efi" -c "$VT_DIR/LiveCD/GRUB/embed.cfg" --prefix '/efi/boot' --output "$VT_DIR/LiveCD/GRUB/bootx64.efi" --format 'x86_64-efi' --compression 'auto' $all_modules_uefi 'fat' 'part_msdos'

grub-mkimage -v --directory "$VT_DIR/GRUB2/INSTALL/lib/grub/i386-pc" -c "$VT_DIR/LiveCD/GRUB/embed.cfg" --prefix '/boot/grub' --output "$VT_DIR/LiveCD/GRUB/cdrom.img" --format 'i386-pc-eltorito' --compression 'auto' $all_modules_legacy 'biosdisk' 'iso9660' 'fat' 'part_msdos'
rm -f $VT_DIR/LiveCD/GRUB/boot_hybrid.img
cp -a $VT_DIR/GRUB2/INSTALL/lib/grub/i386-pc/boot_hybrid.img $VT_DIR/LiveCD/GRUB/boot_hybrid.img
@Premiere Thank you so very much for such an elaborate reply.
Your welcome
By the way if it's Linux stuff you can most likely combine two or more cds into one I boot off of a 9+Gb iso from ventoy. You can boot from a multi boot ios Smile .
(02-01-2021, 04:35 PM)Premiere Wrote: [ -> ]Your welcome
By the way if it's Linux stuff you can most likely combine two or more cds into one I boot off of a 9+Gb iso from ventoy. You can boot from a multi boot ios Smile .
Thanks once again.
I always thought you could create a bootable UEFI USB drive (with say Rufus) and lift the image and use it in Ventoy....

Would that work?