First let's partition the new drive. As it's going to be a second drive in the system we just set it up like we want. If you're unsure about size requirements of your partitions use LVM. (I'm not going to cover it here.)
This will hopefully give you enough pointers to figure out what to do.
- Don't use
dd
unless you're making an identical copy of the old (let's say swapping disk to a faster, but of the same size). First partition new drive, then format the partition (for example ext4). Then the actual copy can be done with: tar -c --one-file-system -f - . | (cd /newPartitionMountPoint/; tar -xvf -)
- New drive: no, Using
dd
for partition: No, After parted
: Yes (unless that formats the partition automatically)
- Well when you're change partitions that existed before, you also have to edit
/etc/fstab
use blkid
to see new and old UUID + LABELS and change fstab accordingly. If you had /boot
on separate partition on /dev/sda
that's most of it.
- Partition size for root is subjective. I've actually never needed bigger than 20G
root
, but that means I have separate partitions for /var/lib
(if database is needed), /data
for my generic data needs and of course /home
Moving system around harddrives is easier in linux than in windows, but the most difficult move is moving '/' and '/boot'. I'd say a lot easier for you would be to check where you're using your space with: du -hsc /*
Then create a partition for the largest folder (like /usr
)
/dev/sdb1 20G LABEL=myusr
/dev/sdb2 100G LABEL=myhome
Then create usrtmp folder and sync old usr there:
Please note that this is advanced stuff and might screw up your system even if everything worked ok. Basically, if you knew how to do this then go a head. If you did not know.. then I would not do this...
mkdir /usrtmp
mount LABEL=myusr /usrtmp
cd /usr
tar -c --one-file-system -f - . | (cd /usrtmp/; tar -xvf -)
# this might be dangerous so I would do it with livecd myself..
# If you're feeling risky do this:
cd /
mv /usr /usr_old && mv /usrtmp /usr
## Now you can edit /etc/fstab to mount LABEL=myusr to /usr
## if you forget this but you did the mv then you won't be able to use your system
## Reboot, if everything is okay, you can remove /usr_old
## Repeat the same for home, but change labels accordingly
http://www.sysresccd.org/Download