OSDev.org
https://forum.osdev.org/

Any El Torito walkthroughs or comprehensive docs?
https://forum.osdev.org/viewtopic.php?f=1&t=19050
Page 1 of 1

Author:  abachler [ Thu Jan 29, 2009 2:33 pm ]
Post subject:  Any El Torito walkthroughs or comprehensive docs?

I've looked around at various ISO-9660 docs, but every one seems to be missing key details about the encodings. So I was wondering if there is a walkthrough for putting together an ISO-9660 bootable CD at the hex level, not one that uses other utilities. So far I've looked at these -

http://odin.himinbi.org/xp_cds/eltorito_extraction.html
http://en.wikipedia.org/wiki/ISO_9660#I ... ifications
http://alumnus.caltech.edu/~pje/iso9660.html
http://users.telenet.be/it3.consultants ... O9960.html
http://www.mscience.com/logical.html
http://www.ecma-international.org/publi ... ma-119.pdf

and while they give good info, and combined probably provide all the information I will need, I was looking for something more like a tutorial specifc to writing a bootable CD.

Author:  itisiuk [ Thu Jan 29, 2009 3:03 pm ]
Post subject:  Re: Any El Torito walkthroughs or comprehensive docs?

this works, and use the grub package at the bottom to get stage2_ElTorito
http://wiki.osdev.org/Bootable_El-Torit ... RUB_Legacy

Author:  abachler [ Thu Jan 29, 2009 3:47 pm ]
Post subject:  Re: Any El Torito walkthroughs or comprehensive docs?

itisiuk wrote:
this works, and use the grub package at the bottom to get stage2_ElTorito
http://wiki.osdev.org/Bootable_El-Torit ... RUB_Legacy


I appreciate the link, but I am specifically looking for documentation to create my own el torito boot disk, i.e. 'not one that uses other utilities', or one that is pre-rolled.

Author:  Brendan [ Thu Jan 29, 2009 10:07 pm ]
Post subject:  Re: Any El Torito walkthroughs or comprehensive docs?

Hi,

You should only really need the ISO9660 specification (which you've already listed) and the El Torito specification. Apart from that, it's a good idea to get a hexdump of an existing bootable CD (doesn't matter which one) because some of the fields aren't described well in either specification.

You could also use my code as an example; although I should mention I've only tested booting it in Bochs (to test if it'll boot), and mounting it as a loopback device (to test if the ISO9660 file-system is sane). Note: my code uses NASM to generate a bootable CD image, so i'ts not quite "hex level" and a utility is involved.... ;)


Cheers,

Brendan

Author:  abachler [ Fri Jan 30, 2009 1:47 pm ]
Post subject:  Re: Any El Torito walkthroughs or comprehensive docs?

Yes I am also using nasm to assemble the iso image. The extra info in your code will come in handy im sure. Thanks.

Author:  SpyderTL [ Mon Jul 07, 2014 10:16 am ]
Post subject:  Re: Any El Torito walkthroughs or comprehensive docs?

The ISO 9660 wiki page on OSDev describes the descriptor tables pretty well (http://wiki.osdev.org/ISO_9660), but it only mentions the boot descriptor. (I'll update the wiki page when I get a second.) However, the boot descriptor just tells you what boot specification is used, and where the actual boot information is located.

Code:
ISO 9660 Boot Record Descriptor
char[32] BootSystemID   // ASCII encoded.  For El Torito, it should be "EL TORITO SPECIFICATION" followed by nine zeros.
byte[32] Reserved
int32 BootCatalogBlock  // The physical block where the El Torito boot information is located.
byte[1973] Reserved

Using the BootCatalogBlock value to find the location of the El Torito boot information, you will find the following sequence of tables:
Code:
El Torito Validation Entry
byte Header ID
byte Platform ID
byte[2] Reserved
char[24] ID   // ASCI Encoded
int16 Checksum
byte Key1
byte Key2

El Torito Default Entry
byte BootIndicator
byte BootMediaType
int16 LoadSegment
byte SystemType
byte Reserved
int16 SectorCount   // The number of 2048 byte blocks to load
int32 FirstBlock  // The starting block of the boot loader
byte[20] Reserved

El Torito Boot Section Header Entry (multiple)
byte HeaderIndicator  // Zero for terminating entry
byte PlatformID
int16 SectionCount  // The number of section entries following this header
char[30] SectionID  // ASCII encoded

El Torito Boot Section Entry
byte BootIndicator
byte BootMediaType  // Contains flag (bit 5) denoting that this entry is followed by one or more extension entries
int16 LoadSegment
byte SystemType
byte Reserved
int16 SectorCount
int32 FirstBlock
byte SectionCriteriaType
byte[5] Reserved

El Torito Boot Section Extension Entry
byte ExtensionIndicator
byte Flags  // Contains flag (bit 5) denoting that this entry is followed by another extension entry
byte[30] SelectionCriteria


This should give you enough information to get you started creating a bootable ISO image (or reading one). I will update the Wiki to include this information shortly.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/