Re: Custom ISO won't boot to Fedora

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Sreyan Chakravarty wrote:
> I am kind of confused as to the difference/advantage between keeping the old
> boot image versus rebuilding one.

My first multi-session proposal was to keep as much of the boot equipment
as possible.
After all, we began with the riddle why your genisoimage produced ISO
boots to an ISOLINUX menu but that menu does not work. So "keep" seemed
to be better than "replay".


Boot equipment is a manifold topic, even if restricted to x86 machines.

Roughly there are "boot images", which are intervals of data blocks.
Either they are executable programs, like isolinux.bin, or they are
filesystem images like efiboot.img.

The firmware, PC-BIOS or EFI, expects easy-to-understand pointers to
the boot images. These pointers are stored in the El Torito boot sector
and El Torito boot catalog (for DVD), or as MBR boot code (for PC-BIOS
and USB stick), or as partition table (for EFI and USB stick).

As long as the boot images stay where they are in the original ISO, it is
ok to keep the pointers as they are.
The only problem you reported so far is that the quite unimportant
partition 1 did not grow with the ISO image when you added the new
session. The boot pointer in the partition table is partition 2, which
is marked as EFI System Partition.

Replaying all boot preparations bears more potential points of failure.
xorriso could misunderstand the boot equipment of the original ISO or it
could make mistakes when trying to re-create it.
But if it works correctly, it will re-create partition 1 with the new
size of the ISO. So no part of the ISO filesystem lies outside of it
and GNOME Disks will be happy when it tries to mount partition 1.


> Secondly,
> >        -compliance no_emul_toc \ 
> Why aren't you keeping a Table of Contents ? Aren't they required for
> compatibility reasons ?

It's for getting an ISO image with no extra multi-session history.
The original ISO doesn't have that history either.

Multi-session is actually a feature of sequential optical media:
CD-R, CD-RW, DVD-R, DVD+R, BD-R, unformatted DVD-RW. With these media
the Linux convention is to mount the first track of the last session.
This track can be found by the medium's Table-Of-Content which tells
start addresses of sessions and tracks.
Each of the listed sessions can be mounted by Linux mount option sbsector=
and will show the disk state from the time when it was the last session.
Quite useful for incremental multi-session backups.

Overwritable media (DVD-RAM, DVD+RW, BD-RE, formatted DVD-RW) and data
files do not have such a table of content. Linux by default mounts what
it finds at the usual offset starting from block 0.
ISO 9660 multi-session on such media and files thus has to overwrite the
old superblock at this standard location by new content which points to
the root directory of the newest session. (Invention of Andy Polyakov for
his program growisofs with DVD+RW.)

By this overwriting of the superblock, the old root directory becomes
lost in the woods. It is still there and still could be mounted. But no
superblock points to it. So only one session is to see. The newest.

That's the reason for my invention of emulated table of content.
The first session does not get written to block 0 but rather to block 32.
This leaves room for an official superblock at block 0 and thus saves
the superblock of the first session from being overwritten by session 2.
Now the superblocks of the sessions form a chain, which xorriso command
-toc can display.
This offset 32 of the new session gets disabled by -compliance no_emul_toc.
As said, because mkisofs does not do it and thus xorrisofs doesn't either
by default.
But xorriso would do it by default. And the new ISO would differ in this
way from the old one more than is necessary.


For a motivation of xorriso's default see one of my backup BD-REs which
i update daily by a xorriso run with -update_r commands:

  $ xorriso -indev /dev/sr4 -toc
  ...
  Media current: BD-RE
  Media status : is written , is appendable
  Media summary: 138 sessions, 9405258 data blocks, 17.9g data, 5236m free
  ...
  TOC layout   : Idx ,  sbsector ,       Size , Volume Id
  ISO session  :   1 ,        32 ,   2112020s , HOME_2019_11_24_152510
  ISO session  :   2 ,   2112064 ,     68114s , HOME_2019_11_25_160120
  ISO session  :   3 ,   2180192 ,     77406s , HOME_2019_11_26_154114
  ...
  ISO session  : 136 ,   9255008 ,     55002s , HOME_2020_04_07_181157
  ISO session  : 137 ,   9310016 ,     47622s , HOME_2020_04_08_150526
  ISO session  : 138 ,   9357664 ,     49682s , HOME_2020_04_09_155619

If needed i can mount any of these daily backup states by the number
in the "sbsector" column. xorriso offers a helper command to mount by
session number or a search text for the volume id.

On a BD-R with its hardware table of content, i see without such emulation
effort:

  Media current: BD-R sequential recording
  Media status : is written , is appendable
  Media summary: 55 sessions, 4935104 data blocks, 9639m data, 13.9g free
  ...
  TOC layout   : Idx ,  sbsector ,       Size , Volume Id
  ISO session  :   1 ,         0 ,   2112619s , HOME_2020_02_15_121306
  ISO session  :   2 ,   2112800 ,     44925s , HOME_2020_02_16_110515
  ...
  ISO session  :  55 ,   4885696 ,     49252s , HOME_2020_04_09_111237

The only visible difference is that session 1 starts at block 0.
On hardware level, BD-RE and BD-R differ much more.


Have a nice day :)

Thomas
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux