problem with 4.4 installboot

Josh Grosse josh at jggimi.homeip.net
Thu Oct 23 19:16:14 CEST 2008


On Thu, 23 Oct 2008 08:26:03 -0600, Michael wrote
> I have been trying to install 4.4 on a previous 4.3 partition, but keep
> getting this message after installation:
> installboot: broken MBR
> And then when booting from the hd, all I get is: ERR M

ERR M is produced by biosboot(8) (the Partition Boot Record, or PBR) when it
cannot locate the second stage bootloader.  This means that:

   1. The BIOS found the MBR program on disk.
   2. The MBR successfully found the PBR (biosboot)
   3. The PBR failed to find a the second stage boot loader program, by
default stored on the root partition as /boot.  This is the program that
issues the "boot>" prompt, and loads the BSD kernel.  

This problem can be caused by failing to run installboot(8), or failing to run
it properly.  It may also happen if you move or erase the second stage boot
loader (/boot, usually).

If you used the install or update script to get to 4.4, then installboot
should have been properly executed.  If afterwards, you rm'ed /boot or moved
the file, this might be why you're seeing the problem.  Other possibilities
include copying or relocating the OpenBSD data from one drive to another or to
a different location.  Any time the LBA (sector number) of /boot is changed,
installboot must be rerun. 

No matter the reason, it is repairable. 

To repair (assumes the hard drive is wd0, change as appropriate):

Step 1) Boot 4.4 installation media, select the shell at the
Install/Upgrade/Shell prompt.

Step 2) Mount your "a" partition as /mnt:

    # mount /dev/wd0a /mnt

Step 3) Ensure the second stage boot loader is stored in /mnt/boot:

   # cp -p /usr/mdec/boot /mnt/boot

Step 4) Rerun installboot, installing a new biosboot that points to /mnt/boot:

   # /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot wd0

Step 5) Remove the install media, and issue:

   # reboot

> btw- would it help if I rejoined misc and sent this to them also?

You should rejoin misc@, but for keeping up with the social and technical
aspects of the project.  I think we can get you through this technical hurdle
here on the newbies list. :)


More information about the Openbsd-newbies mailing list