NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: installing bootblocks on a new drive
On Mon, Feb 23, 2009 at 03:53:20PM +0000, Milos Negovanovic wrote:
> On Mon, Feb 23, 2009 at 03:51:42PM +0100, Petar Bogdanovic wrote:
> > On Mon, Feb 23, 2009 at 03:42:58PM +0100, Petar Bogdanovic wrote:
> > > On Mon, Feb 23, 2009 at 11:50:21AM +0000, Milos Negovanovic wrote:
> > > >
> > > > After replacing a failed drive in RAID1 array I am trying to install
> > > > bootblocks on a new disk via:
> > > >
> > > > /usr/sbin/installboot -o timeout=5 -v /dev/rwd0a /usr/mdec/bootxx_ffsv2
^^^^^
ffsv2, right? Not ffsv1?
> > > > When I try to boot of the new drive all I get is a reboot? Any ideas?
> > >
> > > Is there any bootcode in the mbr of wd0 (see `fdisk -B' & mbr(8))? If
> > > not, does the partition table of wd0 contain an active partition?
> > >
> > > As far as I remember, the first 446 bytes of the mbr may be empty, if
> > > the mbr partition table contains an active partition and the BIOS is
> > > clever enough.
> >
> > Some indicators..
> >
> > # fdisk /dev/wd0
> > (...)
> > Partition table:
> > 0: NetBSD (sysid 169)
> > start 63, size 781422705 (381554 MB, Cyls 0-51681/95/63), Active
> > (...) ^^^^^^
> >
> > # dd if=/dev/wd0d bs=1 count=446 2>/dev/null | hexdump -C
> > 00000000 31 c0 8e d0 bc 00 7c 8e c0 8e d8 89 e6 bf 00 06
> > |1.....|.........|
> > 00000010 b9 00 01 f3 a5 b9 00 02 f3 ab ea 1f 06 00 00 80
> > |................|
> > 00000020 fa 8f 7e 02 b2 80 52 52 be 1f 07 e8 4a 01 bb 94
> > |..~...RR....J...|
> > 00000030 07 8d af 2a 00 8a 46 04 84 c0 74 0a 80 7e 00 80
> > |...*..F...t..~..|
> > 00000040 75 04 89 2e 84 0b 83 c5 10 83 c3 09 80 fb b8 75
> > |u..............u|
> > 00000050 e4 b8 e1 00 c1 e0 02 89 c6 8b b4 00 08 85 f6 75
> > |...............u|
> > 00000060 19 b8 2f 07 be 15 07 e8 14 01 89 c6 e8 09 01 5a
> > |../............Z|
> > 00000070 31 c0 cd 13 cd 18 fb f4 eb fc 66 8b 6c 08 f6 06
> > |1.........f.l...|
> > 00000080 91 07 04 75 43 5a 52 b4 08 cd 13 8b 44 02 50 c0
> > |...uCZR.....D.P.|
> > 00000090 e8 06 86 c4 c1 ea 08 42 f7 e2 8a 54 01 01 d0 83
> > |.......B...T....|
> > 000000a0 e1 3f f7 e1 5a 83 e2 3f 01 d0 48 39 e8 74 47 bb
> > |.?..Z..?..H9.tG.|
> > 000000b0 aa 55 b4 41 5a 52 cd 13 b8 67 07 72 a7 81 fb 55
> > |.U.AZR...g.r...U|
> > 000000c0 aa 75 a1 f6 c1 01 74 9c 66 89 2e 0d 07 be 05 07
> > |.u....t.f.......|
> > 000000d0 b4 42 5a 52 cd 13 b8 43 07 72 89 a0 00 7c 84 c0
> > |.BZR...C.r...|..|
> > 000000e0 74 03 a1 fe 7d 3d 55 aa b8 53 07 0f 85 75 ff 66
> > |t...}=U..S...u.f|
> > 000000f0 89 ee 5a e9 0a 75 5a 8a 74 01 8b 4c 02 bb 00 7c
> > |..Z..uZ.t..L...||
> > 00000100 b8 01 02 eb ce 10 00 01 00 00 7c 00 00 00 00 00
> > |..........|.....|
> > 00000110 00 00 00 00 00 45 72 72 6f 72 20 00 0d 0a 00 4e |.....Error
> > ....N|<
> > 00000120 65 74 42 53 44 20 4d 42 52 20 62 6f 6f 74 00 4e |etBSD MBR
> > boot.N|<
> > 00000130 6f 20 61 63 74 69 76 65 20 70 61 72 74 69 74 69 |o active
> > partiti|<
> > 00000140 6f 6e 00 44 69 73 6b 20 72 65 61 64 20 65 72 72 |on.Disk
> > read err|<
> > 00000150 6f 72 00 4e 6f 20 6f 70 65 72 61 74 69 6e 67 20 |or.No
> > operating |<
> > 00000160 73 79 73 74 65 6d 00 49 6e 76 61 6c 69 64 20 43
> > |system.Invalid C|<
> > 00000170 48 53 20 72 65 61 64 00 e8 03 00 be 1c 07 60 ac |HS
> > read.......`.|<
> > 00000180 b4 0e bb 01 00 cd 10 ac 84 c0 75 f4 61 c3 00 00
> > |..........u.a...|
> > 00000190 1c 80 b6 00 00 00 00 00 00 00 00 00 00 00 00 00
> > |................|
> > 000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > |................|
> > 000001b0 00 00 00 00 00 00 00 00 00 00 00 00 e1 b5
> > |..............|
> > 000001be
> >
> >
> >
> > Petar Bogdanovic
> >
> >
> >
>
> This is what fdisk says:
>
> # fdisk wd0
> Disk: /dev/rwd0d
> NetBSD disklabel disk geometry:
> cylinders: 969021, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
> total sectors: 976773168
>
> BIOS disk geometry:
> cylinders: 1023, heads: 81, sectors/track: 63 (5103 sectors/cylinder)
> total sectors: 976773168
>
> Partition table:
> 0: NetBSD (sysid 169)
> start 63, size 976773105 (476940 MB, Cyls 0-191411/44/63), Active
> 1: <UNUSED>
> 2: <UNUSED>
> 3: <UNUSED>
> Bootselector disabled.
> First active partition: 0
>
>
>
> And this is first 466 bytes:
>
> # dd if=/dev/wd0d bs=1 count=446 2>/dev/null | hexdump -C
> 00000000 31 c0 8e d0 bc 00 7c 8e c0 8e d8 bf 1d 06 be 1d |1.....|.........|
> 00000010 7c 50 57 b9 e3 01 f3 a4 b5 03 f3 ab cb 80 fa 8f ||PW.............|
> 00000020 7e 02 b2 80 52 52 bb 94 07 8d af 2a 00 8a 46 04 |~...RR.....*..F.|
> 00000030 84 c0 74 0a 80 7e 00 80 75 04 89 2e 84 0b 83 c5 |..t..~..u.......|
> 00000040 10 83 c3 09 80 fb b8 75 e4 b8 e1 00 c1 e0 02 89 |.......u........|
> 00000050 c6 8b b4 00 08 85 f6 75 19 b8 17 07 50 be 0d 07 |.......u....P...|
> 00000060 e8 03 01 5e e8 f9 00 5a 31 c0 cd 13 cd 18 fb f4 |...^...Z1.......|
> 00000070 eb fc 66 8b 6c 08 f6 06 91 07 04 75 43 5a 52 b4 |..f.l......uCZR.|
> 00000080 08 cd 13 8b 44 02 50 c0 e8 06 86 c4 c1 ea 08 42 |....D.P........B|
> 00000090 f7 e2 8a 54 01 01 d0 83 e1 3f f7 e1 5a 83 e2 3f |...T.....?..Z..?|
> 000000a0 01 d0 48 39 e8 74 47 bb aa 55 b4 41 5a 52 cd 13 |..H9.tG..U.AZR..|
> 000000b0 b8 4f 07 72 a7 81 fb 55 aa 75 a1 f6 c1 01 74 9c |.O.r...U.u....t.|
> 000000c0 66 89 2e 05 07 be fd 06 b4 42 5a 52 cd 13 b8 2b |f........BZR...+|
> 000000d0 07 72 89 a0 00 7c 84 c0 74 03 a1 fe 7d 3d 55 aa |.r...|..t...}=U.|
> 000000e0 b8 3b 07 0f 85 75 ff 66 89 ee 5a e9 12 75 5a 8a |.;...u.f..Z..uZ.|
> 000000f0 74 01 8b 4c 02 bb 00 7c b8 01 02 eb ce 10 00 01 |t..L...|........|
> 00000100 00 00 7c 00 00 00 00 00 00 00 00 00 00 45 72 72 |..|..........Err|
> 00000110 6f 72 20 00 0d 0a 00 4e 6f 20 61 63 74 69 76 65 |or ....No active|
> 00000120 20 70 61 72 74 69 74 69 6f 6e 00 44 69 73 6b 20 | partition.Disk |
> 00000130 72 65 61 64 20 65 72 72 6f 72 00 4e 6f 20 6f 70 |read error.No op|
> 00000140 65 72 61 74 69 6e 67 20 73 79 73 74 65 6d 00 49 |erating system.I|
> 00000150 6e 76 61 6c 69 64 20 43 48 53 20 72 65 61 64 00 |nvalid CHS read.|
> 00000160 e8 03 00 be 14 07 60 ac b4 0e bb 01 00 cd 10 ac |......`.........|
> 00000170 84 c0 75 f4 61 c3 00 00 00 00 00 00 00 00 00 00 |..u.a...........|
> 00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> 00000190 1c 80 b6 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> 000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> 000001b0 00 00 00 00 00 00 00 00 00 00 00 00 e1 b5 |..............|
> 000001be
Why don't you just copy the first few MBs from the bootable disk onto
the new replacement, reboot the machine and rebuild the set? That will
give you the same mbr/disklabel setup on both disks and you could then
retry booting from the new disk.
Petar Bogdanovic
Home |
Main Index |
Thread Index |
Old Index