--- On Thu, 6/24/10, Linuxguy123 <linuxguy123(a)gmail.com> wrote:
I'm moving /, /boot and swap from a
conventional hard drive to an SSD.
Both drives are 160 GB in size.
I want to resize the /boot and swap partitions from 200 MB
and 2 GB to
500 MB and 8 GB respectively. The first
resize is because preupgrade
now fails to run unless /boot is 500 MB or larger and the
second because
the swap file is supposed to be as big as the RAM in the
computer and my
laptop currently has 4GB and I want to upgrade to 8 GB in
the future.
[snip]
So how do I move ALL the data from / on the hard drive to /
on the sdd ?
dd won't work because its for device files, not for
partitions. If I
use dd between the devices, it won't resize anything.
In Linux, "everything's a file." ;-)
No, dd won't "resize" a partition, but you can use it to copy the filesystem
from one partition to another of the same size or larger, then just resize the filesystem
using an appropriate tool. I've done this. Not that hard at all.
Or should I do an outright dd and then use gparted to
resize everything
afterward ?
I would dd the filesystem on each partition separately for safety. Not the whole drive.
Although, what you said above will work.
Can one make cp copy EVERYTHING on one drive to another and
keep the
timestamps, etc, all correct ?
[snip]
I've used cp with the -a "ARCHIVE" switch set, and it worked quite well. The
copied files should be exact duplicates of the old. However, I copied the contents of one
partition at a time. Never tried to do a whole drive all at once.
B