-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kumar Golap wrote:
| Hi All,
|
| I am thinking of migrating my system disk (/usr   etc..) to a bigger one
|
| Any ways of how to do that withuot doing a fresh install...
|
| May be its similar to how people may want to clone a system
|
| And more important is that my portage state needs to be remembered so
| that i can update later without a hitch.

Here is a simple script that I use to backup my system to another
partition.  You will need to modify it for you partition information.

#!/bin/sh

ORIG=hda3
BACKUP=hda6

# Create new file system on backup
mke2fs -j /dev/${BACKUP}

# Mount the backup file system so we can restore to it
mount /dev/${BACKUP} /mnt/tmp

# cd to the backup file system and do a dump and restore
cd /mnt/tmp
dump 0f - /dev/${ORIG} | restore rf -
cd /root

# Now we need to fix the fstab on the backup file system
sed 's/hda3/hda6/' /mnt/tmp/etc/fstab > /tmp/fstab.tmp
mv /tmp/fstab.tmp /mnt/tmp/etc/fstab

# Now lets verify the new fstab by cating it to the screen
cat /mnt/tmp/etc/fstab

# Remove restoresymtable
rm /mnt/tmp/restoresymtable

# clean /mnt/tmp/tmp
rm -rf /mnt/tmp/tmp/*

# unmount the tmp filesystem
umount /mnt/tmp

HTH
Mike

- --
Mike Noble
Email: [EMAIL PROTECTED]
Key ID: 0xFFDFC13B
Key fingerprint: 8204 1297 B9AD 0CED 2FCE  1FB0 9491 5824 FFDF C13B
Keyserver: http://pgpkeys.mit.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFCBTsDlJFYJP/fwTsRAqKZAJ4vXpTlmzuqJRGAkl0QViKPSPey4QCfUxqm
gltdXR6M+LgT58fhk+SKy+M=
=rYRO
-----END PGP SIGNATURE-----

--
[email protected] mailing list



Reply via email to