Moving directories after installed

Gerard Beekmans gerard at
Wed Mar 20 10:09:54 PST 2002

On Wed, Mar 20, 2002 at 11:57:07AM -0600, Bill Williamson wrote:
> 1. The really tough part (for me): get lilo on hdB, then physically swap it
> over to be hdA.  I'm guessing i'll need to fudge something with the config
> when I run lilo, but I'm not sure what.  I know to switch it to hdA i simply
> make it primary master, but not how to trick lilo into thinking hdb will be
> hda once I reboot.

Try using 'lilo -b /dev/hdb'. This will install lilo in the MBR of hdb, and
when hdb becomes hda the BIOS should read the lilo in there.

Just make sure that /etc/fstab has the proper entires for /dev/hda and not
> So basicly how do I move everything from /usr and /home to the new drive?
> My best guess:
> 1. go into runlevel1
> 2. fdisk new disk into 5 and 15
> 3. format with e2tools or something
> 4. mount under /newusr and /newhome
> 5. cp -r /usr /newusr
> 6. cp -r /home /newhome
> 7. mv /usr /oldusr
> 8. mv /home /oldhome
> 9. mount 5 as /usr, 15 as /home
> 10. set up /etc/fstab for new /usr and /home
> 11. reboot
> 12. tar /oldhome and /oldusr just in case, then rm -rf /oldhome /oldusr if
> the system comes up
> Am I missing anything?  Will I totally kill my system due to me making a bad
> assumption?

Sounds fine to me. One small change: don't use "cp -r" but "cp -a". -a will
do a recursive copy as well but it'll also preserve original permissions,
ownerships and so forth. That way the files under /home won't be owned by
root after the cp but still by whoever they were set to originally.

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-
Unsubscribe: send email to listar at
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list