[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving /home to its own partition.



On Sun, 2003-08-03 at 22:31, alex wrote:

> How would you create new swap and /home  partitions om hdb so Debian 
> would use these instead of the original /home and swap?

First create the new partitions using cfdisk or fdisk (cfdisk is easier
to use) and then remove the old swop partition, edit /etc/fstab and
reinitialise the new swop partition.

I.E

cfdisk /dev/hdb
Add Partitions, but on the swop partition, choose the label option and
user the ID number 82 (swop)

/sbin/swapoff -a
/sbin/mkswap /dev/hdb?
/sbin/swapon /dev/hdb?

Depending upon what file system you would like to use (I use ext3), so 

/sbin/mkfs.ext3 /dev/hdb? (This is the new home partition)
mv /home /home.orig
Edit /etc/fstab and edit the swop partition to the new device, and also
add the new home mount point:

/dev/hdb?       /home        ext3    defaults     0       0 

mount -a

mv /home.orig/* /home

> Additionally, how could you best utilize the space gained by 
> transferring data from the original /home to the new /home partition?

This will depend upon what u want, you could resize the root partition?
or even the /usr partition, using parted (apt-get install parted)

Hope that helps

Mark



Reply to: