Subject: Re: booting from a scsi hard drive
To: Mauro <mcepeda@ualberta.ca>
From: admin@agnus.datazap.net <admin@agnus.datazap.net>
List: port-macppc
Date: 10/14/2005 11:15:52
Hi,

>> I just wanted to let everyone know that I was able to solve this problem 
>> and the computer is now able to boot from the hard drive.
>> 
> Yes but for future reference and others exactly how?

I first reset the open firmware by holding down the option-apple-r-f keys 
at boot up. I did an install of mac OSX. This gave me the proper 
boot-device (I just needed to change it to the proper partition).

I then netbooted NetBSD from one of my Amiga's. I wanted to make sure the 
disk was blank so I did: dd if=/dev/zero of=/dev/sd0c bs=8k

Then I used pdisk to partition the drives.

The first drive:
client# pdisk /dev/sd0c
Command (? for help): P
No partition map exists
Command (? for help): i
read failed
Command (? for help): P
Command (? for help): C
First block: 2p
Length in blocks: 100m
Name of partition: boot
Type of partition: Apple_HFS
Command (? for help): C
First block: 3p
Length in blocks: 33792m
Name of partition: root
Type of partition: Apple_UNIX_SVR2
Available partition slices for Apple_UNIX_SVR2:
  a   root partition
  b   swap partition
  c   do not set any bzb bits
  g   user partition
Other lettered values will create user partitions
Select a slice for default bzb values: a
Command (? for help): C
First block: 4p
Length in blocks: 5120m
Name of partition: swap
Type of partition: Apple_UNIX_SVR2
Available partition slices for Apple_UNIX_SVR2:
a   root partition
b   swap partition
c   do not set any bzb bits
g   user partition
Other lettered values will create user partitions
Select a slice for default bzb values: b
Command (? for help): C
First block: 4p
Length in blocks: 4p
Name of partition: home
Type of partition: Apple_UNIX_SVR2
Available partition slices for Apple_UNIX_SVR2:
  a   root partition
  b   swap partition
  c   do not set any bzb bits
  g   user partition
Other lettered values will create user partitions
Select a slice for default bzb values: g
Command (? for help): P

The second drive:
client# pdisk /dev/sd1c
Command (? for help): P
No partition map exists
Command (? for help): i
read failed
Command (? for help): P
Command (? for help): C
First block: 4p
Length in blocks: 4p
Name of partition: domains
Type of partition: Apple_UNIX_SVR2
Available partition slices for Apple_UNIX_SVR2:
  a   root partition
  b   swap partition
  c   do not set any bzb bits
  g   user partition
Other lettered values will create user partitions
Select a slice for default bzb values: g
Command (? for help): P

I then did:
client# newfs -b 8192 -f 1024 /dev/sd0a
client# newfs -b 8192 -f 1024 /dev/sd0g
client# newfs -b 8192 -f 1024 /dev/sd1g
(untared all the sets)

For the HFS partition. I downloads and installed hfstools.
client# hformat /dev/sd0d
client# hmount /dev/sd0d
client# cp ofwboot.xcf /mnt
client# cd /mnt
client# copy ofwboot.xcf :
client# humount

I then changed the boot-device and boot-file to:
boot-device: bridge/ADPT,2940U2B@3/@0:2,\ofwboot.xcf
boot-file: bridge/ADPT,2940U2B@3/@0:3,/netbsd

I was unsure what to put in for the boot-device and boot-file, but it was 
using bridge/ADPT,2940U2B@3/@0: it was just a matter of determining which 
partition ofwboot.xcf was on. John gave me his boot-device and boot-file 
as examples and that was the key to determing what mine should be.

-Al