Subject: Re: Cannot boot from hard drive
To: Iain Dooley <iain@iaindooley.com>
From: Marco <marcotrillo@gmail.com>
List: port-macppc
Date: 07/02/2006 23:05:06
Hi,

If you want to be able to boot from the hard drive you need to create
a small bootstrap partition to host the `ofwboot.xcf' file.
That partition need to be on a file system that OpenFirmware
understands; such as HFS, HFS+, etc (not FFS).

If you have Mac OS installed, you can use the Mac OS partition.

Once you have created this partition, you`ll have a partition map like this:

# pdisk /dev/wd0c
Edit /dev/wd0c -
Command (? for help): p

Partition map (with 512 byte blocks) on '/dev/wd0c'
 #:                type name     length   base     ( size )
 1: Apple_partition_map Apple        63 @ 1
 2:           Apple_HFS boot     262144 @ 64       (128.0M)
 3:     Apple_UNIX_SVR2 root    4194304 @ 262208   (  2.0G) S0 RUFS k0  /
[...]

In this example the boot partition is number 2 and the root partiton
is number 3.

Then the OF command used should be like this one:

0> boot hd:2,\ofwboot.xcf hd:3,/netbsd

Notice that "/netbsd" is the path to the kernel image you want to boot.


-Marco

On 7/2/06, Iain Dooley <iain@iaindooley.com> wrote:
>
> On Sun, 2 Jul 2006, Marco wrote:
>
> > Hi,
> >
> > What error you got when using the commands ?
> .
> > The "hd" alias should work fine for the internal hard drive...
> >
> > In example, if 2 is the number of the ofwboot.xcf partition and 3 is
> > the number of the root partition where the kernel lives, a command
> > like this should work ok :
> >
> > boot hd:2,\ofwboot.xcf hd:3,/netbsd
> >
> > (you can use pdisk to get the numbers)
>
> i booted back into netbsd using:
>
> boot cd:,\ofwboot.xcf macppc\binary\kernel\netbsd-GENERIC_MD.gz
>
> and then did:
>
> ls /dev/
>
> to find that i have several wd0 slices a-p (wd0 is where netbsd
> installed). i tried:
>
> pdisk -l /dev/wd[a-p] #issuing separate commands for each slice
>
> only wd0a and wd0c had listings, and they appear to be identical (i've
> reproduced this manually so excuse me if it's a little messy):
>
> #      type            name       length     base      (size)
> 1: Apple_partition_map Apple           2  @   1
> 2: NetBSD/macppc*      NetBSD 2147483647  @   4        (1024.0G)
>
> 1024G!! what a great laptop ;-) now if i reboot into OFW, i tried:
>
> boot hd:0,\ofwboot.xcf hd:2,\NetBSD\macppc
> boot hd:0,\ofwboot.xcf hd:2,/NetBSD/macppc
> boot hd:0,\ofwboot.xcf hd:2,\NetBSD
> boot hd:0,\ofwboot.xcf hd:2,/NetBSD
>
> the the same with hd:1 for the second partition. the error i get is:
>
> DISK-LABEL: LOAD (noninterposed) not supportedload-size=0 adler32=1
>
> LOAD-SIZE is too small
>   ok
> >
>
> i tried partitions [0-9] for the first argument, ie:
>
> boot hd:1,\ofwboot.xcf ...
>
> etc. but in all cases i get the error:
>
> MAC-PARTS: specified partition is not valid can't OPEN: hd:1,ofwboot.xcf
>
> any clues?
>
> cheers
>
> iain
>
> > -Marco
> >
> > On 7/2/06, Iain Dooley <iain@iaindooley.com> wrote:
> >> Hi, i've succesfully installed netbsd 3.0 on an ibook. This section:
> >>
> >>
> http://ftp.netbsd.org/pub/NetBSD-daily/netbsd-3-0/200605220000Z/macppc/INSTALL.html#Examples%20of%20Open%20Firmware%20boot%20commands
> >>
> >> shows some typical boot commands, but none of them appear to work. i
> can't
> >> boot from the hard drive. when i do devalias there is hd, ide0, ide1,
> >> ultra0, ultra1, scsi... all these are used in various ways in the
> >> examples, but i can't seem to use dir to get a listing and i don't know
> >> how to find out which of these i should use.
> >>
> >> if it's any help, netbsd installed on something called wd0.
> >>
> >> cheers
> >>
> >> iain
> >>
> >>
> >
> >
> > --
> >
> >
>


-- 
--------------------------------------------------------------
Marco Trillo
marcotrillo@gmail.com
marco@artemis.tmdel.ath.cx
http://artemis.tmdel.ath.cx/