Page 1 of 1
Booting from USB drive
Posted: Wed Jan 17, 2007 3:16 pm
by ddexterdd
I am trying to make a bootloader load off the USB drive. I can't find sample, lowlevel code anywhere that shows how to move data from or to the usb drive. Help!
Posted: Wed Jan 17, 2007 3:33 pm
by Candy
Strictly speaking, you need to cntrol the USB controller (EHCI, OHCI or UHCI), use the USB Storage spec for accessing the device, speak SCSI over that bus and use that to retrieve & store data without crashing the device or using a command it doesn't know.
Your BIOS can emulate this for you.
Posted: Thu Jan 18, 2007 5:55 pm
by pcmattman
Two things you have to do, both of which are reasonably easy.
Firstly, get the bootloader into the bootsector of the USB drive. This is easy with a program that can directly edit disk sectors and allow copying of the data in them. I use Hex Workshop, but you can use whatever you want.
Secondly, the BIOS has to support booting off a USB. New BIOSes (after about 2004-05) allow you to boot off a USB, so just go through the SETUP utility and look for a USB-boot option.
I hope this helps!