Subject: so why CAN'T Mac OS X and NetBSD live on a single hard drive?
To: None <port-macppc@netbsd.org>
From: Rob Newberry <robthedude@mac.com>
List: port-macppc
Date: 03/17/2005 15:07:44
Hi all -- I just joined the list.
I've just started working with NetBSD, but I'm very familiar with
various UNIX systems and low-level development. While I'm certainly a
NetBSD newbie, I'm capable of dealing with technical answers, so please
tell me gory details when appropriate.
Anyway, I've got NetBSD installed on a Mac mini, and that Mac Mini ALSO
has Mac OS X on it. Mac OS X boots and runs just fine.
I can get NetBSD to boot as well, but it seems to die when trying to
mount the root file system, spitting out lots of messages about not
being able to find a root file system, etc.
I did see in the INSTALL.html file that it's not currently possible to
have Mac OS X and NetBSD on the same disk and have NetBSD boot -- and
if that's the reason for the failure I'm seeing, I'd very much like to
understand WHY this is the case. After all, I CAN currently get NetBSD
to boot, I just can't seem to get it to mount the root file system.
My partitions are such that I have Mac OS X on one partition (partition
3), and then I have a separate NetBSD (partition 5) and NetBSD swap
partition (partition 6). During the install process, I set up my fstab
such that NetBSD should use /dev/wd0e (partition 5) as my root, and
/dev/wd0f (partition 6) for swap.
Based on my readings, OpenFirmware requires the ofwbooot.xcf file to be
on an HFS+ volume in order to load it, so I have put ofwboot.xcf on
partition 3 (alongside my Mac OS X install).
My system boots up into OpenFirmware. "devalias" shows lots of junk,
but the interesting items are:
bsd /pci@f4000000/ata-6@D/@0:3,ofwboot.xcf
osx /pci@f4000000/ata-6@D/@0:3,\\:tbxi
As expected, "boot osx" (and "mac-boot") works fine.
"boot bsd" doesn't do what I want exactly:
(lots of junk about loading, then:)
open /netbsd: No such file or directory
open /netbsd.gz: No such file or directory
open /netbsd.macppc: No such file or directory
Boot:
It looks like it can't find the kernel, and honestly, I'm not surprised
-- I don't see how it would, as I've loaded ofwboot.xcf from a
different partition, and it clearly doesn't know what to do.
However, if at this point, if I type:
Boot: /pci@f4000000/ata-6@D/@0:5,/netbsd
(which seems to me to say, "file '/netbsd' on partition 5 of the disk
at ata-6 at pci@f40000000"), then it actually DOES load netbsd:
(Side question: Is there a way I can do this correctly? It would be
nice if I could type a simple command in OpenFirmware to boot BSD,
rather than type this in to the "Boot:" prompt.)
Anyway, I get lots of printouts as the kernel loads and it detects
hardware and all that fun.
However, eventually, I get a series of messages:
cannot mount root, error = 69
root device (default wd0a)
dump device (default wd0b)
file system (default generic)
no file system for wd0 (dev = 0xa00 )
I might have gotten those wrong, as they're just spinning past over and
over -- but I'm pretty sure I got the gist of it.
This looks to me like it's booted just fine, but it doesn't know where
to try to find the root file system -- and again, I'm not really
surprised -- I don't know how it knows that it should pick partition 5
(although that IS what it loaded the kernel from).
Does this REALLY not work? It seems so close.
Thanks in advance.
Rob