Iso structure for usb&CD uefi&BIOS booting

For discussions about programming, and for programming questions and advice


Moderator: Forum moderators

Post Reply
User avatar
greengeek
Posts: 1209
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 346 times
Been thanked: 146 times

Iso structure for usb&CD uefi&BIOS booting

Post by greengeek »

I have placed this in the programming section so i don't create an untidy thread in the Users subsection - as this question may not actually be answerable and appears a bit complex.

EDIT : Most of the big Linuxes (Ubuntu, Mint, Debian etc etc) release their distros as packages that consume more than 1GB - ie they will not fit on a CD. However - puppy is different in that our releases are supposed to be small enough to fit on (and boot from) a CD.
This brings challenges when trying to build CD bootable puppys to run on both BIOS and UEFI hardware. Maybe Puppy is the only distro that is small enough to boot from CD but big enough to need compatibility for uefi boot too...

But are the increasing problems with booting multi-compatible 32bit/64bt/bios/uefi puppies over the last few years proving to be an insurmountable hurdle? What does it actually take to build a multi-compatible iso file?

Background:
I am making a 32bit puppy for a 32bit machine (Dell Inspiron 1545) and need to produce an iso that can be used as a base for a bootable USB stick and a bootable CD. I am mostly using tahr32 and xenial32 for these trials.

I have finally achieved this but encountered all kinds of weirdness along the way.

sfs not found...
sfs not found...
sfs not found...
flashing cursor...
sfs not found...
flashing cursor...
flashing cursor...
Aaaarrrgh!!!!

I had very few such problems in the old days. It seems to be more recent pups (with multiple xdrvs) are more sensitive. And maybe the initrd.gz structure is not correct?

When i started on this project I could easily make an iso that could be used to make a bootable usb stick - but when I eventually went to burn it to CD the result would boot other machines but not the Dell.

I got that problem sorted by replacing the initrd.gz (!) in the puppy files and also by replacing the dir-to-iso function in the host puppy that i was using to build the iso. (But why the heck i should have to replace such significant files to get it to work makes me wonder what is going on...).

But the resulting iso i ended up with could boot pretty much all of my machines either via CD or when extracted for usb boot -including the sensitive Dell.

**** Except that no iso that i build is capable of booting my uefi capable Acer Travelmate E11 from CD ***
(I can make a bootable usb stick for this machine no problem...)

So i started researching what it takes to build an iso that can boot both BIOS machine, and UEFI machine, either when burned to CD or when extracted to usb stick (the way we normally do with copying the puppy sfs files etc...) but it sounds as if it cannot be done (or at least not predictably).

I thought - surely this must be straightforward: Radky's Dpup Stretch manages it fine.

But the more i researched the more i discovered that some pups can create isos that are only good for CD booting. Some pups create isos that are only good for usb stick booting. Some pups make good isos for BIOS machines. And some pups make isos that suit uefi machines.

But i feel that nobody has standardised how a puppy should create an iso so that it answers all of these needs. My Googling suggested that "isohybrid" should cure these problems - but i found an article that suggests these issues are still not solved even with isohybrid:

https://mjg59.dreamwidth.org/4957.html

I tried what i thought was a simple test: I took a Radky Dpup Sretch CD - booted my uefi Acer E11 with it - copied the CD contents to a new directory in /root, then used Packit to create an iso from those contents - expecting that it would behave the same as the original CD. But nope - that new CD will not boot the Acer E11 that i burnt it on - even though it will boot all of my BIOS machines (including the Dell).

Anyway - i am sick of pulling my hair out and am hoping someone can point me to a tutorial that specifies exactly what to do to build an iso that fulfils all of our puppyland needs.

Seriously - what does it take to build a working iso? What's the method??
Last edited by greengeek on Mon Sep 28, 2020 5:25 am, edited 2 times in total.
User avatar
foxpup
Posts: 186
Joined: Fri Jul 24, 2020 1:23 pm
Location: Europe near the Northsea
Has thanked: 75 times
Been thanked: 32 times

Re: Iso structure for usb&CD uefi&BIOS booting

Post by foxpup »

Have you looked in woof-CE?
User avatar
greengeek
Posts: 1209
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 346 times
Been thanked: 146 times

Re: Iso structure for usb&CD uefi&BIOS booting

Post by greengeek »

Hi Foxpup - where would i go to look at woof-ce? Do you mean github?
Cheers!
jamesbond
Posts: 561
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 80 times
Been thanked: 300 times

Re: Iso structure for usb&CD uefi&BIOS booting

Post by jamesbond »

greengeek wrote: Sat Sep 26, 2020 11:07 pm Seriously - what does it take to build a working iso? What's the method??
Building an UEFI-capable ISO requires:
a) EFI bootloader image
b) tools that can support making UEFI-capable ISO, and
c) some special flags you pass to said tools to tell it to make UEFI-capable ISO.

(a) is available from any UEFI-capable Puppies. The name of the file is efiboot.img.
(b) is either xorriso, or mkisofs from cdrtools (not the fake mkisofs or "genisoimage" from cdrkit)
(c) depends on whether you use xorriso or mkisofs.

(a) and (b) are easy to get, and (c) is just a one liner, so just ask one of the many Puppy builders about it. Don't bother to look at Woof-CE, it has so many other things you'll quickly get overwhelmed and lost the tree for the forest.
User avatar
greengeek
Posts: 1209
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 346 times
Been thanked: 146 times

Re: Iso structure for usb&CD uefi&BIOS booting

Post by greengeek »

jamesbond wrote: Mon Sep 28, 2020 3:58 pm Building an UEFI-capable ISO requires:.....
Thank you very much for the reply. I see that the iso for Fatdog and also for Radky's Dpup Stretch have a different structure to the other iso's i have been looking at - such as Tahr-uefi, Xenial-uefi and UpupBB-uefi - and i wonder if those other "uefi" capable iso's are actually built correctly?

I have been trialling a number of "uefi" capable 32bit pups recently and get weird results when i try to use them to re-create (or modify) a copy of the original iso (booted from CD).

If you have time to look at my other post here i would be interested in any comments you may have about my method.

Many thanks!
jamesbond
Posts: 561
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 80 times
Been thanked: 300 times

Re: Iso structure for usb&CD uefi&BIOS booting

Post by jamesbond »

greengeek wrote: Tue Sep 29, 2020 6:53 am If you have time to look at my other post here i would be interested in any comments you may have about my method.
I just did.
User avatar
greengeek
Posts: 1209
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 346 times
Been thanked: 146 times

Re: Iso structure for usb&CD uefi&BIOS booting

Post by greengeek »

Thanks jamesbond - i very much appreciate you taking the time to assess this and thanks for your comments in the other thread.

Definitely will rely on Packit for iso building.

Cheers!
User avatar
8Geee
Posts: 376
Joined: Wed Jul 29, 2020 10:52 pm
Location: N.E. USA
Has thanked: 17 times
Been thanked: 54 times

Re: Iso structure for usb&CD uefi&BIOS booting

Post by 8Geee »

Hmmmm...

I've had a look into this, and there are differences. SYSLINUX cannot load UEFI bioses.
Have a look here.

Looks like GNUGRUB and LILO bridge both EFI and UEFI. Note the Yes/No or No/Yes of popular others.
It may be that you need a 'compatible loader'. It may be there is a call to WinBootMgr.

JMHObservations
8Geee

Money talks... no, it shouts, so that it doesn't have to hear common sense.

User avatar
foxpup
Posts: 186
Joined: Fri Jul 24, 2020 1:23 pm
Location: Europe near the Northsea
Has thanked: 75 times
Been thanked: 32 times

Re: Iso structure for usb&CD uefi&BIOS booting

Post by foxpup »

greengeek wrote: Mon Sep 28, 2020 5:28 am Hi Foxpup - where would i go to look at woof-ce? Do you mean github?
Cheers!
Yes, I meant woof-CE on github.
remasterpup or remasterpup2 in every Puppy also makes a bootable iso.
Maybe this script can inspire you.

I think you are expanding your question towards bootloaders for UEFI.
The 2 main ones I know of are grub2 and rEFInd (EFI only). I didn't know about LILO.
Any way, the module/bootloader for legacy boot and for EFI boot are not the same.
So grub2 has at least 2 modules, 1 for legacy and 1 for EFI. But they can share the same config.
I often setup an usb with frugal installed Puppys, grub4dos for legacy boot and grub2 for EFI boot.
(I still prefer grub4dos for legacy boot, even if it means having an additional config file (menu.lst). :-) )
Post Reply

Return to “Programming”