Page 1 of 1
Boot Sector on Flash Sometimes Detecting as HDD and not FDD
Posted: Sat Jan 03, 2015 4:42 pm
by kemosparc
Hi,
I have followed the baby step 2 at
http://wiki.osdev.org/Babystep2 listed on the tutorial page of osdev.
I compiled the code using :
and then wrote it to a USB device using the dd command:
When I use the USB to boot, sometimes the BIOS recognizes the USB as FDD and some times as HDD. When the USB is recognized as HDD it does not boot. I tried this on a lenovo thinkpad x220 which has both USB-FDD and USB-HDD in its boot list and the USB-FDD has a higher priority, when I press F12 the USB shows up as USB-HDD.
Thanks,
Karim.
Re: Boot Sector on Flash Sometimes Detecting as HDD and not
Posted: Sun Jan 04, 2015 1:15 am
by Antti
If you look at the binary layout of the first 512 bytes, there is neither a
BPB nor a partition table (
MBR).
The BIOS does not know how it should handle it.
Re: Boot Sector on Flash Sometimes Detecting as HDD and not
Posted: Sun Jan 04, 2015 1:47 am
by kemosparc
Hi,
So you mean it is up to the BIOS, and that is why some BIOS will detect it and some others will not.
So to make sure I understand, if I add the FAT12 BPB to my boot sector and copied it to a flash it should work and detect the FLASH as USB-FDD, right?
Thanks,
Karim.
Re: Boot Sector on Flash Sometimes Detecting as HDD and not
Posted: Sun Jan 04, 2015 1:59 am
by Antti
kemosparc wrote:if I add the FAT12 BPB to my boot sector and copied it to a flash it should work and detect the FLASH as USB-FDD, right?
There is no warranty. It depends on the BIOS implementation. Having a valid "floppy-like" structure just makes it more likely.
Re: Boot Sector on Flash Sometimes Detecting as HDD and not
Posted: Sun Jan 04, 2015 4:02 am
by digo_rp
This in some cases can be changed in the bios usb device emulation. Like fdd hdd optical, etc. Try to take a look at bios and find it.
i hope this helps.
Good luck.
Re: Boot Sector on Flash Sometimes Detecting as HDD and not
Posted: Sun Jan 04, 2015 4:09 am
by kemosparc
Hi,
Actually the only think that I can do is to add them to the boot list. But the USB type isdetected at boot time and the type is selected and displayed accordingly.
Thanks
Karim.
Re: Boot Sector on Flash Sometimes Detecting as HDD and not
Posted: Fri Jan 09, 2015 10:03 am
by Muazzam
If there is BIOS Parameter Block in first sector of USB drive, BIOS usually detects it as Floppy otherwise as a Hard disk.