moving /usr

Simon Barner barner at
Fri Nov 7 04:54:02 PST 2003

Please enter a subject next time -- many people will skip your message

> I've installed 4.8 off CD onto a PII-200 w/ 80MB ram and two ide's, primary 
> has 1GB, secondary has 2GB.
> Don't understand how to allocate /usr to the secondary ide or even give it 
> more space on the primary, and I run out of room with only 1/4 GB for /usr 
> to install most of the binaries. Would like for starters to allocate both 
> those hd's to FreeBSD and have enough room to install Samba and see if I 
> can then communicate over my LAN.

So, if I understand you right, you have space left on your 2GB hd, and
you would like to move your /usr partition there?

1.) Allocate space on that 2nd hard disk:

You can also use /stand/sysinstall for this.

2.) Shutdown to single user mode
3.) Assuming that your new user is mounted on /mnt/, the
following command will copy everything from /usr there.

# /usr
# tar -cpf - -C /usr . | tar xpvf - -C /mnt/

Please also refer to the tar(1) man page!

3.) Now edit /etc/fstab and make your new copy the default (the best is
to write the partition of the old /usr on a piece of paper, or keep it
as a comment in /etc/ftab.

4.) Done. Unmount /mnt/ and mount it to /usr. There isn't even a
need to reboot :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: Digital signature
Url :

More information about the freebsd-questions mailing list