Subject: Re: Garbled message from bootblocks [ Re: bootxx_ffsv1 or bootxx_ffsv2? ]
To: David Laight <david@l8s.co.uk>
From: Neil Booth <neil@daikokuya.co.uk>
List: current-users
Date: 08/11/2003 22:16:31
David Laight wrote:-
> bootxx_ffsv1 and bootxx_ufs are (basically) identical and almost certainly
> the one you want.
> Quite why the newfs man page talks about FFS and UFSV2 I don't know.
> IMHO it show either say FFSv1 and FFSv2 or UFSv1 and UFSv2, mixing the
> acronyms isn't helpful.
OK.
> That is the prompt from the mbr_bootselect code not the biosboot code.
> I'm not sure how you've managed to get that installed with invalid
> message strings.
Me neither.
> Boot from CD or floppy and run fdisk on the disk. A recent(ish) fdisk
> will report something like (this is my disk):
[...]
> bootmenu: test2
> start 28900998, size 3614562 (1765 MB, Cyls 1799-2024)
> Bootselector enabled, infinite timeout.
>
> Note that the bootselector menu texts are displayed if defined.
OK, this helps thanks. I've used fdisk to add a bootmenu, even
though I only have one thing I want to boot, and rewritten
mbr_bootsel as prompted.
I'm in this position because I have set up raid1 following the
instructions at
http://www.neverland.ch/netbsd/Mirroring.with.NetBSD-1.5.2.txt
I now have the setup working (coincidentally my setup is practically
identical to his) except for the boot process. The bootblocks files and
commands have changed since the document above was written, and I suspect
that I'm either doing something wrong or the new code has bugs in it.
I have no idea which.
Just 20mins ago I re-did the following:
newfs /dev/wd0f
/usr/sbin/installboot /dev/rwd0f /usr/mdec/bootxx_ffsv1 /usr/mdec/biosboot
which succeeeds. When I reboot, I get the menu with no garbage, I select
1 and then:
NetBSD/i386 ffsv1 Primary Bootstrap
Boot failed: Can't open /boot
NetBSD/i386 ufs Primary Bootstrap
>> NetBSD/i386 BIOS, Revision 3.0
[snip]
booting hd0f:netbsd - starting in 0
Here I have to interrupt it because hd0f:netbsd doesn't exist,
only hd0a:netbsd does, so I have to enter this manually. Doing
this, everything boots OK.
I see three problems:
1) Why does the ffsv1 Primary Bootstrap fail?
2) Where on earth does it manage to find the ufs Primary Bootstrap? I've got
a nasty feeling that if I do something slightly wrong here I'll
completely lose bootstrappability. Since it starts looking for
hd0f:netbsd I'm guessing it must be in hd0f, though this doesn't make
much sense considering I newfs-ed it a few moments ago.
3) Why does it try to boot hd0f:netbsd and not hd0a:netbsd?
Sadly, all existing examples are not helpful as they are all out of
date. I have no idea what I'm doing wrong or what to try next - any
help appreicated as I'm way out of my depth.
If it's useful, here's the output of fdisk and disklabel for wd0:
-bash-2.05b$ sudo /sbin/fdisk wd0
Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 77545, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 78165360
BIOS disk geometry:
cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 78165360
Partition table:
0: NetBSD (sysid 169)
bootmenu: NetBSD
start 63, size 78165297 (38167 MB, Cyls 0-4865/145/1), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>sh-2.05b$ sudo /sbin/disklabel wd0
# /dev/rwd0d:
type: ESDI
disk: mydisk0
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 77545
total sectors: 78165360
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
6 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 1048576 2111 RAID # (Cyl. 2*-
1042*)
b: 2097152 1050687 RAID # (Cyl. 1042*-
3122*)
c: 78165297 63 unused 0 0 # (Cyl. 0*-
77544)
d: 78165360 0 unused 0 0 # (Cyl. 0 -
77544)
e: 75017521 3147839 RAID # (Cyl. 3122*-
77544)
f: 2048 63 4.2BSD 512 4096 520 # (Cyl. 0*-
2*)
Bootselector enabled, timeout 10 seconds.
Neil.