[svlug] "dd" first CD image to USB pendrive for booting?

Seth David Schoen schoen at loyalty.org
Mon Dec 11 11:33:19 PST 2006


Bill-Schoolcraft writes:

> Hello Family,
> 
> On various flavors of Linux, there is NFS install option(s), on
> CentOS/RHEL* it consists of the boot arg of:
> 
> 	linux text askmethod
> 
> And when I use SuSE it consists of using their "mini-network" iso image.
> 
> I purchased two SandDisk 1-gig "Cruzer" drives this weekend and they
> came with a fat32 filesystem and my objective is just to have the USB
> pendrive "act" (or become) the first iso install image of the above
> examples.
> 
> I have tried a few things on a server that works fine with a standard
> USB_CDROM and have received "No operating system found..." etc.
> 
> What I have tried is the following:
> 
> (A) dd'd the first iso right on top of /dev/sda (the pendrive). That
> idea came from the days of dd'ing a floopy image on top of /dev/fd0
> 
> (B) created /dev/sda1 on the pendrive, dd'd the image there, made it
> bootable and nada...

Hi Bill,

Historically the boot methods for hard drive-like devices (including USB
drives) are different from the boot methods for CD-like devices (including
DVDs).  Hard-drive-like devices normally boot from a boot sector right
at the beginning of the disk, whereas CDs (on PCs) normally use the El
Torito standard.

http://en.wikipedia.org/wiki/El_Torito_%28CD-ROM_standard%29

Hard drive boot sectors and El Torito are not compatible, so you
normally can't copy bootable ISO images onto hard drives (or vice
versa).  This is extremely annoying.  You didn't do anything wrong,
it's just that the BIOS is looking for a different kind of boot
image depending on what physical medium you're booting from!  One
of the most obvious distinctions is that the El Torito emulation
images, unlike hard drive boot sectors, don't start at the first byte
of the boot device.

You might be able to use LILO or GRUB to boot a kernel from the USB
drive and then tell it to mount an ISO9660 filesystem from that same
drive as the root filesystem.  In LNX-BBC, there was an experimental
USB pen drive version (note: different from the regular ISO9660
version because of the difference in boot sector formats I mentioned
above!); if you can get the code from Paul Gray or Nate Riffe, it
might give you some hints about how to go about adapting a CD boot
disk to run from a USB drive.  It's possible that code will have to
be modified in several places (for example, the list of devices that
the initial RAM disk, if any, uses to search for the root filesystem
to mount).

It's extremely annoying that people have to go through this rigamarole.
I hear that the boot environments on non-PC systems (for example,
using Open Firmware) are a little bit more sane and consistent across
different types of boot media.

-- 
Seth David Schoen <schoen at loyalty.org> | This is a new focus for the security
     http://www.loyalty.org/~schoen/   | community. The actual user of the PC
     http://vitanuova.loyalty.org/     | [...] is the enemy.
                                       |          -- David Aucsmith, IDF 1999




More information about the Svlug mailing list