View Single Post
  #1   (View Single Post)  
Old 25th July 2013
moosejaw moosejaw is offline
Port Guard
 
Join Date: Oct 2009
Location: Milwaukee
Posts: 12
Default [Solved]: External HD seen as drive 0 by OpenBSD MBR

I recently configured an external USB HD to use as a backup drive: used OpenBSD fdisk to devote the entire disk to OpenBSD, then used disklabel to configure two partitions, one for /altroot (a) and another to backup my primary user's home directory (d). Everything works great.

The only problem is that, if I leave the drive plugged in via USB and reboot, the MBR sees the USB drive as drive 0 and gets stuck, since the PBR, kernel, etc, are all on another disk (the internal hard disk). That is, upon booting, I get the following message:
"Using drive 0, partition 3.
No O/S"

If I understand FAQ sec 14.7 correctly, this means that my machine's BIOS is correctly finding the MBR code on the internal hard drive, but then that MBR code is seeing the external USB drive as "drive 0", rather than the internal hard drive (which the MBR code itself lives on!).

If I simply shut off the machine, unplug the external HD, and turn it back on, everything boots fine.

Questions: does this description of the problem sound accurate? And if so, does anyone know of a way to get the MBR to see the internal HD as "drive 0" while the external USB HD is plugged in? This is my office machine, so it's not a huge deal for me to just unplug the external HD whenever I reboot (though it means I can't reboot remotely with the external HD plugged in).

For reference, the kernel sees the internal HD as wd0 and the external USB HD as sd4. This is OpenBSD 5.3-stable, amd64.

Last edited by moosejaw; 25th July 2013 at 04:17 PM. Reason: problem solved
Reply With Quote