D&C GLug - Home Page

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

Re: [LUG] Copying partitions to new (larger) HDD

 

> 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?

I did that a while ago to move from a 20gig drive to a 30gig. It was a
while ago so the details are a bit fuzzy. As I recall, the partition
table had some idea of the drive size stored in it so something didn't
see the full drive (as in it said there wasn't any unpartitioned space
when there was 10gigs of it). I believe it was fdisk to the rescue
there.

> 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?

The issue here is that either you need to make the partitions exactly
the right size or make it bigger and resize the filesystems to fit or
put up with unused space.

Normally I'd go for the mount and copy option too but I was trying to
transfer windows across while in someone else's house without any
install disks.

-- 
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