Moving the root partition

Jessy Blanchette yellowdog-general@lists.terrasoftsolutions.com
Thu Jan 30 10:27:00 2003


Try using cpio vs cp (  find ./ | cpio -pm {new root mnt point).
By using find you can isolate each partition and move them individually.


On Wed, 29 Jan 2003, Pat Plummer wrote:

> I have a problem I'd like to get you folks to comment on.
>
> I'd like to move my root partition to a new hard drive with everything
> intact so that it boots correctly.
>
> My machine is a Network Server 700 (not that that matters) with YDL 2.3
> and has 5 hard drives installed:
>
> /dev/sda4 -> /
> /dev/sda2 -> /boot
> /dev/sda3 -> swap
> /dev/sdb2 -> /home
> /dev/sdc2 -> /var/ftp
> /dev/sdd2 -> /var/www
> /dev/sde2 -> /tmpboot (new boot partition)
> /dev/sde3 -> swap
> /dev/sde4 -> /tmproot (new / partition)
>
> I have a 4G boot HD (sda) with the following partitions:
> 1: apple
> 2: 40 MB boot partition (ext2)
> 3: 256 MB swap
> 4: remaining is / (ext2)
>
> and I'd like to move / to a new 18GB drive (sde) that has the following
> partitions:
> 1: apple
> 2: 50 MB boot partition (ext2)
> 3: 256 MB swap
> 4: remaining is / (ext2)
>
> I have already used parted to make the partitions on sde and format the
> ext2 partitions (sde2&4).
>
> I created temporary mount points (/tmpboot and /tmproot) and mounted
> the boot and / partitions on the new drive to these temporary mount
> points respectively and will make the correct changes to fstab when all
> is settled.
>
> I moved all the boot files to the new boot partition using cp -a .
>
> I am in the process of moving all of the / files using this same
> command (cp -a) to their new position.
>
> My question is: will this be adequate to create essentially a clone of
> my existing / partition on the new drive or is there a better way to do
> it?
>
> Pat
> ~~~~~~<<<>>>~~~~~~
> Powered by Mac OS X
> via an Apple Network Server 700
> running Yellow Dog Linux 2.3
> ~~~~~~<<<>>>~~~~~~
> Pat.Plummer.MD
> ppat@fmtc.com
> blacksun@ix.gotdns.org
> ~~~~~~<<<>>>~~~~~~
>
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general@lists.terrasoftsolutions.com
> http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
>