User:Scdbackup: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
Content deleted Content added
Updated date line
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
My name is Thomas Schmitt, <scdbackup@gmx.net>.
== Testing my proposal for a new [[El-Torito]] article. ==


I am developer of free software for producing [[ISO 9660]] filesystems
After trying to apply smaller changes i decided to propose a
and for operating [[Optical_Drive|optical drives]] with CD, DVD, or BD media.
re-write of large parts of the text.
Available as three libraries from
[http://libburnia-project.org/ Libburnia project]
or as all-in-one source tarball [http://www.gnu.org/software/xorriso/ GNU xorriso].


The former are intended for distro packagers, the latter is intended
---------------------------------------------------------------
for users who do not necessarily have sysadmin privileges.
---------------------------------------------------------------
---------------------------------------------------------------


My reason to get an account here was to re-furbish the articles
El-Torito is a standard for creating bootable optical media
about [[ISO 9660]], [[El-Torito]], and [[Mkisofs|mkisofs compatible programs]].
like CD-ROMs, DVD, or BD. It is an add-on to the [[ISO 9660]]
Further i attached a new article [[Optical_Drive]] to article [[ATAPI]],
filesystem.
in order to encourage OS developers to care for CD drivers and burn programs.


[[User:Scdbackup|Scdbackup]] 20:22, 13 November 2021 (CEST)
El-Torito describes different ways of booting from an optical medium.
The starting point can either be an emulated floppy drive, an
emulated hard disk, or a plain block address in the ISO filesystem.

Oldfashioned ways of boot preparations are described in
the articles about [[Bootable CD|bootable CD emulated as a floppy drive]]
and about [[Bootable El-Torito CD with GRUB Legacy|
bootable CD using no emulation (via GRUB legacy)]].

More modern ways are no-emulation setups as made by
[http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD_002dROM.html GRUB2 script grub-mkrescue]
or as described by the
[http://www.syslinux.org/wiki/index.php/ISOLINUX ISOLINUX wiki]
of the
[http://www.syslinux.org/wiki/index.php/The_Syslinux_Project Syslinux project].

== Document Scope ==
The intention of this document is to explain what you need to know
from the El-Torito standard to create a bootable CD with your own
boot image. Details about the options for ISO 9660 image production
can be found on the [[Mkisofs]] page.

== El Torito Structure ==
El Torito booting begins by the Boot Record of the ISO 9660
filesystem at block address 0x11. See also article [[ISO 9660]].
This Boot Record points to a Boot Catalog which is stored
in one or more blocks inside the ISO 9660 filesystem.

The content of Boot Record and Boot Catalog is created during
filesystem production by the ISO 9660 producing software.

The Boot Catalog lists the available boot images which may be
prepared for multiple system architectures, called "platforms".
These images are marked either as emulated floppies, or as
emulated hard disks, or as no-emulation images.
In any case they are the first stage in the boot process
where custom code from the ISO filesystem can be executed.

While the emulated boot images are to be interpreted
by the firmware as is supposed for floppies and hard disks,
the no-emulation boot images are on their own.

PC-[[BIOS]] reads from the Boot Catalog the number of
blocks to load, loads them (usually to segment 07c0) and then
executes them as code. As with a normal floppy or hard disk,
the DL register contains the BIOS drive number.

[[EFI]] interprets the boot image as [[FAT]] filesystem and
looks up a standardized file path for further processing.

The original El Torito specification mentions platforms
"80x86", "PowerPC", and "Mac".
Boot setups based on GRUB2 and ISOLINUX use "80x86" for PC-BIOS,
and a platform id 0xef for (U)EFI which is not listed in the
old specs.

=== Creating the Structure in the ISO filesystem ===
The following text assumes that the ISO 9660 producing software is
compatible to [[Mkisofs]]. E.g. mkisofs, genisoimage, or xorrisofs.

[[Mkisofs]] expects that the boot images are submitted as
data files like any other file in the emerging ISO 9660
filesystem. Normally they are part of the directory trees
which get copied into the filesystem.

In most cases the Boot Catalog is represented in the filesystem
as data file, too. Its content is nevertheless composed by
[[Mkisofs]].

The boot images of ISOLINUX and GRUB2 expect to contain
some information about the ISO filesystem and their own
location and length. This information is called Boot Info Table
and gets inserted by [[Mkisofs]], if desired.
Boot Info Table is not specified by El Torito, but is rather
a convention introduced by boot loader developers.


=== Example of ISO Filesystem Production Run For BIOS ===
Put all necessary directories and files underneath directory
./prepared_for_iso . It will be copied as root directory of
the ISO filesystem. Especially make the boot image for PC-BIOS
available at path ./prepared_for_iso/boot/loader.sys ,
so that it will appear in the ISO filesystem as /boot/loader.sys .

Choose an ISO 9660 producing program and eventually its
mkisofs emulation command:
<Source lang=bash>
prog="mkisofs"
</Source>
or
<Source lang=bash>
prog="genisoimage"
</Source>
or
<Source lang=bash>
prog="xorriso -as mkisofs"
</Source>

Produce ISO 9660 filesystem image ./bootable.iso
<Source lang=bash>
$prog -R -J -c boot/bootcat \
-b boot/loader.sys -no-emul-boot -boot-load-size 4 \
-o ./bootable.iso ./prepared_for_iso
</Source>

'''-c boot/bootcat''' - Makes the Boot Catalog accessible as
data file.

'''-b boot/loader.sys -no-emul-boot''' - Causes /boot/loader.sys
to be listed in the emerging Boot Catalog as no-emulation
boot image for PC-BIOS.

'''-boot-load-size 4''' - Specifies the number of 512-bytes sectors
to load. Four 512-byte sectors (2048 bytes) is one CD sector
and is the number supported by most BIOS.

If your boot image needs updating of a Boot Info Table,
then add option '''-boot-info-table''' after -boot-load-size 4.

After this production run, the emerged data file
./bootable.iso can be burned onto optical media.

=== Hybrid Setup for BIOS and EFI from CD/DVD and USB stick ===

Latest revision as of 19:24, 13 November 2021

My name is Thomas Schmitt, <scdbackup@gmx.net>.

I am developer of free software for producing ISO 9660 filesystems and for operating optical drives with CD, DVD, or BD media. Available as three libraries from Libburnia project or as all-in-one source tarball GNU xorriso.

The former are intended for distro packagers, the latter is intended for users who do not necessarily have sysadmin privileges.

My reason to get an account here was to re-furbish the articles about ISO 9660, El-Torito, and mkisofs compatible programs. Further i attached a new article Optical_Drive to article ATAPI, in order to encourage OS developers to care for CD drivers and burn programs.

Scdbackup 20:22, 13 November 2021 (CEST)