You are not logged in.

#1 2015-11-05 17:29:21

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Force BIOS to recognize lfash drive as usb-hdd, not usb-key

I have a 16GB flash drive that I want to boot from, and it has multiple partitions because it boots Linux, Windows, and Mac. My laptop sees it as a USB Hard Drive and boots it just fine, but my desktop and my friend's desktop both see it as a USB Key, and so, fail to boot it. Even though my motherboard fully supports booting from a usb-hdd. My desktop's motherboard is an MSI X99A SLI Plus if that helps. I don't know what my friend's motherboard is. Is there a really surefire way to FORCE my BIOS to see it has a hard drive? Even if I have to change something in my BIOS and live with other BIOSes, like my friend's, still not playing nice, I'm OK with that.

Offline

#2 2015-11-05 21:42:48

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

That would depend of the BIOS, there is no general answer. Look at the options in your BIOS interface. Note that I have successfully booted a hard disk on such a BIOS. Usually these bios see the first partition as a floppy disk. So the trick is to make the first partition an image of a bootable floppy disk. This is easy with syslinux (it is possible with grub but more difficult). Make a first small partition and format it as FAT16 (this is import in order that syslinux can make the "floppy" bootable). Put the kernel and initrd into that partition and install syslinux normally. Once the kernel and the initrd is in memory, the BIOS is not used anymore and the boot process continues normally.

Note that with this configuration syslinux is clever enough to check at run time if it is installed on a "floppy" or hard disk, so the trick above should make your hard disk bootable in normal hard disk mode as well as in "floppy disk mode" if the first partition is bootable (and there is a sane mbr on the hard disk).

Last edited by olive (2015-11-05 21:58:28)

Offline

#3 2015-11-05 22:03:32

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,655

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

You used the generic term BIOS.  To me, that means MBR.

Are any of these systems UEFI?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2015-11-05 22:06:50

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

From my limited experience it may be enough to mark one of the partitions as bootable. The bios will look for the bootable flag in any of the partitions and if it doesn't find it then it might hide the flash disk from the list of bootable drives.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2015-11-05 22:09:56

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

ewaller wrote:

You used the generic term BIOS.  To me, that means MBR.

Are any of these systems UEFI?

I don't think so. Modern BIOS see just USB storage as a normal hard disk. But I know some older BIOS did indeed see the first (mbr) partition as a floppy disk unless there is no valid partition table and then the entire disk is seen as a floppy disk. It was the case for me of an old generic laptop from 2007 and I remember I struggled nearly an entire day to figure out how to boot it.

Offline

#6 2015-11-05 22:12:27

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

R00KIE wrote:

From my limited experience it may be enough to mark one of the partitions as bootable. The bios will look for the bootable flag in any of the partitions and if it doesn't find it then it might hide the flash disk from the list of bootable drives.

I have such a BIOS myself (on an old computer) and it is not the case, see my other post. It just presents the first partition as a floppy disk whether it is bootable or not. So what you see from the BIOS is a floppy disk the content of which is the first partition of the hard disk.

Last edited by olive (2015-11-05 22:14:33)

Offline

#7 2015-11-06 01:04:37

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

It's a motherboard that supports "UEFI+Legacy", but I'm trying to boot my drive the old fashioned way--MBR. It's 2 partitions. One is a FAT32 that has Arch Linux and Windows 10 both installed with the YUMI Multiboot program (so, a Frankenstein of syslinux and grub), and the other is an HFS+ partition with the OS X Yosemite installer. It's not being recognized as a floppy disk anywhere. It's being recognized as a usb-key on some computers and a usb-hdd on others. I want it to be recognized as usb-hdd on all of them, because it fails to boot properly as a key.

I can't screw with the partitions because the entire process of creating this drive took days of trial and error and a ton of meticulous effort--Mac and Windows really don't like being on the same flash drive. I shouldn't have to screw with the partitions to fix this, since my laptop recognized the drive as a usb-hdd just fine. The FAT32 partition is marked as boot, too. Is there anything about it that would make my motherboard falsely see it as a one-partition flash drive key?

Offline

#8 2015-11-06 08:34:07

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

Cadeyrn wrote:

It's a motherboard that supports "UEFI+Legacy"

Then can't you boot in UEFI mode?

Cadeyrn wrote:

I
, but I'm trying to boot my drive the old fashioned way--MBR. It's 2 partitions. One is a FAT32 that has Arch Linux and Windows 10 both installed with the YUMI Multiboot program (so, a Frankenstein of syslinux and grub), and the other is an HFS+ partition with the OS X Yosemite installer. It's not being recognized as a floppy disk anywhere. It's being recognized as a usb-key on some computers and a usb-hdd on others.

The BIOS recognizes it as a floppy disk. But the BIOS is only used to boot the system, once your operating system is booted, the BIOS is not used anymore and the system recognizes it as it wants without BIOS intervention (and thus probably not as a floppy disc). To see what is seen by the BIOS you can use the grub command line (when grub boot, not the grub interface within an OS, which uses the OS and try to guess what the BIOS sees; with such weird BIOS it guesses wrong but there is an option to tell grub what devices is really what: --devices). (With the old grub1, you had to type cat (fd0)/<TAB> and you saw the content of the first partition, something similar must exist for grub2) or within DOS (the real DOS on bare metal not a DOS Prompt/emulation within an OS). Other than cosmetic words in the interface, there is no internal notion of USB keys in the BIOS. The BIOS know the hard disk, the floppy disk, and the CDRom. Others devices get emulated as one of these devices.

Cadeyrn wrote:

I want it to be recognized as usb-hdd on all of them, because it fails to boot properly as a key.

Again some BIOS can do that within their configuration interface but there is no general answer.

Cadeyrn wrote:

I can't screw with the partitions because the entire process of creating this drive took days of trial and error and a ton of meticulous effort--Mac and Windows really don't like being on the same flash drive. I shouldn't have to screw with the partitions to fix this, since my laptop recognized the drive as a usb-hdd just fine. The FAT32 partition is marked as boot, too. Is there anything about it that would make my motherboard falsely see it as a one-partition flash drive key?

I agree with this but this is a problem of the BIOS. The general answer is that you have to complain to the BIOS manufacturer and because it is unlikely to give any positive result, the only other solution is to do with what you have. Have you looked at the options of your BIOS interface? Anything is possible because BIOS manufacturers sometimes implement things in weird ways but I don't believe (although I am not certain) that to change the formating or the boot flag of the vfat partition will make a difference. Modern BIOS generally see (physical) USB keys or any kind of RW storage as normal hard disks, like your laptop. If, as I believe,  you have a BIOS that sees the first partition as a floppy disk, you might well boot from it with what I describe above, at least for linux (for Windows or OSX I don't know).

Last edited by olive (2015-11-06 08:51:02)

Offline

#9 2015-11-06 10:16:06

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

Cadeyrn wrote:

I can't screw with the partitions because the entire process of creating this drive took days of trial and error and a ton of meticulous effort--Mac and Windows really don't like being on the same flash drive.

Make a backup, then. Something like pv /dev/sdc >backup and pv backup >/dev/sdc to restore.

Or use another pendrive for experiments. I'd start with trying to boot grub 0.97 (as it's simpler than grub2). You'll need to find out whether to configure grub to load its files from (fd0) or (hd0). I believe grub can remap floppies to hard disks and vice-versa so once grub is running, it should be possible to boot OS's expecting a HDD.

Offline

#10 2015-11-06 16:07:29

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

That all sounds like it would work, but the first partition of the drive is already marked as boot and running grub, and it doesn't seem to have fixed the problem. When I try to boot it, instead of the grub menu, I just get a blinking cursor with nothing happening.

Offline

#11 2015-11-06 17:21:08

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

Cadeyrn wrote:

That all sounds like it would work, but the first partition of the drive is already marked as boot and running grub, and it doesn't seem to have fixed the problem. When I try to boot it, instead of the grub menu, I just get a blinking cursor with nothing happening.

As I said in my post, if you use grub you have to convince that the first partition is a floppy disk. There was an option like device-files for that in grub 0.97, but I do not remember the precise syntax. If your partition is partitioned as FAT16, it will work with syslinux; it is able to detect at run time from what device it is booted.

Last edited by olive (2015-11-06 17:21:58)

Offline

#12 2015-11-06 18:15:45

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

Error reporting isn't grub's strength. Maybe get the Windows 95 rescue floppy (e.g. here, it's a self-extracting executable but unzip can deal with it) and write it with pv/cat/dd/... to the first partition of some pendrive (you will lose previous contents, blah blah blah). If this boots to a nice A: prompt then at least you know for sure that the BIOS works by using the first partition to emulate a floppy.

In such case it may be possible to create a grub installation which works in this insane environment. However, I still see no way to chainload the OSX partition in such setup. If this is a dealbreaker, you may as well give up now.

As for ways to trick BIOS into booting this as an HDD I can only refer you to google. I wouldn't be surprised if it was impossible.

Last edited by mich41 (2015-11-06 18:20:35)

Offline

#13 2015-11-06 20:11:23

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

I like how this extremely feature-rich and configurable BIOS that's meant to run servers can't do something as simple as properly handle all types of boot drives. Alright, I might just be screwed here, then. I'll have to just get another flash drive that runs Arch and have this one only be Windows and Mac, relying purely on UEFI for either OS. That's a setup that's way easier and way more sustainable than what I have now, and a million times that than what I'd have to do to make what I have now work as a floppy.

Offline

#14 2015-11-07 07:57:34

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

mich41 wrote:

Error reporting isn't grub's strength. Maybe get the Windows 95 rescue floppy (e.g. here, it's a self-extracting executable but unzip can deal with it) and write it with pv/cat/dd/... to the first partition of some pendrive (you will lose previous contents, blah blah blah). If this boots to a nice A: prompt then at least you know for sure that the BIOS works by using the first partition to emulate a floppy.

In such case it may be possible to create a grub installation which works in this insane environment. However, I still see no way to chainload the OSX partition in such setup. If this is a dealbreaker, you may as well give up now.

As for ways to trick BIOS into booting this as an HDD I can only refer you to google. I wouldn't be surprised if it was impossible.

Be careful, I am not completely sure that the Windows rescue floppy use the BIOS all the time. Anyway, I repeat syslinux is much easier to setup than grub in this kind of weird environment because it detects at run time that it is on a floppy. You can install it normally on the first partition (provided it is FAT 16/32 (and put the partition table type correctly, some BIOS may care of this). Such setup has the advantage that the same media can also be booted as a normal hard disk (with a normal MBR and provided the partition is bootable); which is impossible by grub.

It was relatively easy with grub 0.97, we have to create a device map file that map what is seen by the BIOS to device file in linux, omething like "fd0 /dev/sdb1" but I do not remember the details.

I have an old laptop where it was indeed impossible to reconfigure the BIOS.

Offline

#15 2015-11-07 08:21:45

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

Correction: syslinux WOULD be much easier to setup in this kind of weird environment, except for the fact that achieving a true multiboot setup between Linux and Windows is impossible. I've tried everything, including reading all the documentation and doing it manually, and at the end of the day, the only way I can get Windows and Linux on the same drive is YUMI Multiboot. But since that's an automatic program, I lose any ability to customize the syslinux so that this setup would actually work with my motherboard. And I have tried modifying YUMI's syslinux and grub. No matter what I do, even if I do everything exactly the way the documentation says, it still makes something in the long, crazy boot chain break.

Offline

#16 2015-11-07 08:33:31

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

I was answering with Linux in mind. I am not sure it is at all possible to boot Windows with this weird BIOS.

Last edited by olive (2015-11-07 08:34:01)

Offline

#17 2015-11-07 08:33:58

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: Force BIOS to recognize lfash drive as usb-hdd, not usb-key

Alright, I think I can get a perfect setup. I'm gonna have one drive boot Windows or Mac through UEFI, and another drive boot Arch through the MBR OR through UEFI--either one. To finish it off, I want to also have Windows (10) on the Arch drive, but not as a UEFI option, since that's taken by Arch--only as a menu entry in Arch's bootloader, for computers that for some reason need to boot Windows but don't support UEFI. I've looked at the .cfg menu entry files in my standard (customized) Arch iso and they're a little confusing. How exactly would I add a chainloaded Windows installer to it?

Or, alternatively, if it's easier, I could abandon the YUMI Multiboot setup on the Windows/Mac drive, BUT still keep the two partitions of Windows and Mac (which I was going to anyway) and make it so that any BIOS can get into the Windows partition by MBR. That would probably require the whole floppy/syslinux setup we've been talking about, and I'd be able to do it since I'd just be installing my own fresh syslinux setup onto a bare Windows boot partition. Would that be easier?

Last edited by Cadeyrn (2015-11-07 08:37:30)

Offline

Board footer

Powered by FluxBB