Subject: Re: Mounting root device
To: None <port-powerpc@NetBSD.ORG>
From: SUNAGAWA Keiki <kei_sun@ba2.so-net.or.jp>
List: port-powerpc
Date: 01/26/1998 09:02:21
Daniel Jacobowitz <youngdrow@geocities.com> wrote:

Daniel> SUNAGAWA Keiki wrote:

>> I've been playing with the source of ofwboot hacked by Dan
>> Jacobowitz, (Thanks Dan!) and successfully booted up ELF
>> kernel which is attached with ofwboot from floppy disk.

Daniel> Glad to be of service :)

It's so cool!

>> The problem is that it doesn't find root partition when it
>> boots.  It seems that NetBSD/powerpc doesn't recognize Apple
>> partition map which is used NetBSD/mac68k, dosen't it?

Daniel> It relies on OF for that, I'm betting - does apple
Daniel> OF do HFS? No idea.

Ofwboot.xcf is on the HFS disk, but once our kernel booted
up, it manages disk in it's own way, I believe.

There are two things can be done; (1) Prepare the drive
partitioned and newfs'ed on PC.  It's easier, but I have no
PCs on my home (duh).  So I'm trying (2) to port Apple
partition map scheme to NetBSD/powerpc from mac68k.  I just
begun reading arch/mac68k/mac68k/disksubr.c.

>> Here's boot record I tracked down by hand.
>> 
>> 0 > setenv real-mode? true ok
>> 0 > setenv load-base 10000
>> 
>> << I reset the machine phisically to enable the changes. >>

Daniel> I could have SWORN I tried that!  I'll look at it
Daniel> the moment I get home.  Could someone please make a
Daniel> root disk for me?

I use boot floppy image made by Kazuki Sakamoto for
NetBSD/bebox at the moment. (Thanks Kazuki!)  Try the URL:

ftp://www.cec.co.jp/usr/sakamoto/NetBSD/

>> ofroot0 (root) (device-tree)
>> ofbus0 at ofroot0 (PowerPC,604e)
>> l2-cache at ofbus0 not configured
>> memory at ofroot0 not configured
>> AAPL,ROM at ofroot0 not configured
>> ofdisk1 at ofbus2 (swim3)
>> nvram at ofbus2 not configured

Daniel> I assume that's ignoreable right? memory not
Daniel> configured?

I have no idea, so I'll dig into the source.

>> boot device: <unknown>
>> boot device: _
>> 
>> I tried ofdisk0[a-p], ofdisk1[a-p] and got no success.  It
>> doesn't recognize my MO drive.
>> 
>> What's I'm missing?  Any ideas?

Daniel> While ofdisk0 is the device bus itself, it's not the
Daniel> partition.  Try sd0a, sd2b, etc.  We aren't really
Daniel> using of-related names at this point.

Unfortunately, sd?? did not the trik.  See my previous mail.

Also, I made a DOS formated floppy, copy the contents of
boot floppy and type `ofdisk1c' for the prompt and got:

boot device: <unknown>
root device: ofdisk1c
dump device (default ofdisk1b):
file system (default generic):
root on ofdisk1c dumps on ofdisk1b
mountroot: trying ffs...
mountroot: trying nfs...
mountroot: trying msdos...
root file system type: msdos
<hangup>

The disk is made on Mac, so I'll rebuild the DOS floppy on
PC and try again.

--
SUNAGAWA Keiki <kei_sun@ba2.so-net.or.jp>
Happy Hacking!