Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] BIOS+EFI boot for ISO file

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
Antonio Rizzo
Posts: 18
Joined: 2015-09-27 09:13
Been thanked: 5 times

[SOLVED] BIOS+EFI boot for ISO file

#1 Post by Antonio Rizzo »

I created a custom Debian Live ISO and burned to pendrive with dd. The pendrive can be booted from BIOS with no problems.
Now I want to be able to boot the same live system from UEFI too (without removing isolinux). This way I can use the same pendrive with any firmware (BIOS and UEFI). I tried with rufus with no success. I think xorriso should do the trick, but many attempts didn't success. I even created an ESP partition on the pendrive and there I copied the content of the /boot/grub directory (and changed grub.cfg accordingly). No way to make it work. Can someone help me? Thanks.

Shortly, the procedure:

Code: Select all

debootstrap --arch=amd64 buster /media/Live/livework/chroot
chroot /media/Live/livework/chroot
... install Debian+LXDE+customizations
... copy kernel & initrd on /media/Live/livework/binary/live/
cd /media/Live/livework/
mksquashfs chroot binary/live/filesystem.squashfs -comp xz -e boot
... configure isolinux
Finally:

Code: Select all

xorriso -as mkisofs -r -J -joliet-long -l \
   -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16 \
   -A "my_Debian_Live"  -b isolinux/isolinux.bin -c \
   isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   -boot-info-table -o my_Debian_Live.iso \
binary
Last edited by Antonio Rizzo on 2019-11-18 20:49, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: BIOS+EFI boot for ISO file

#2 Post by Head_on_a_Stick »

Check the mkiso function in this gist: https://gist.github.com/Head-on-a-Stick ... -mkshrc-L7

But you should probably be using live-build instead of doing this manually.
deadbang

Antonio Rizzo
Posts: 18
Joined: 2015-09-27 09:13
Been thanked: 5 times

Re: BIOS+EFI boot for ISO file

#3 Post by Antonio Rizzo »

Thank you for your answer. I don't have any "boot/grub/efi.img", so xorriso was unable to operate.
As regards to https://live-team.pages.debian.net/live-manual/ I had a look, but I didn't find any reference to (U)EFI/ESP (sorry, I didn't read all pages). I found this https://willhaley.com/blog/custom-debia ... vironment/; I could give it a try.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 6 times
Been thanked: 16 times

Re: BIOS+EFI boot for ISO file

#4 Post by Dai_trying »

Head_on_a_Stick wrote:But you should probably be using live-build instead of doing this manually.
I totally agree, I have used livebuild to create my own installation images giving me exactly the system I want (including non-debian software) and it has worked really really well, so much so I rarely need to download iso files anymore :D

this page got me started.

EDIT: Also I think using --binary-images iso-hybrid in lb config gives you both Bios and UEFI boot options available.

Antonio Rizzo
Posts: 18
Joined: 2015-09-27 09:13
Been thanked: 5 times

Re: BIOS+EFI boot for ISO file

#5 Post by Antonio Rizzo »

Since the procedure used by Will Haley (https://willhaley.com/blog/custom-debia ... vironment/) is similar to mine, I followed that. I can confirm it WORKS. I successfully created an ISO file that can be started by BIOS and UEFI firmwares. The "nomodeset" kernel option had to be removed for VirtualBox to work. I didn't used live-build, though, so I cannot tell you which procedure is faster or better. However, thank you for your suggestions. Maybe I'll try live-build in the future.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: BIOS+EFI boot for ISO file

#6 Post by Head_on_a_Stick »

Antonio Rizzo wrote:Since the procedure used by Will Haley (https://willhaley.com/blog/custom-debia ... vironment/) is similar to mine, I followed that.
That is a nice guide but creating the same ISO with live-build would be considerably simpler.
deadbang

Post Reply