Port-i386 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: booting from wd0b / raidframe
On Wed, Dec 09, 2009 at 09:27:44PM +0000, David Laight wrote:
> Look at sys/arch/i386/stand/bootxx/boot1.c, rules foe finding /boot are:
>
> 1) Try for a filesystem at the start of the 'type 169' partition
> 2) Add 64 sectors and try again
> 3) Look at disklabel (2nd sector of ptn) info for 'a'
> 3a) If 'a' is FS_RAID, add 64 sectors
> 3b) look for fs.
>
> Once an fs is located (probbaly looking for magic numbers) then try
> to open /boot itself.
1)
Partition table:
0: NetBSD (sysid 169)
start 63, size 1953525105 (953870 MB, Cyls 0-121601/80/63), Active
Bootselector disabled.
First active partition: 0
wd0b: 4195233 63 swap # (Cyl. 0*- 4161)
So no filesystem there.
2)
# dd if=/dev/rwd0b skip=64 bs=512 count=1 | hexdump -C
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|................|
*
So nothing there either.
3)
Disklabel found:
# dd if=/dev/rwd0b skip=1 bs=512 count=1 | hexdump -C
1+0 records in
1+0 records out
512 bytes transferred in 0.023 secs (22260 bytes/sec)
00000000 57 45 56 82 05 00 00 00 72 61 69 64 00 00 00 00 |WEV.....raid....|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...|
00000030 10 00 00 00 65 92 1d 00 f0 03 00 00 b0 6d 70 74 |....e........mpt|
00000040 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................|
d_headswitch, d_trkseek, d_flags, d_drivedata[0]:
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
d_spare[4], d_magic2, d_checksum, d_npartitions, d_bbsize
00000080 00 00 00 00 57 45 56 82 71 55 07 00 00 20 00 00 |....WEV.qU... ..|
|wd0a
v
00000090 00 20 00 00 b0 ff 3f 01 e0 03 40 00 00 00 00 00 |. ....?...@.....|
p_fstype
000000a0 13 00 00 00 a1 03 40 00 3f 00 00 00 00 00 00 00 |......@.?.......|
000000b0 01 00 00 00 71 6d 70 74 3f 00 00 00 00 00 00 00 |....qmpt?.......|
000000c0 00 00 00 00 b0 6d 70 74 00 00 00 00 00 00 00 00 |.....mpt........|
000000d0 00 00 00 00 10 02 80 07 90 03 80 01 00 00 00 00 |................|
000000e0 13 00 00 00 70 02 80 25 a0 05 00 09 00 00 00 00 |....p..%........|
000000f0 13 00 00 00 a0 65 f0 45 10 08 80 2e 00 00 00 00 |.....e.E........|
00000100 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
p_fstype = 0x13 = 19 = FS_RAID => 3a) is true.
p_offset = 0x4003e0 = 4195296, 4195296 + 64 = 4195360, and its
partition table will be in 4195360 + 1
3b)
# dd if=/dev/rwd0d skip=4195361 bs=512 count=1 | hexdump -C
1+0 records in
1+0 records out
512 bytes transferred in 0.001 secs (512000 bytes/sec)
00000000 57 45 56 82 0e 00 00 00 72 61 69 64 30 00 00 00 |WEV.....raid0...|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 00 00 00 00 00 00 00 00 00 02 00 00 80 00 00 00 |................|
00000030 08 00 00 00 ff 4f 00 00 00 04 00 00 00 ff 3f 01 |.....O........?.|
00000040 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000080 00 00 00 00 57 45 56 82 86 43 05 00 00 20 00 00 |....WEV..C... ..|
|raid0a
v
00000090 00 20 00 00 00 00 40 00 00 00 00 00 00 00 00 00 |. ....@.........|
000000a0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000b0 00 00 00 00 00 ff 3f 01 00 00 00 00 00 00 00 00 |......?.........|
*
000000d0 00 00 00 00 00 ff ff 00 00 00 40 00 00 00 00 00 |..........@.....|
000000e0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200
p_fstype = 7 = FS_BSDFFS
and
/dev/raid0a on / type ffs (local)
# ls -l /boot
-r--r--r-- 1 root wheel 65276 Dec 8 17:36 /boot
Yet I can boot from the network, but not from the disk...
(pxeboot nfs:netbsd, raid0:rootfs)
(I think in the previous email I checked the mbr, and bootxx, so this is
becoming a mystery... All I can think of to try next is a newer NetBSD60
as opposed to the NetBSD40 bootxx combination)
Cheers,
Patrick
Home |
Main Index |
Thread Index |
Old Index