Subject: Re: UFS root, how? was Re: 2.0 rc1 default catch
To: None <port-macppc@netbsd.org>
From: Kendall Shaw <queshaw@pacbell.net>
List: port-macppc
Date: 10/05/2004 11:42:08
d.zanon@infinito.it wrote:
> On Monday 04 October 2004 01:04, you wrote:
> In fact, I think your ofwboot.xcf is in the right place (HFS partition),
> but the netbsd kernel has to be in the netbsd root partition, not in the HFS
> one. ofwboot.xcf seems to be capable of finding a kernel on another
> partition, and this has to be the partition where you installed netbsd.
> on my computer:
> Partition map (with 512 byte blocks) on '/dev/wd0c'
>  #:                type name                    length   base      ( size )
>  1: Apple_partition_map Apple                       63 @ 1
>  2:          Apple_Free                         262144 @ 64        (128.0M)
>  3:           Apple_HFS macosx   26415168 @ 262208    ( 12.6G)
>  4:           Apple_UFS netbsd_root                   2097152 @ 26677376  
> (  1.0G)
> etc...
> ofwboot.xcf is in partition 3, netbsd kernel is in partition 4 and so I use
> boot hd:3,\ofwboot.xcf hd:4/netbsd

Okay, I've started over. On macos x diskutil list has:

    #:                   type name               size      identifier
    0: Apple_partition_scheme                    *74.5 GB  disk0
    1:    Apple_partition_map                    31.5 KB   disk0s1
    2:              Apple_HFS NetBSD Boot        40.0 MB   disk0s2
    3:        Apple_UNIX_SVR2                    512.0 MB  disk0s3
    4:              Apple_UFS NetBSD             71.7 GB   disk0s4

In the disk0s2 partition I have ofwboot.xcf.
In disk0s4 I have netbsd-GENERIC_MD.gz

And this matches what I see from pdisk under netbsd when I boot 
netbsd-GENERIC_MD.gz.

I installed using

boot ultra1:,\ofwboot.xcf ultra1:4,/netbsd-GENERIC_MD.gz

Under netbsd, mounting /dev/wd1a gets me the filesystem I expect to see 
from what is disk0s4 under macos x.

disklabel wd1 prints an error message about an invalid MBR record, and 
displays a partition layout that is very different from what I see from 
pdisk, including multiple overlapping partitions.

After installation, this still works:

boot ultra1:,\ofwboot.xcf ultra1:4,/netbsd-GENERIC_MD.gz

this fails with 'DEFAULT CATCH!':

boot ultra1:,\ofwboot.xcf ultra1:4,/netbsd

dir ultra1:4,\

shows the file netbsd and the other directories and files that were 
installed.

... So, it can read a file from the partition, but it fails for unknown 
reasons without managing to finish loading the kernel.

Any more ideas?