Hang on Reboot - Installing the OpenBSD 3.1 MBR - Complete Instructions
"David Simmons" <[email protected]> Thu, 13 Jun 2002 14:23:58 -0500
| Newsgroups | gmane.os.openbsd.embedded |
|---|---|
| Message-ID | <004d01c2130f$debef950$1701a8c0@davevaio> |
Guys - Please add this to the emBSD doc section or someplace so that those wanting to RTFM, can actually have a M to read!? -------------------------------------------------------------------- Title: How to Update the Soekris net4501 to the OpenBSD 3.1 Boot Loader - so as to avoid having to power-cycle the box upon reboot Author: David Simmons ([email protected]) Last Updated: 2002 June 13 The Situation: When doing a soft reboot of the emBSD system, the system will stop at "Using Drive:0 Partition: 3". While the system will properly boot if power-cycled (ie. disconnecting then reapplying power), this can be a hassle if the box is located off-site and/or is not easily accessible. The 'Fix': Simple Answer - replace the MBR with the OpenBSD 3.1 boot-loader Step-by-Step Answer - the problem with the simple answer, is that the OpenBSD FAQ doesn't discuss how to load the 'normal' boot-loader, it just goes into depth about what OTHER boot-loaders are available and how to implement them. (SideNote: For some reason, the Boot-Easy loader did NOT work for me - hence the need to use the 'normal' loader). To update the boot-loader on the net4501, you'll need to have access to the OS of the net4501 - which is part of the catch-22 - if you HAD access, you wouldn't need the boot-loader. Here's how you can boot into the box without the OpenBSD loader (while this will work, it's a manual fix and requires you to have access to the comBIOS console) - submitted by Soren Kristensen: "First you might want to try the new builtin BIOS master boot loader, at the monitor prompt (accessed by typing CTRL-P) enter: > boot :X X can be 1 to 4, that will boot the X partition on the CF disk, assuming that the partition table is still there.... I believe that OpenBSD for some reason as default use partition 4, right?" and yes, it works like a charm! (use the command "> boot :4" ). Now that you're into the OS, you'll need to get the MBR file from the OpenBSD 3.1 distribution (note: the OpenBSD FAQ will talk about getting a Boot.bin file - this is for the alternate loaders - we're going to install the original Master Boot Record (MBR)). You'll need to download the base31.tgz file from the ftp site (ie. ftp.openbsd.org/pub/OpenBSD/3.1/i386/base31.tgz ) perferrably onto another Unix machine. At this point, we'll need to get the MBR file using the command (after the 'gzip -d base31.tgz' command): tar -xvf base31.tar ./usr/mdec/mbr This will extract the MBR binary into the sub-directory ./usr/mdec from where-ever you are in your directory tree. At this point, issue the command: fdisk -i -f /(where-ever you are)/usr/mdec/mbr wd0 You'll need to answer the question: Only LBA values are valid in ending cylinder for partition #3. ----------------------------------------------------- ------ ATTENTION - UPDATING MASTER BOOT RECORD ------ ----------------------------------------------------- Do you wish to write new MBR? [n] and then get a normal prompt. At this point, you can test if successful by rebooting (by issuing the command: "shutdown -r now" ). Hope it works and we have less red foreheads....Dave --------------------------------------------------------------------