Subject: Re: Boot problems after upgrade
To: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
From: Oleg Sharoiko <os@rsu.ru>
List: port-prep
Date: 04/30/2003 22:49:14
On Wed, 30 Apr 2003, Jochen Kunz wrote:

JK> > Here is my layout (it's a little bit different but it worked fine
JK> > before this upgrade)
JK> Aha, I see. sd0d is the PReP MBR boot partition. Well, the boot-image is
JK> intended to be written to sd0c as it contains a x86 bootsector and the
JK> MBR partition table. I did not find a way to prepare a kernel image in a
JK> way that I could write it to sd0d, avoiding the restoration of the MBR
JK> partition table with fdisk.

But my sd0c starts after sd0d. When I was installing NetBSD for the first time
I found that NetBSD on my RS/6000 behaves differently than it does on x86 (or
than FreeBSD does on x86). Specifically on x86 systems slices are within the
partition but it didn't work that way with RS/6000 and I found that on RS/6000
slices are not within partition but instead they span over the whole disk.
This was the only way I could partition my HDD with 1.6. So I created sd0c and
sd0d which match the entries of my MBR:

#        size    offset     fstype  [fsize bsize cpg/sgs]
 a:    131072     15120     4.2BSD      0     0     0   # (Cyl.   24 - 232*)
 b:    524288    146192       swap                      # (Cyl.  232*- 1064*)
 c:   4211605     15120     unused      0     0         # (Cyl.   24 - 6709*)
 d:     15118         2       boot                      # (Cyl.    0*- 23)
 e:    524288    670480     4.2BSD      0     0     0   # (Cyl. 1064*- 1896*)
 f:    262144   1194768     4.2BSD      0     0     0   # (Cyl. 1896*- 2312*)
 g:   2769813   1456912     4.2BSD      0     0     0   # (Cyl. 2312*- 6709*)

Partition table:
0: sysid 65 (Linux/MINIX (sharing disk with DRDOS) or Personal RISC boot)
    start 2, size 15118 (7 MB), flag 0x80
        beg: cylinder    0, head   0, sector  3
        end: cylinder   23, head   4, sector 62
1: sysid 169 (NetBSD)
    start 15120, size 4211605 (2056 MB), flag 0x0
        beg: cylinder   24, head   0, sector  1
        end: cylinder  558, head   4, sector 62

Partition 0 matches sd0d and marked as bootable
Partition 1 matches sd0c and all other slices (except for sd0d) are within
sd0c

Maybe things have changed since 1.6-Release?
I'm doing everything exactly I as I did when I installed 1.6-Release kernel.
It worked fine for me at that time.

You can also notice that my PReP BOOT partiton starts from sector 3, so my
partition table stays the same after I write boot image to sd0d and I don't
need to restore it.

Could you please send me partition and slice tables of your box?

Shouldn't the kernel say something like 'Failed to mount root partition' when
there are problems with mbr/disklabel and if / was mounted then it should find
init without problems?

Is kernel in /netbsd required on the root partition for prep architecture?

I guess I should boot with sysinst_com0 from 1.6.1 and check wether it sees my
prtitions correctly.

-- 
Oleg Sharoiko.
Software and Network Engineer
Computer Center of Rostov State University.