Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsDiscussion Forum → Cloning a Hard Drive
Cloning a Hard Drive
2007-05-16, 4:07 PM #1
I have a ubuntu linux installation that I want to copy to a larger hard disk, since I have only 2gb of space left.

I was planning to copy the drive over with dd, but I've heard that dd does not take into account the extra space when copying to a larger drive since all data (including partition tables) is copied verbatim, so I would still be stuck with what I had before .

Is there a better (preferably easy ) way to clone a hard drive? I would prefer not to do a reinstall on the new drive since I would lose months of adjustments and tinkering.
2007-05-16, 4:24 PM #2
Linux is much easier to copy than Windows.

Just partition the new drive the same as the old one (same number of partitions and same location), then copy the data over (copy/paste, literally), then finally rerun grub and reinstall the bootloader to the new drive's MBR.
2007-05-16, 4:53 PM #3
You could just DD it over, then re-size the partition on the new drive to account for the additional space, which is really pretty easy to do under linux.
"Well, if I am not drunk, I am mad, but I trust I can behave like a gentleman in either
condition."... G. K. Chesterton

“questions are a burden to others; answers a prison for oneself”
2007-05-16, 4:57 PM #4
Originally posted by West Wind:
You could just DD it over, then re-size the partition on the new drive to account for the additional space, which is really pretty easy to do under linux.


How safe is this? Like I said before on another thread, I've had bad results doing this with NTFS partitions, hopefully Ext3 can handle it better.

(of course, I could always copy it again if it gets screwed up)
2007-05-16, 7:17 PM #5
Resizing partitions always comes with the usual disclaimer. But to be honest I can’t even count the number of partitions I’ve personally resized, and never have I run into any problems. That said, I’ve also seen first hand data loss due to resizing, so it really can and does happen. But since you would only be working with a backup of the original hard drive anyway, there is nothing to loose but some time, I would say go for it.
"Well, if I am not drunk, I am mad, but I trust I can behave like a gentleman in either
condition."... G. K. Chesterton

“questions are a burden to others; answers a prison for oneself”
2007-05-16, 7:43 PM #6
I don't see why you don't try my method and avoid any potential problems anyway.
2007-05-16, 9:12 PM #7
I've used Mondo several times in the past and its worked beautifully. It allows you to make a dvd of a hard drive that will image the drive when booted it. Also, the program will make the image from a system currently running. I don't think you should have any problem with the image resizing.

Another option is to DD the image over and use something like QParted live cd that will resize the partition size to match the new drive.
Yet Another Massassi Map | Sadly I Have a Blog Too
2007-05-16, 9:38 PM #8
I appreciate the advice, guys, but it turns out that the new HD is a dud. (Ubuntu setup reported write errors, and even though I eventually got it through installation ubuntu would stall while booting)

I can't really complain, though, since I got it for free; it came with a computer that someone in one of my classes just wanted to get rid of. It is a 2001-era 1ghz compaq (not a great desktop by today's standards but it would make an acceptable low-volume Linux server) I just chop-shopped the PC to get the HD out. (It was a 60gb Maxtor)

I'll keep this advice in mind once I get another drive off of ebay.
2007-05-16, 9:40 PM #9
Originally posted by Aaron:
I've used Mondo several times in the past and its worked beautifully. It allows you to make a dvd of a hard drive that will image the drive when booted it. Also, the program will make the image from a system currently running. I don't think you should have any problem with the image resizing.


Nice, I've been looking for a decent GPL knockoff of Norton Ghost.
2007-05-17, 6:26 PM #10
http://sourceforge.net/projects/g4l

Ghost4Linux, it works very well.
2007-05-17, 10:02 PM #11
Didn't you just get a computer wizardry job?

You'd think you'd know how to do this. Cloning a drive is a fairly common nerdcentric skill where I come from.
2007-05-17, 10:50 PM #12
Originally posted by Rob:
Didn't you just get a computer wizardry job?

You'd think you'd know how to do this. Cloning a drive is a fairly common nerdcentric skill where I come from.


It's not really an IT job, it's more about web/graphic design. (although I might have to set up a LAMP server at some point)

I know how to clone a HD with dd (as I mentioned before). I was simply wondering if there was a better way.

↑ Up to the top!