Subject: Re: Getting the thing to boot
To: None <makato@ki.nu>
From: Stephen Borrill <netbsd@precedence.co.uk>
List: port-macppc
Date: 08/09/2006 13:12:42
> > difference I can see from pdisk is that the non-working one
> > doesn't have the "Apple_Driver_IOKit Macintosh" partition. My concern is that
> > I was overzealous with deleting partitions.
>
> I don't think it always matters.
> I have two occasions both of which boot fine with simple
> pdisk setup.
>
> ===> Mac mini
> Partition map (with 512 byte blocks) on '/dev/wd0c'
> #: type name length base ( size )
> 1: Apple_partition_map Apple 63 <at> 1
> 2: Apple_HFS ofwboot 8192 <at> 64 ( 4.0M)
What does hls -la show for your Apple_HFS partition?
It turns out my working disk (which I created with OS X) has an HFS+
partition (which I can't view with hfsutils) instead of HFS (OS X wouldn't
let me create HFS). When I did an hls I wondered where ofwboot.xcf had
gone!
Perhaps the sequence of steps should be in the FAQ? Here are some steps
below with questions in [] - I'm a bit concerned by the weird partitions
show with disklabel.
1) Check HFS partition exist and is at least 1MB in size
netmanager 1# pdisk -l /dev/wd0c
Partition map (with 512 byte blocks) on '/dev/wd0c'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: Apple_Driver43*Macintosh 54 @ 64
3: Apple_Driver43*Macintosh 74 @ 118
4: Apple_Driver_ATA*Macintosh 54 @ 192
5: Apple_Driver_ATA*Macintosh 74 @ 246
6: APPLE_HFS boot 2048 @ 320 ( 1.0M)
7: APPLE_UNIX_SVR2 root 1048576 @ 2368 (512.0M) S0 RUFS k0 /
8: APPLE_UNIX_SVR2 swap 1048576 @ 1050944 (512.0M) S1 SFS k0 (swap)
9: APPLE_UNIX_SVR2 user 57917807 @ 2099520 ( 27.6G) S2 UFS k0 /usr
2) Check partition name in disklabel
netmanager 2# disklabel wd0
disklabel: Invalid signature in mbr record 0
# /dev/rwd0c:
type: ESDI
disk: Maxtor 33073H3 B
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 59541
total sectors: 60017328
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
7 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 1048576 2368 4.2BSD 0 0 0 # (Cyl. 2*- 1042*)
b: 1048576 1050944 swap # (Cyl. 1042*- 2082*)
c: 60017328 0 unused 0 0 # (Cyl. 0 - 59540)
d: 2048 320 HFS # (Cyl. 0*- 2*)
e: 59998356 18952 Apple UFS 0 0 0 # (Cyl. 18*- 59540*)
f: 19 60017308 unknown # (Cyl. 59540*- 59540*)
g: 57917807 2099520 4.2BSD 0 0 0 # (Cyl. 2082*- 59540*)
disklabel: boot block size 0
disklabel: super block size 0
disklabel: partitions a and e overlap
disklabel: partitions b and e overlap
disklabel: partitions e and g overlap
disklabel: partitions f and g overlap
[N.B. Where've partition e and f come from?]
3) format HFS partition
netmanager 3# hformat -l boot /dev/wd0d
Volume name is "boot"
Volume was created on Wed Aug 9 14:08:46 2006
Volume was last modified on Wed Aug 9 14:08:46 2006
Volume has 1030144 bytes free
4) copy ofwboot.xcf onto the HFS partition
netmanager 4# hcopy -r /usr/mdec/ofwboot.xcf boot:ofwboot.xcf
[Is copying as raw correct?]
[Do I need to set the creator/type?]
--
Stephen