LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 06-14-2010, 04:16 PM   #1
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 779

Rep: Reputation: 67
Some technical points about booting from CDs and USB sticks


Hi guys,

I can't seem to find comprehensive and/or up-to-date answers to these questions from searches, so I'll try to explain as clearly as possible here and rephrase for utmost clarity.

When first a regular HDD boots up, the BIOS passes control over to the first 512 bytes of the disk, so long as the disk has the magic number (correct signature) at the end of this first sector. The BIOS doesn't 'care' what is in this first sector; it just passes control over to the code within it and hopefully boot-up is underway. Other boot instructions may commonly lay elsewhere on the disk, which is fine, since the boot sector code will point to them and the process goes on.

Now, what happens when you boot from a CD or a USB stick? Not quite the same thing happens, does it?

What I need to know is, when booting from alternative media, what is the BIOS 'looking for' and whereabouts on these new media does it expect to find the boot code? I've looked at the directory structures of CDs and sticks and there doesn't seem to be any common factor in the files and directories there that I can identify, unlike when I examine a regular HDD and its partitions with a hex editor.

Can someone please clue me up? What's the deal here?

THanks.

CC.

Last edited by Completely Clueless; 06-14-2010 at 04:17 PM.
 
Old 06-14-2010, 05:39 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,863

Rep: Reputation: 739Reputation: 739Reputation: 739Reputation: 739Reputation: 739Reputation: 739Reputation: 739
Here is a starting point for bootable CDs.
http://en.wikipedia.org/wiki/El_Tori...-ROM_standard))

Last edited by michaelk; 06-14-2010 at 05:43 PM.
 
Old 06-14-2010, 07:51 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 11,406

Rep: Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397
The cd can only be a bootable device if we already have extended bios support. It was never part of the original x86 design. As above there are a few ways a cd can be made to be bootable within bios support. One is el-torito as above there is a lot of info on the wiki page. Another is http://syslinux.zytor.com/wiki/index.php/ISOLINUX All of them require extended bios support or some other bootable media that teaches the system how to use cd or usb.


USB is kind of similar but bios has the ability to "see" a usb (in some bios's) the usb device as a real hard drive. It can also see them as zip devices or even floppies.

What you need to know is how your bios works to extend it's original function from the original x86 design.

Last edited by jefro; 06-14-2010 at 07:56 PM.
 
Old 06-15-2010, 09:38 AM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,305

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
As has been mentioned, there;s a few ways to boot elsewhere than hd
1. grub entry - in which case the boot is the hd and the files are elsewhere
2. Floppy and El-Torito which look at boot sectors.
3. Various other devices, usually initiated by the bios, effectively a non standard boot order.

If they don't look at the boot sector of this other device(e.g. usb), and don't have a grub line, what do you think the bios is actually doing? You are better imho looking for the api which will be a boring document somewhere (perhaps even intel.com. CD booting came a long time (relatively speaking) before usb booting, so
 
Old 06-15-2010, 01:06 PM   #5
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 779

Original Poster
Rep: Reputation: 67
OK guys,thanks, all noted. Before I delve into the resources y'all have been kind enough to post, just one final dumb question...

When I download an image file of a live CD distro, it is typically a single file of just under 700Mb.

If I simply copy this single file onto a blank CD, it can't boot, can it? But the checksums should be the same, yes?

Now say I burn the original, downloaded file to a blank CD as an .iso image instead. This time I get a CD which typically has a bootable, multi-level directory tree structure on it, yes?

Yet in both cases, the checksums of the burned CDs will match the checksum of the source file? Seems a bit odd...

CC.
 
Old 06-15-2010, 03:14 PM   #6
jefro
Guru
 
Registered: Mar 2008
Posts: 11,406

Rep: Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397
The design of the cd standard does have to have data on an exact area of the cd, the iso standard does replicate that.
 
  


Reply

Tags
age, old


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
pimp usb sticks mecelec415 Linux - Desktop 6 01-29-2010 07:33 AM
6.10 install sticks at setting mount points fopetesl Ubuntu 4 01-09-2007 02:00 AM
[B]Free Limited 10GB in DVDs/CDs Linux Technical Resource Kit[/B] aherm Linux - Distributions 1 07-08-2004 09:05 AM
USB memory sticks island_dude Linux - Hardware 1 01-20-2004 11:16 AM
multiple mount points for cds lavoisier Mandriva 2 10-22-2003 06:59 AM


All times are GMT -5. The time now is 06:38 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration