Subject: Re: Adding a home partition
To: Chris <smirks@mail.eclipse.net>
From: Colin Wood <cwood@ichips.intel.com>
List: port-mac68k
Date: 02/25/1998 00:09:10
Chris wrote:
> What would be the easist way to add say a /home partition in NetBSD 1.3
> and have it come up on boot?
What kind of disk space do you have? ;-)
For the "generic" answer:
1) Create a partition of the desired size using your favorite formatting
software (or clean off an old partition that you don't need anymore).
2) Use Mkfs to zap the partition into a NetBSD Usr type partition.
3) Use Mkfs to "format" the partition
4) Boot into NetBSD (might as well be multi-user)
5) Archive your current home directory: (as root)
cd /
tar cvpf /tmp/home.tar /home
6) Figure out where your new partition is: first, find out which disk
device the partition is on (e.g. sd0, sd1) and do 'disklabel sdX' where
'X' is the number of the device in question. The output should show you
at least 1 new partition of type "NetBSD Usr". Remember which letter the
partition is assigned to.
7) Add the partition to /etc/fstab (here's mine, yours probably won't be
on 'e'):
/dev/sd0e /home ffs rw 1 2
8) Attempt to mount it:
mount /home
ls /home
You should get a relatively empty directory with only "lost+found" in it.
9) Unarchive the old home into the new one:
tar xvpf /tmp/home.tar
10) Unmount the directory:
umount /home
11) Remove the old directory, make a new one;
/bin/rm -rf /home
mkdir /home
11) Remount the new dir:
mount /home
12) Make sure everything is still there via 'ls'
At this point, you should be able to reboot and have the directory mount
automatically on multi-user boot.
I hope this helps.
Later.
--
Colin Wood cwood@ichips.intel.com
Component Design Engineer - MD6 Intel Corporation
-----------------------------------------------------------------
I speak only on my own behalf, not for my employer.