On Sat, Jul 20, 2013 at 08:23:35PM +0200, Jan Stary wrote:
> On Jul 20 11:23:01, kwesterb...@rogers.com wrote:
> > On Sat, Jul 20, 2013 at 11:45:07AM +0200, Jan Stary wrote:
> > > > What troubles me is that whatever device (device name) I try,
> > > > it is the 'ofwboot' which is not found.
> > > > I don't mind calling my disk 'cd' in the boot sequence
> > > > or altering the devaliases, or "setenv boot-device cd:,ofwboot",
> > > > but that doesn't work either, as shown above.
> > > > How can I make sure that the installer
> > > > has actually put the ofwboot on my disk?
> > > 
> > > I mean, the ofwboot is supposed to be _somewhere_
> > > on my disk, right? Where? In the small DOS partition
> > > at the beginning of the disk?
> > > 
> > 
> > Yes. From macppc install.md:
> > 
> > md_installboot() {
> >         local _disk=$1
> > 
> >     # If there is an MSDOS partition on the boot disk, copy ofwboot
> >     # into it.
> >     if fdisk $_disk | grep -q 'Signature: 0xAA55'; then
> >             if fdisk $_disk | grep -q '^..: 06 '; then
> >                     if mount /dev/${_disk}i /mnt2 >/dev/null 2>&1; then
> >                             # Use cat to avoid holes created by cp(1)
> >                             cat /mnt/usr/mdec/ofwboot > /mnt2/ofwboot
> >                             umount /mnt2
> >                     fi
> >             fi
> >     fi
> > }
> > 
> 
> Ha! This seems to assume that the (fdisk) DOS partition
> is the 'i' partition in the disklabel - it is not;
> I created a [c]ustom disklabel.

It does make the assumption that the DOS partition is the first spoofed
partition, i.e. 'i'. This should probably be revisited since we relaxed
the rules on partition naming a while ago.

> 
> When in the install sequence is this copy of ofwboot done?

It's done at the very end in the finish_up() function in install.sub.

> Even my real wd0i partition, which is /usr/xobj
> (untouched since install) does not contain ofwboot.

Your wd0i isn't an MBR partition.

> That leads me to speculate that this ofwboot copy
> is performed _before_ the installing user edits
> the disklabel; but perhaps at that moment,
> wd0i _is_ really the DOS partiton, and later
> I can make the disklabel what I want?

Nope. See above. :-)

> 
> Or did I miss it somewhere in the macppc install documentation
> to leave 'i' alone so that ofwboot gets copied to the right place?

In INSTALL.macppc:

"If you have DOS or Linux partitions defined on the disk, these will
usually show up as 'i', 'j', and so on."

and

"If the disk is partitioned using MBR, the bootloader will be
automatically installed if you setup a small (a few MB) MSDOS
partition as position `i' in the label."

> 
> Anyway, I tried getting to that copy ofwboot now, as follows: 
> I enlarged the disklabel-maintained area to the whole disk ('b')
> and created a partion for the DOS piece of the disk. Looking at
> 
> Disk: wd0     geometry: 155061/16/63 [156301488 Sectors]
> Offset: 0     Signature: 0xAA55
>             Starting         Ending         LBA Info:
>  #: id      C   H   S -      C   H   S [       start:        size ]
> -------------------------------------------------------------------------------
> *0: 06      0   0   2 -      2   0  33 [           1:        2048 ] DOS > 
> 32MB  
>  1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused    
>   
>  2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused    
>   
>  3: A6      4   1   2 - 155060  15  63 [        4096:   156297392 ] OpenBSD   
>   
> 
> I made the DOS partition start at 512 (and then 1024
> and then everything under 4096 wherethe obsd part starts),
> but never could I mount that DOS partition ...
> 
> I will reinstall again, leaving the [a]uto disklabel untouched.
> 

Good plan.

.... Ken

Reply via email to