D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] Copying partitions to new (larger) HDD

 

Hello.
I've just bought a 500Gb SATA drive (/dev/sda) for my PC. The old drive 
is a 120Gb IDE drive (/dev/sdb).

The old drive is destined for other uses, so I need to copy all the 
partitions to the new drive and run my system from there.

However, I'm not quite sure how to go about this. If I was to do dd 
if=/dev/sdb of=/dev/sda, what will happen to the extra space on the end 
of the disk? And will the partition table be OK or will that not work?

The other question is, if I was to create partitions in advance on the 
new disk and copy individual partitions like this:
dd if=/dev/sdb1 of=/dev/sda1
would that work, provided the destination partition is larger than the 
old one? Or do I have to do something afterwards to make it use all the 
space?

Any ideas?

Thanks in advance.
Simon

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html