Brian Candler wrote:
> I've recently installed OpenBSD 4.0 on two machines in spare space at the
> end of the disk.
> 
> It turns out that OpenBSD is unbootable if the root filesystem starts above
> cylinder 1024. However, this isn't a problem for FreeBSD; I guess it makes
> use of newer BIOS calls.
> 
> I can still boot OpenBSD on these machines, by using the cd40.iso CDROM or a
> USB pen containing cdrom40.fs, and typing "boot hd0a:/bsd" or "boot
> hd1a:/bsd" at the boot> prompt. However this is a bit ugly.
> 
> So I was wondering, are the OpenBSD and FreeBSD boot processes similar
> enough that I could use the FreeBSD boot loader (first and/or second stage)
> to boot OpenBSD? And if so, has anyone got a recipe for this that they would
> care to share?

Wow, gotta love broad, general statements that are just plain wrong.

OpenBSD can DEFINITELY boot from way beyond cylinder 1024, as long as
your BIOS supports it.  I've booted from the last couple G of a 160G IDE
drive since the 3.5 days.

Since the system boots from a floppy and CDROM, it sounds like the BIOS
can do everything it needs to do.

You provide no information about your system or your process or what you
mean by "unbootable", so guessing what is wrong is probably foolish on
my part, but what the heck.

First, read and understand this:
   http://www.openbsd.org/o/faq/faq14.html#Boot386

When you install a fresh system (picking 'y' for "use entire disk for
OpenBSD"), OpenBSD installs a MBR, a PBR and /boot.  In order to boot,
the MBR calls the PBR which loads the /boot file.  IF you are
partitioning around another OS that is already on the system (apparently
the case on your machine), OpenBSD will not install an MBR unless you
deliberately tell fdisk to do so.  It seems to be one of few OSs that
don't just replace your existing MBR with its own.

If whatever MBR was already in place was not ready for big disks (again,
you provide no evidence for a 1024 cyl limit...it could also have been a
32G limit or 128G limit), it wouldn't have been able to pull the PBR
from the "far" partition...and no PBR means no /boot which means no OpenBSD.

This would explain why the CDROM and floppy work rather nicely.  You can
verify my speculation by looking at the boot messages, and compare to
what si in the above link.  If you don't see "Using drive ..." message,
you can't blame OpenBSD.

You can replace the MBR with a third party program, but the PBR and
second stage boot loader (/boot) are OpenBSD specific.  I'm not aware of
anyone writing a third-party OpenBSD-specific PBR or second-stage boot
loader..can't think of any reason why they should, the OpenBSD ones Just
Work Pretty Darned Well.  Grub et al. are just over-sized partition
flagging programs for OpenBSD.

Nick.

Reply via email to