What exactly are ISO files?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: What exactly are ISO files?

Post by bzt »

scdbackup wrote:Hi,

the "hybrid" installation ISOs of GNU/Linux distros for x86 machines
are supposed to be put on USB stick by a simple run of dd or equivalent.
Just like mine. My dependency-free image creator creates bootable images with the BOOTBOOT loader that can be put on USB sticks by a simple run of dd or burnt on CDROMs/DVDs. That will boot on both BIOS and UEFI machines (and Raspberry Pi SD cards too).
scdbackup wrote:The larger distros are meanwhile capable of Secure Boot from ISO (at the
price that the word "Microsoft" appears about 100 times in the BOOTX64.EFI
and BOOTIA32.EFI programs).
If it were only that... You have to pay big money to Microsoft to sign your loader with their CA, otherwise your OS will be labelled as "unsecure" in front of the end-user. Which is outrageous. (And frankly completely useless, because advanced hackers and rootkits can install new certs in the UEFI db. But that's not a solution for hobby OS devers, unless you want your OS installer to be removed by anti-virus programs, labeling it as "unsecure" or even "malicious".)
scdbackup wrote:This fact cannot be washed away by holding up magic words like "legacy"
without regarding their context, or by predicting the future in newsflash
style.
Nobody said that. I only said and PoC'd that this can be achieved without legacy MBR partition hacks too, using only valid GPT tables with valid ESP partitions (which is guaranteed to be future-proof). You are relying on a feature that shouldn't work if firmware developers were use the spec strictly.
scdbackup wrote:Show released or officially announced specs which support your claim.
Show technical data about the firmware that does not boot an ISO with MBR
partition of type 0xEF and suitable software in it.
I did. No firmware should boot from, nor generate a BLOCK IO device for an MBR partition 0xEF if there's a GPT, 12.3.2 Partition Discovery.

Look, I've offered you my help to fix xorriso so that it can contain a valid GPT and ESP to boot without hacks. There's really nothing more I can say.

Cheers,
bzt
User avatar
eekee
Member
Member
Posts: 942
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: What exactly are ISO files?

Post by eekee »

Thanks for the definitions, bzt. I was not aware of the PMBR. VBR seems to be a rather odd thing, flexible in surprising ways, inflexible in equally surprising ways. Exclusion of a partition table makes it incompatible with logical partitions which are implemented as a singly-linked list of MBR-like partition tables. I'm aware some filesystems (XFS) are indeed incomaptible with logical partitions, but obviously FAT cannot be, so I'm wondering why it's applied as a blanket rule to the VBR definition?
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: What exactly are ISO files?

Post by bzt »

eekee wrote:Thanks for the definitions, bzt. I was not aware of the PMBR. VBR seems to be a rather odd thing, flexible in surprising ways, inflexible in equally surprising ways. Exclusion of a partition table makes it incompatible with logical partitions which are implemented as a singly-linked list of MBR-like partition tables. I'm aware some filesystems (XFS) are indeed incomaptible with logical partitions, but obviously FAT cannot be, so I'm wondering why it's applied as a blanket rule to the VBR definition?
These are not really definitions cut in stone, more like my explanations. What's sure, VBR stands for Volume Boot Record, which means the first sector of a volume (aka. file system). Everything else is circumvential (disk first or partition first sector, physical partition first, logical partition first etc.). Btw, all the MSDN docs call that VBR and wikipedia and all the other sites and blogs picked that up, that's the origin.

Cheers,
bzt
kaseiicy
Posts: 4
Joined: Wed Jul 08, 2020 7:12 am

Re: What exactly are ISO files?

Post by kaseiicy »

scdbackup wrote:Hi,

for ISOLINUX isohybrid from a partition instead of a base device see
https://wiki.syslinux.org/wiki/index.ph ... _selection

I am not aware whether GRUB would offer MBRs for that purpose. Its
official control program for making bootable ISOs offers no option for
preparing an ISO image for putting into a partition.


obivac wrote:
> what exactly do tools like Xorriso do that's different from just using dd

On the one hand xorriso packs up input files as payload of an ISO 9660
filesystem. On the other hand it advertises the block addresses and sizes
of boot image files in the ISO, which the computer firmware can use to
start an operating system. This advertisement is in form of El Torito
boot information
https://wiki.osdev.org/El-Torito
or of a partition table
https://wiki.osdev.org/EFI_System_Partition
or simply x86 machine code at the start of the ISO 9660 image.


bzt wrote:
> And here's my hybrid PMBR GPT/ISO9660 image creator: mkimg.c

Wow. That's much smaller than any other ISO 9660 producer i know of.
Although the opportunities to add payload seem extremely sparse. :))

You take the effort to produce a GPT. Do you know of EFI implementations
which would not boot from an MBR partition of type 0xef ?

(I ask because the GPT in ISOLINUX isohybrid for EFI is invalid and EFI
is supposed to boot via MBR partition table. For most Linux distro ISOs it
seems to work. So i preach for abandoning the GPT entirely.)

------------------------------------------------------------------------
Anectotes and nitpicking:

> Volume Boot Record (VBR): [...] the first sector of a file system volume
> [...] There's no partitioning table in it for sure.

Well, someone should have told this program "mformat", which places a
partition table inside its FAT image if called like in
http://git.savannah.gnu.org/cgit/grub.g ... cue.c#n812
Some antique EFI really took offense and cycled endlessly.


> the first 64k is not used at all

It's the first 32k of an ISO 9660 filesystem, to be exacting.
At offset 32k comes the PVD, which is kindof the superblock of ISO 9660.


Have a nice day :)

Thomas
Not the OP but dude that helped me alot! Thank you! =D> =D> =D>
Post Reply