OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Apr 26, 2017 4:02 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Any El Torito walkthroughs or comprehensive docs?
PostPosted: Thu Jan 29, 2009 2:33 pm 
Offline
Member
Member
User avatar

Joined: Thu Jan 15, 2009 2:21 pm
Posts: 33
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.


Top
 Profile  
 
 Post subject: Re: Any El Torito walkthroughs or comprehensive docs?
PostPosted: Thu Jan 29, 2009 3:03 pm 
Offline
Member
Member

Joined: Mon Mar 24, 2008 1:46 pm
Posts: 98
this works, and use the grub package at the bottom to get stage2_ElTorito
http://wiki.osdev.org/Bootable_El-Torit ... RUB_Legacy


Top
 Profile  
 
 Post subject: Re: Any El Torito walkthroughs or comprehensive docs?
PostPosted: Thu Jan 29, 2009 3:47 pm 
Offline
Member
Member
User avatar

Joined: Thu Jan 15, 2009 2:21 pm
Posts: 33
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.


Top
 Profile  
 
 Post subject: Re: Any El Torito walkthroughs or comprehensive docs?
PostPosted: Thu Jan 29, 2009 10:07 pm 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 7824
Location: At his keyboard!
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

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: Any El Torito walkthroughs or comprehensive docs?
PostPosted: Fri Jan 30, 2009 1:47 pm 
Offline
Member
Member
User avatar

Joined: Thu Jan 15, 2009 2:21 pm
Posts: 33
Yes I am also using nasm to assemble the iso image. The extra info in your code will come in handy im sure. Thanks.


Top
 Profile  
 
 Post subject: Re: Any El Torito walkthroughs or comprehensive docs?
PostPosted: Mon Jul 07, 2014 10:16 am 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 964
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.

_________________
Project: OZone
Source: GitHub
Current Task: EHCI Controller

"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group