On Jun 12 09:10:32, Kenneth R Westerback wrote:
> On Tue, Jun 12, 2012 at 09:30:44AM +0200, Jan Stary wrote:
> > On Jun 11 19:54:21, Miod Vallat wrote:
> > > > I understand that "hd" and "cd" are just devaliases; in my case,
> > > > 
> > > >         hd      /pci@f4000000/ata-6@d/disk@0
> > > >         cd      /pci@f4000000/ata-6@d/disk@1
> > > > 
> > > > Does that mean that those device aliases are somehow mixed up?
> > > 
> > > Well, given the dmesg says...
> > > 
> > > > cd0 at scsibus0 targ 0 lun 0: <MATSHITA, DVD-R UJ-825, DAND> ATAPI 
> > > > 5/cdrom removable
> > > > wd0 at wdc1 channel 0 drive 1: <ST9808211A>
> > > 
> > > 
> > > ... I'd say they are.
> > > 
> > > > Obviously, I would like to boot the /bsd I installed on disk.
> > > > Isuppose this is an Open Firmware problem rather then an OpenBSD
> > > > problem. Namely, Idon't know how to address the harddisk I installed
> > > > on from within open firmware. Can someone enlighten me please?
> > > 
> > > Try:
> > >   setenv boot-device /pci@f4000000/ata-6@d/disk@1:,ofwboot
> > 
> >   setenv boot-device /pci@f4000000/ata-6@d/disk@1:,ofwboot
> >   boot
> > 
> >   MAC-PARTS: bad partition can't OPEN: /pci@f4000000/ata-6@d/disk@1:,ofwboot
> >   Can't open device or file.
> > 
> > 
> > According to devalias, the above cevice is aliased to 'cd'.
> > So running this is equivalent to running
> > 
> >   boot cd:,ofwboot
> > 
> > - right? It fails the same way.
> > 
> > 
> > I guess I need to understand how the ofwboot works.
> > This is my first ppc machine, so please bare with me.
> > 
> > During the installation, when I select MBR partitioning,
> > two partitions get created: a 1MB DOS partitition at the
> > beginning of the disk, and one big OpenBSD coverning the rest.
> > What is the role of this MSDOS partition? It is flagged bootable in fdisk
> > - is that intended? Is this where the 'ofwboot' file is supposed to be 
> > found?
> > It doesn't seem to really be an msdos partition: I cannot fsck_msdos it
> > or mount_msdos it.  Could this be my problem?
> 
> The MSDOS partition must contain the ofwboot file. OpenFirmware cannot
> boot from OpenBSD/ffs partitions.
> 
> If the partition does not exist or does not contain ofwboot then the
> install process did not work for some reason.
> 
> On my macmini I see
> 
> $ sudo disklabel wd0
> Password:
> # /dev/rwd0c:
> type: ESDI
> disk: ESDI/IDE disk
> label: ST9808211A      
> duid: c96b25db075011e2
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 16
> sectors/cylinder: 1008
> cylinders: 16383
> total sectors: 156301488
> boundstart: 3024
> boundend: 156301488
> drivedata: 0 
> 
> 16 partitions:
> #                size           offset  fstype [fsize bsize  cpg]
>   a:           409248             3024  4.2BSD   2048 16384  328 # /
>   b:          2097648           412272    swap                   # none
>   c:        156301488                0  unused                   
>   d:           409248          2509920  4.2BSD   2048 16384  328 # /tmp
>   e:           409248          2919168  4.2BSD   2048 16384  328 # /var
>   g:         20971440          3328416  4.2BSD   2048 16384  328 # /usr
>   h:        132001631         24299856  4.2BSD   2048 16384  328 # /home
>   i:             2048                1   MSDOS                   
> $ sudo mount /dev/wd0i /mnt
> $ ls -l /mnt
> total 124
> -rwxr-xr-x  1 root  wheel  63460 Jun  8 15:32 ofwboot
> $ sudo fdisk wd0
> 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      3   0   1 - 155060  15  63 [        3024:   156298464 ] OpenBSD   
>   
> $ 
> 
> What do you see?


# fdisk wd0
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
#
# disklabel wd0
# /dev/rwd0c:
type: ESDI
disk: ESDI/IDE disk
label: ST9808211A
duid: f3de9c2b3de3dd62
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 155061
total sectors: 156301488
boundstart: 0
boundend: 156301488
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:           410176               64  4.2BSD   2048 16384    1 # /
  c:        156301488                0  unused
  d:          2096640           410240  4.2BSD   2048 16384    1 # /usr
  e:          4194304          2506880  4.2BSD   2048 16384    1 # /usr/local
  f:          8389568          6701184  4.2BSD   2048 16384    1 # /usr/ports
  g:          1048320         15090752  4.2BSD   2048 16384    1 # /var
  h:           262080         16139072  4.2BSD   2048 16384    1 # /var/log
  i:           262080         16401152  4.2BSD   2048 16384    1 # /var/mail
  j:           262080         16663232  4.2BSD   2048 16384    1 # /var/spool
  k:           524160         16925312  4.2BSD   2048 16384    1 # /var/mysql
  l:           524160         17449472  4.2BSD   2048 16384    1 # 
/var/postgresql
  m:         12582880         17973632  4.2BSD   2048 16384    1 # /var/www
  n:          2097632         30556512  4.2BSD   2048 16384    1 # /tmp
  o:         10485216         32654144  4.2BSD   2048 16384    1 # /home
  p:        113162128         43139360    RAID
# ^D


I believe this is indeed what's wrong with my setup.
The MSDOS partition is not really an MSDOS partition,
and there is no ofwboot file on it.

Note how in fdisk, the partition spans sectors
1-2048, but the OpenBSD parrtition already starts
on sector 64. I must have done something wrong
during the installation.

Let me go through the install one more time
and look closely at this.


On Jun 12 10:47:05, Martin Pieuchot wrote:
> On 11/06/12(Mon) 20:23, Jan Stary wrote:
> Are you sure you have an MSDOS partition, generally named 'i' containing
> the ofwboot on your drive?

No I'm not, see above.
Also, is it a problem to reuse the 'i' partition for something else
later on in the install? When install asks whether I want HFS or MBR,
and I say MBR, _that_ is the moment when it creates the two fdisk
partitions, and puts wd0i into the disklabel, and newfs_msdos's it,
and puts the ofwbott in there, right? Is it OK if I reuse the 'i'
partition inthe next steup, i.e., when editing my disklabel?
Or should I leave the wd0i disklabel entry untouched? Because
the ofwboot only gets copied onto the MSDOS partition later?

> What happen if you specify you want to load the kernel from the hd at
> the ofwboot prompt:
> 
> boot {hd,cd}:,ofwboot hd:/bsd

For hd (which is my CD drive) it gets into the boot> prompt
but has no /bsd, obviously; it can boot /5.1/macppc/bsd though
(that's how I actually boot my system now),

For cd (which is my harddrive), Can't open file or device,
which I now believe is because there is not realy an MSDOS partition
with an ofwboot file on it.

        Jan

Reply via email to