[TriLUG] How to move root partition?

Michael Hrivnak mhrivnak at triad.rr.com
Mon May 31 12:27:06 EDT 2004


Boot knoppix or equivalent, and mount the old and new partition.  It'll go 
faster if the two drives are on different IDE channels.

cp -avx /mnt/old/* /mnt/new/

I suggest reading the man page to see just what those flags are doing.

I'm pretty sure the limitation you are referring to is bios-specific.  Rather 
than squeezing your root partition when this is a problem, you might try 
making a /boot partition.  It just needs to be large enough to hold a handful 
of kernels, assuming you're not a kernel pack-rat.

For good measure, reinstall the boot-loader when you're done copying.  That 
should do it!

Michael



On Monday 31 May 2004 01:24 am, Tom Bryan wrote:
> I have 3 hard drives on my main machine.  Because of their history, I have
> parts ended up with /, parts of /usr, and /home spread across the three
> drives.  I have just freed up some space, and I'd like to get the 3 drives
> down to 2 so that I can use the third for a new box I'm building to play
> with Debian.
>
> I've planned most of the steps of the move, but I need some (hopefully
> simple) advice.
>
> 1) I'm going to have to move /, /usr, and /home during this migration.  In
> all cases, I will be moving them to another hard drive on the same machine.
>  What is the best way to move the data?  I'd like to preserve symlinks,
> permissions, modtimes, and such.  A simple cp -p?  Something more fancy?
> Speed isn't crucial since I have all day, but correctness and not losing
> anything is.  I have a bunch of unused space in /opt if I need to
> temporarily dump some data locally (for example, if the best approach is to
> dump(8) /home there and then restore(8) it to a new location).
>
> 2) The drive that currently houses my root partition (which includes /boot)
> is the one that's going away.  Do I need to do anything special when moving
> my root partition?  Do I just copy the data and then toggle the bootable
> flag in fdisk?
>
> 3) Does grub have the old "1024 cylinder" limitation that LILO had?  I've
> always separated / and /usr in the past so that / will be small and can fit
> under the 1024th cylinder.  I'd love to drop that restriction since
> otherwise I'll need to repartition a disk that has a lot of data on it.
>
> Thanks,
> ---Tom



More information about the TriLUG mailing list