On Thu, 13 Nov 2003 17:10:19 +0000 ben <[EMAIL PROTECTED]> wrote: > anyone know how to safely migrate /home to a new partition? i've > googled and checked the archives but can't find appropriate info. > > all clues gratefully appreciated. > > ben
Howdy Ben, The easiest way I've found is to create and mke2fs the partition first, then boot off of a boot floppy or bootable cd (provided you're not going to be using parted or similar software to shrink an existing partition before creating the new partition). After booting from the floppy or cd, copy /home to the new partition using something like "cp -a /home /new-home" (-a is very important, as it's the archive flag, and will tell cp not to follow symbolic links, but simply copy them as they are, maintain permissions, etc.). If the copy's successful (browse your directories, run du -hs on /home and /new_home, if home is currently on it's own partition, you can also check space used with df, etc. Once you're satisfied that everything's on /new_home, "rm -r /home" (Note: there's no turning back after you enter that command... double and triple check that things are like you want before you delete the old /home), then mkdir /home (this will be the new mount point for the home partition. Edit /etc/fstab to reflect the new partition for home and you should be ready to reboot. (If you don't edit /etc/fstab, it won't know where to find the /home directory and you'll notice that any user other than root has trouble logging in.) It can also be done without using a boot floppy/cd, but it's a lot harder because you are deleting files that might be in use currently for any users that are logged in, etc. The use of a boot floppy/cd is strongly recommended! HTH, Jacob P.S. Please start a new thread when you're starting a new subject, rather than replying to an existing thread. I've done it for you for this thread. ----- GnuPG Key: 1024D/16377135 C:\WINDOWS\RUN C:\WINDOWS\CRASH C:\ME\FDISK /usr/src/linux
pgp00000.pgp
Description: PGP signature