Unexpected bios behavior??? due to connection of an external drive.

Chris Murphy lists at colorremedies.com
Wed Mar 18 00:56:38 UTC 2015


On Tue, Mar 17, 2015 at 6:45 PM, Rick Stevens <ricks at alldigital.com> wrote:

> It's pretty common for the BIOS to, by default, try to boot external
> media (CD ROM, USB, eSATA and such) BEFORE booting a local hard disk.

If it's common, it's a good reason to consider parted's behavior a bug
these days, because it guarantees the system face plants upon
existence of non-bootable external media.

> If you ABSOLUTELY must have the drive attached at boot time, get into
> the BIOS and change the boot order so the internal drive is tried BEFORE
> your USB stuff. Remember, however, that if you do this, then you won't
> be able to boot any external media unless you flip the BIOS back.

I have an ancient system, ~2004 firmware, that offers F12 for a one
time boot menu from which I can choose myriad boot drive options
including USB.

If parted is used to partition, firmware face plants on that drive. So
does VirtualBox (SeaBIOS). If any other tool is used to partition,
both firmwares bypass this drive, and try the next one in the list.

In this paradigm, it was parted that was expected to write jump code
to the first 440 bytes, while e.g. syslinux write some minimal code to
the VBR, which then pointed to a binary blob also found in the
filesystem, the actual bootloader.  syslinux's install command doesn't
touch the MBR at all, it only writes to the VBR (or BIOS Boot if it's
a GPT partition type).

Whereas GRUB's grub-install puts its own code in the MBR, which
doesn't at all depend on active bit (boot flag), it directly forwards
to an LBA. So as long as the firmware can address that LBA, the GRUB
stage2/core.img can be essentially anywhere hence fewer limitations.


-- 
Chris Murphy


More information about the users mailing list