Subject: Re: Pain about disklabel
To: None <port-i386@NetBSD.ORG>
From: Berndt Josef Wulf <wulf@hal9000.apana.org.au>
List: port-i386
Date: 01/11/1996 15:38:49
Greg Earle writes:
> 
> >  Today I hooked up a new hard drive to my Pentium machine.  Drive is for
> 
> [This should be posted to port-i386@NetBSD.ORG, then.  Followups redirected.]
> 
> > NetBSD only.  Thought all I had to do is to edit a disklabel and write that
> > one.  Disklabel reports me that there is an illegal DOS partition without
> > NetBSD-id.  The drive was never been partitioned under DOS, nor does
> > DOS-fdisk report any partitions.
> 
> Undoubtedly because it's a "new hard drive", yes?
> 
> >  I was lucky that I had a copy of the disklabel for the new drive, because
> > on reboot the disklabel was empty and thus no partition found.
> > Resurrecting the partitions was easy.
> 
> How could you "resurrect" something that was brand new?
> 
> >  My question:  What am I supposed to do before/while hooking a new drive?
> > Is "pfdisk" the answer for all new drives, even if for NetBSD-only?
> 
> I believe so.  Our PC had a single 2.1 Gb DOS-only disk on it, and I added
> a 2.1 Gb Seagate to it fresh out of the box.  Since I was doing a fresh
> install, maybe it was easier, since that mandates running "pfdisk" and
> assigning a "NetBSD"-tagged partition, etc.  Once I did that, I rebooted from
> the 1.1 boot floppies and away I went.  No problems.
> 
> 	- Greg
> 
> 
If worst comes to worst you still can edit the /etc/disktab. 

	1.) Get the device parameter from dmesg and note them down. 

	2.) Edit /etc/disktab file 
	    	duplicate a existing table in order to have a template
		change the label name
		edit the device parameters as noted from dmesg
		edit/change partition parameters
		double check the newly created table and save

	3.) Use disklabel to write new disklabel
		disklabel -w <device> <label>

	4.) Install new file-system on all newly created partitions

	5.) Edit /dev/fstab accordingly

	6.) Have fun

It worked for me and as you can see haven't lost my connectivity ;-)

cheerio Berndt

-- 
E-Mail	: wulf@hal9000.apana.org.au
Phone	: ++61 411 245170
Sysinfo	: DEC AXPpci33+, NetBSD-1.1a