dex >>OS Dev >>Booting a OS from a USB flash drive
Dex- 10-05-2005
Booting a OS from a USB flash drive I have put this in this part of the forum as it also applies to other OS.
I tyred to boot Dex4u from a usb pen drive, i got it to work, but there was things that made it not a good choice.
This is the drive in ? : http://www.integralmemory.com/product_categ.aspx?prid=5
It has two partions 1 a fdd and 1 a hdd emulation, i thought this would make it easier to boot.
I made a selfextracting floppy image with winimage, like you would for putting on a floppy, this has the option to write it to a removeable drive, which i did, i used xp with the flash drive in it came up as two drives a B: drive and a F: i extracted the image (which was a Dex4u image) to the B: , it reported no errors.
I then set two of my pc to boot from usb drives, on booting it printed "NF" ,which is what the bootloader prints if it can not find the file "kernel32.exe" this is probably because it's hard coded to the A: drive and may need changing to the B: ???.
Anyway i then tryed with a freedos image, but it just printed freedos and stoped, next i tryed it with a m$ dos image with the kernel32.exe also on the disk, this booted OK and came up as the A: drive :?, any way from there i could run Dex4u by running kernel32, but i could not access any file on the usb drive from Dex4u ( this is what i thought would happen ).
And thats as far as i have got, next i will make a hdd image of Dex4u and try that.
Josea- 03-27-2008
I don't remember where I read this, but when the bios loads the boot sector it also sets a certain flag (or flags) which indicate which drive the boot sector was found in. Then it gives control to the boot image. The boot program can then test this flag (or flags) to see where it would get the kernal (or rest of the boot if it don't fit within the boot sector).
Modern bioses which support booting from usb drive probably have something similar.
Hope this helps.
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.