Subject: Re: Booting net NetBSD 2.1 Install gives "Error 3" error.
To: None <>
From: Cliff Wright <>
List: netbsd-users
Date: 12/11/2005 21:10:30
On Sat, 10 Dec 2005 21:07:00 -0800 wrote:

> Hi and thanks for the reply.
> I am not entirely sure what output you are after from fdisk. I just then issued the command:
> fdisk /dev/rwd0 
> And got the following:
> 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: 240, sectors/track: 63 (15120 sectors/cylinder)
> total sectors: 78152400
> Partition table:
> 0: NetBSD (sysid 169)
>     bootmenu: NetBSD
>     start 63, size 78156162 (38162 MB, Cyls 0-5169/15/1), Active
> 1: <UNUSED>
> 2: <UNUSED>
> 3: <UNUSED>
> Bootselector disabled
This is curious showing "Bootselector disabled" and yet has a bootmenu.
Of the three mbr's, mbr has long error messages not numbers,
mbr_bootsel has error numbers, and shows the boot select prompt that
your earlier message showed, mbr_ext has both the error numbers, and
boot select code. So if the short number only error messages
showed, I would not expect to see "Bootselector disabled".

mbr_ext will only access the disk using lbr, no chs. So this could
work better if the primary boot is outside of a chs range. Although
I would not expect this for your set-up. This can be installed by
fdisk (fdisk -ic /usr/mdec/mbr_ext).
 The boot sequence is for the mbr (sector 0) code to load the 1st sector
shown in the dos partition table active partition (sector 63 in your case).
This sector is called the pbr (partition, or maybe primary boot record).
This is the first 512 bytes of the primary boot code bootxx_ffsv1.
The last 2 bytes of this sector should be the hex 55 aa. And it is the
check for this that would give the error 3 message from a NetBSD,
mbr_bootsel, or mbr_ext. fdisk tries not to step on existing tables,
and code (it is not just the partition table that fdisk tries to preserve).

> I just wiped out the first sector or so then by issuing the command:
> dd of=/dev/rwd0d count=4096 if=/dev/zero
This probably cleared much more than the 1st sector, try
dd of=/dev/rwd0d if=/dev/zero bs=512 count=1
> After doing that and then doing a re-install (Specifying NetBSD installer to use the whole disk for a 
> NetBSD partition) i got a different error. It was the BIOS No System disk error. 
This was probably due to clearing to much of the disk.

>I then ran an old debian 
> linux install CD and attempted to run fdisk from that on the drive, and it told me that the primary 
> partition that was setup by NetBSD was outside the physical bounds of the disk. I had created that by 
> asking the NetBSD installer to "Use the whole disk" for the partition. 
This may be due to a conflict with the bios chs.
> So using Linux fdisk, i erased the old MBR and created a new one that the linux fdisk sees as being 
> inside the physical bounds of the disk. I then restarted the NetBSD installer and reinstalled it on the 
> partition that i created with the linux fdisk. After re-installing again i got the "Error 3" message.
I now wonder if this is from the NetBSD mbr, or the Linux mbr.
> I do not know what mbr_bootsel or mbr_ext are so i am unsure what the installer uses. 
If a menu item is specifed fdisk will use mbr_bootsel, unless an
extended partition is/also specified in which case fdisk will use mbr_ext,
else mbr is used.