Subject: Re: Disklabelling
To: Paul Goyette , 386BSD-list <port-i386@NetBSD.ORG>
From: Brian Buhrow <buhrow@cats.ucsc.edu>
List: port-i386
Date: 05/04/1998 10:07:46
	I think the problem you're having withyour boot disk is that you have
a boot block which doesn't understand the new NetBSD partition ID while you
do have a kernel that does expect the new partition ID.  To fix this
problem I would:

1.  Install a new version of the boot block which understands both the old
ID and the new one.

2.  Reboot to test.

3.  Change the ID from 165 to 169 just as you describe in your message.

4.  Reboot to test.

	I can't speak to the problem you're having with your second disk at
the moment, except to say that I usually write a disktab entry for such
disks, then use:
disklabel -w -r <disk number> <disk type>
<disk type> is the name I've given it in disktab.  This usually gets me
going.
One other thing you might check with the second disk is to use: 
fdisk -u /dev/rsd2d
or whatever the raw partition/device is on your system.  It could be that
there is some bogus partition info there from a former time that is
screwing disklabel up.

Hope this helps.
-Brian

On May 2,  4:09am, Paul Goyette wrote:
} Subject: Re: Disklabelling
} It was suggested that pfdisk was the solution/answer to both of the
} following two questions.  If so, then I am obviously doing something
} wrong, because it didn't work.  I'll be happy if someone calls me an
} idiot for doing things the way I did, but I'll be even happier if simple
} step-by-step instructions can be provided!  :)
} 
} 
} 1. When I boot my system, it complains about "old BSD partition ID" a
}    few times.  I know this is because I've still got 165 (0xa5) instead
}    of 169 (0xa9), but how do I change it without losing any data?
} 
} I used ``pfdisk 0'' and then changed the definition of partition 2 from
} ``2 165 261 521'' to ``2 169 261 521'' and used the W command to write
} the results.  When I tried booting NetBSD, it told me that there was no
} bootable partition.  I was still able to boot Win-95 from partition 1.  
} 
} I reran os-bs to update the boot and active flags, but still it
} complained about no bootable partition.  Fortunately, when I used pfdisk
} to put back the original value for partition 2's ID, NetBSD booted up
} just fine.
} 
} 2. I've got a 2nd SCSI disk on my system.  I've run fdisk (both from DOS
}    and under NetBSD), but still disklabel complains that the label is
}    "fictitious" and refuses to write out a new one.  It (disklabel) says
}    to use "disklabel -r" to write the initial label, but that doesn't
}    work, nor does it make sense.
} 
} I'd already run ``fdisk -i'' on this drive from NetBSD, so I wasn't too
} surprised when pfdisk showed me the existing h partition.  I ran pfdisk
} and did a W any away to force it to update the on-disk label.  But when
} I use disklabel under NetBSD (or even when I just boot), it still
} complains about there being no on-disk label.  And disklabel still says
} to use ``disklabel -r'' to write the initial label, but it still doesn't
} work or make sense:  Why would one use -r [r=read?] to write an initial
} label?
} 
} 
} -----------------------------------------------------------------------------
} | Paul Goyette      | Public Key fingerprint:    | E-mail addresses:        |
} | Network Engineer  |   0E 40 D2 FC 2A 13 74 A0  |  paul@whooppee.com       |
} | and kernel hacker |   E4 69 D5 BE 65 E4 56 C6  |  paul.goyette@ascend.com |
} -----------------------------------------------------------------------------
} 
} 
>-- End of excerpt from Paul Goyette