Hi. Thanks for reading my post. I'm in the midst of a sticky
situation. I had an OpenBSD web-server running on an older desktop
computer. I decided to take the hard drives and move them into a newer
computer, one with more processing power, RAM, etc, because the
performance boost would be really handy. The old web-server was a real
clunker. When it got too many hits, it rattled. No really, audible and
visible rattling.

Anyway, I read up on how to do this, and my plan was basically to plug
the two hard drives into the new IDE slots in the newer box, reinstall
the boot blocks, and go to town. Here's what happens when I try to
boot the old hd0 (I removed the second hard drive for this to simplify
matters) without any bootable media in the floppy or CD-ROM drive.

Search for Boot Record fron CDROM..Not Found
Searching for Boot Record from Floppy..Not Found
Searching for Boot Record from IDE-0..OK
Using drive.0, partition 3.
Loading...
ERR M

"ERR M -- An invalid magic(5) number was read in the second-stage
bootloader's header. This generally means whatever it was that was
read in was NOT /boot, usually meaning installboot(8) was run
incorrectly, the /boot file was altered, or you have exceeded your
BIOS's ability to read a large disk."
http://www.openbsd.org/faq/faq14.html

This is basically what I thought would happen. So, my plan was to
reinstall the bootblocks on the hd0 by following these instructions:

"
14.8 - Installing Bootblocks - i386 specific

Older versions of MS-DOS can only deal with disk geometries of 1024
cylinders or less. Since virtually all modern disks have more than
1024 cylinders, most SCSI BIOS chips (which come on the SCSI
controller card) and IDE BIOS (which is part of the rest of the PC
BIOS) have an option (sometimes the default) to "translate" the real
disk geometry into something that fits within MS-DOS' ability.
However, not all BIOS chips "translate" the geometry in the same way.
If you change your BIOS (either with a new motherboard or a new SCSI
controller), and the new one uses a different "translated" geometry,
you will be unable to load the second-stage boot loader (and thus
unable to load the kernel). (This is because the first-stage boot
loader contains a list of the blocks that comprise /boot in terms of
the original "translated" geometry). If you are using IDE disks, and
you make changes to your BIOS settings, you can (unknowingly) change
its translation also (most IDE BIOS offer 3 different translations).
To fix your boot block so that you can boot normally, just put a boot
floppy in your drive (or use a bootable CD-ROM) and at the boot
prompt, type "b hd0a:/bsd" to force it to boot from the first hard
disk (and not the floppy). Your machine should come up normally. You
now need to update the first-stage boot Loader to see the new geometry
(and re-write the boot block accordingly).
Our example will assume your boot disk is sd0 (but for IDE it would be
wd0, etc..):

# cd /usr/mdec; ./installboot /boot biosboot sd0
"http://www.openbsd.org/faq/faq14.html#InstBoot

Only, here's what happens when I try that:

Searthing for Boot Record from CDROM..OK
Loading......
probing pc0 com0 apm mem[365K 159M a20=on]
disk fd0 fd1 hd0+
>> OpenBSD/i386 BOOT 2.10
boot>b hd0a:/bsd
booting hd0a:/bsd: open hd0a:/bsd: No such file or directory
failed(2), will try /obsd

What can I do to get my system to boot? Note, I *have* backed up the
/var partition so I could just reinstall the entire OS, a few
packages, and drop the /var partition back in, but that seems like
cheating. I feel as if I can learn what's going on here, that I will
have learned something useful. Maybe it's just something very simple
that I'm overlooking. At any rate, do you have any advice? Tips? Easy
answers? Difficult answers? Any ideas will be appreciated.

Reply via email to