simple question

Lynn David Newton plug-discuss@lists.plug.phoenix.az.us
Tue, 7 May 2002 23:10:24 -0700


  Rod> I want to move a root directory "/home" to a
  Rod> partition "/dev/hdb5"...sounds simple enough.
  Rod> Thanks for answering this newbie question.

Something like this ought to do it ... as root, of
course:

mount /dev/hdb5 /mnt  # or wherever
cd /home
find . -print | cpio -pudvm /mnt
umount /mnt

edit /etc/fstab to say something like:

/dev/hdb5 /home ext3 defaults 1 2

If the original /home is in the root file system, then
just run

mv /home /oldhome

I *think* that should work without problems. Then you
can mount /home and clear out /oldhome.

It would probably easiest to do all this in single user
mode to kill anything that might want to hold on to
resources. To do that run

init 1 

before you start. When everything is done run init 5 or
else reboot.

Doing this in my head with music playing in the
background is like playing mental chess. I probably
left out something important, but someone else will
come along and correct me.

-- 
Lynn David Newton
Phoenix, AZ