Subject: Re: Booting net NetBSD 2.1 Install gives "Error 3" error.
To: <>
From: David Laight <david@l8s.co.uk>
List: netbsd-users
Date: 12/11/2005 19:17:43
On Sat, Dec 10, 2005 at 09:07:00PM -0800, brendon@christian.net 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

That looks fine.

...
> I just wiped out the first sector or so then by issuing the command:
> 
> dd of=/dev/rwd0d count=4096 if=/dev/zero
> 
> After doing that and then doing a re-install (...)  i got a different error.
> It was the BIOS No System disk error.

With these sort of problems it can be worth using hexdump -C to dump the
first sector of the disk (and partitions) its contents can be enlightening.
The main body of sector 0 should match one of /usr/mdec/mbr*, and that of
the partition bootxx_ffsv1.

Looks like (somehow) sector 0 doesn't contain code that the BIOS deems
valid - although there are no well defined checks it can do.
(The 'Not a system disk' output if you put a floppy in, is actually from
the boot code on the floppy!)

> 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.

Maybe the debian fdisk only wants to play with complete cylinders.
The last cylinder of the disk is typically incomplete.

> I had created that by asking the NetBSD installer to "Use the whole
> disk" for the partition. 

That should just give the same as you had above - one partition from
sector 63 to the volume end.

> 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 can only guess it is marginally smaller....

> 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.

That indicates that the contents of sector 63 are unlikely to be boot code.

> I do not know what mbr_bootsel or mbr_ext are

mbr: code that will only boot the active partition, long error messages.
mbr_bootsel: boot select code, terse error messages
mbr_ext: boot select code, capable of booting from partition in the extended
    partition chain.  terse error messages, always uses LBA reads so won't
    work with old BIOS.

> so i am unsure what the installer uses. 

The first one (in the order above) that satisfies the requirements of
the installation.

> One question from the previus mail i sent:
> 
> when at the boot prompt when booting from the cd, if i type:
> 
> boot wd0a:
> 
> It says that the device is not configured. Should this be the case?

You need to use 'hd0a', not 'wd0a' since the number refers to the way
the bios numbers disks.


	David

-- 
David Laight: david@l8s.co.uk