Subject: Re: problems booting (Error 3) after drive swap
To: None <>
From: David Laight <>
List: netbsd-users
Date: 05/21/2004 22:32:33
> The problem is that for some reason, I have the fdisk partition 
> starting earlier on the disk.  I'm contemplating just running fdisk and 
> changing the start point of that partition -- the amount of storage 
> involved is small compared to the size of the disk.  But -- do fdisk 
> or disklabel round things to any boundaries?  I'm trying to understand 
> how the problem happened in the first place.  (Hmm -- there are 3780 
> unused sectors between the start of the mbr partition and the start of 
> the NetBSD partition.  What would happen if I made wd0h point to that 
> sliver, and copied /boot there?  Would it know to look in the 'a' 
> partition for /netbsd?)

The important thing is that the bootxx_ffsv1 code must be at the start
of the mbr partition.  That code will do a bit of hunting in order
to find /boot - falling back to the offset of the 'a' partition is
the disklabel (of that mbr) if everything else fails.

You can move the base of the netbsd mbr partition, but you'll have to be
careful you don't lose the disklabel.

- Shrink the existing mbr partition to be just the 'slither'
- Create a second (type 169) mbr partition that starts at 'a'
- Use the bootsel stuff to boot the 2nd ptn - should work.
- rewrite the netbsd label (from the kernel, not with -r)
  (the kernel writes the same label into all netbsd ptns)
- change the type of the first netbsd ptn


David Laight: