Moving a partition

Bill Fink yellowdog-general@lists.terrasoftsolutions.com
Sat Mar 20 08:41:01 2004


On Sat Mar 20 2004, David Chart wrote:

> I want to move YDL from one partition on my PowerBook to another. (Well,
> from two to another two, actually.) I need to make more space for all
> the pictures I have in iPhoto and the music in iTunes...
> 
> Anyway, ideally I want to clone all the files, permissions and
> modification dates intact, from / (excluding /home) to a partition
> mounted under /mnt, and then do the same for /home. The idea is that
> I'll have exactly my current set-up on the new partitions, and it will
> work just as well as before...
> 
> I know I'll need to fix yaboot and fstab; is there anything else that
> uses the partition numbers rather than the file path?

I believe that fstab and yaboot.conf are all you need to worry about.
On my system I keep an alternate root file system that I can mount
on /alt, and I use the following rsync command to synchronize the
two file systems:

rsync -av -x --delete --exclude /.journal --exclude /lost+found --exclude /proc --exclude /alt --exclude /etc/fstab --exclude /etc/yaboot.conf /. /alt

This makes /alt an exact copy of /.

That way I can play around in the root file systems (major upgrades or
package installs for example) and if I happen to mess things up too
badly somehow, I can always get back to normal by booting into /alt
(I have an entry for this in yaboot.conf and when booted into /alt,
the primary root file system is then /alt).

						-Bill