[plug] upgrading hard drive
Cameron Patrick
cp at chem.com.au
Sun Jun 9 12:46:46 WST 2002
G'day,
On Sun, Jun 09, 2002 at 10:05:30AM +0800, Jon L. Miller wrote:
> I need to run this by someone hoping to find the answer.
> Currently I'm upgrading a system that has a 10G hdd and I want to change
> that to a 20G hdd.
I did something similar a few days ago, only upgrading from 6GB drive.
> What is happening after I create the mounts (/dev/hdb1 /newhdd and
> /dev/hdb2 /newhdd/home) I issue the following:
> cp / && echo cp -a `/bin/ls -1Ab | egrep -v "^newhdd$|^proc$"` /newhdd |
> sh (all on one line)
> This is so the copying skips /newhdd and /proc.
Use tar, it makes things easier.
(cd /; tar -clf -) | (cd /newhdd; tar -xpvf -)
(cd /home; tar -clf -) | (cd /newhdd/home; tar -xpvf -)
[etc, repeat for any other partitions]
The "-l" option tells tar to only do stuff on one file system, and "-p"
tells it to preserve all permissions etc.
> Like to know what the formula is to calculate cyclinders into MB.
It depends on the HD. It's never really bothered me, though, because
fdisk does it for you.
CP.
More information about the plug
mailing list