[409] in netbsd-help mailing list archive
Re: I've installed NetBSD on my machine
daemon@ATHENA.MIT.EDU (Greg Hudson)
Wed Nov 1 16:45:17 1995
To: farnaz@MIT.EDU
Cc: netbsd-help@MIT.EDU
In-Reply-To: Your message of "Wed, 01 Nov 1995 12:33:48."
<9511011733.AA22421@MIT.MIT.EDU>
Date: Wed, 01 Nov 1995 16:44:45 EST
From: Greg Hudson <ghudson@MIT.EDU>
> Also, how do I create more filesystems on a second hard drive which
> I have?
Here's an area where NetBSD falls rather short. I'm going to explain
the procedure assuming that your NetBSD partition is on the first hard
drive. If your NetBSD partition is on the same hard drive as you want
to create more filesystems on, DON'T do what I've said here; the
procedure will be simpler. Also, I'm assuming IDE disks here; replace
"wd" with "sd" if you're using SCSI disks.
First, you need to make a NetBSD partition on your second disk. You
can use the NetBSD "fdisk" program to do so, with:
fdisk -u /dev/rwd1d
Second, you need to know (from fdisk):
* The total number of sectors on your second disk
* The size and offset of your NetBSD partition
Now, type:
disklabel wd1 > /tmp/label
This will construct a bogus and incorrect disklabel from thin air, and
put it in /tmp/label. You can type "disklabel wd0" to get an example
of a real disklabel; you want to edit the last part of the bogus
disklabel to read:
4 partitions:
# size offset fstype [fsize bsize cpg]
c: A B 4.2BSD 1024 8192 16
d: C 0 unused 0 0
where A is the size of your NetBSD partition, B is the offset, and C
is the total number of sectors on your second disk. You'll note that
real disklabels have comments at the end giving cylinder numbers; you
don't need to fill those in.
Now do:
disklabel -r -R wd1 /tmp/label
this will read /tmp/label and install it as the disklabel of wd1. If
you need to further edit your wd1 disklabel at some point, "disklabel
-e wd1" should now work.
Now run:
newfs /dev/rwd1c
(If you screwed creating the disk label, that's the command which will
destroy the data on your hard disk.) Then run "mkdir /u2" and add to
your /etc/fstab:
/dev/wd1c /u2 ufs rw 1 1
You should be able to "mount /u2" at this point, and when you reboot,
/u2 will be mounted.