Author Topic: How much HD space?  (Read 2953 times)

katuzo

  • Guest
Re: How much HD space?
« Reply #15 on: January 29, 2010, 12:16:27 PM »
Before I get started, there is one thing I have to do, that is back up my entire drive. I just purchased another 500Gb drive that is identical to the one I'm running. I put it in a fixture so I can plug it into my Thinkpad X61 (via usb2). As I said before, I current run PCLinux off my LiveUSB. Is there a program, for Linux, that will allow me to make a bit for bit image, of my current HD to the new HD?
FYI, I did use Snalypse? to put Gparted on my LiveUSB, so I can boot from there, and run it.
Thanks Richie

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: How much HD space?
« Reply #16 on: January 29, 2010, 12:42:15 PM »
Before I get started, there is one thing I have to do, that is back up my entire drive. I just purchased another 500Gb drive that is identical to the one I'm running. I put it in a fixture so I can plug it into my Thinkpad X61 (via usb2). As I said before, I current run PCLinux off my LiveUSB. Is there a program, for Linux, that will allow me to make a bit for bit image, of my current HD to the new HD?
FYI, I did use Snalypse? to put Gparted on my LiveUSB, so I can boot from there, and run it.
Thanks Richie


partimage can create backups of your partitions, and save space, but you should get a copy of the MBR to go with it (if your want the possibility of bare-metal restore.  However, that is not an actual bit for bit copy.

Code: [Select]
ddcan make a bit for bit copy (but a 500 Gb drive image will take 500 Gb to store, and it will take a while to run  :o )

You can compress the image with
Code: [Select]
gz
If you want to split the resulting file into chunks (so it could be stored on a FAT32 device, such as a USB key, for instance) you can use
Code: [Select]
split
So, to create an image of your drive:
Code: [Select]
dd if=/dev/sda | gzip -c | split -b 2000m - /path/to/image/file
This will create chunks ~2Gb each, with consecutive extensions (aa, ab, ac, etc)

And, to restore the image (if need be):
Code: [Select]
cat /path/to/image/file* | gzip -dc | dd of=/dev/sda

dd can be potentially destructive if you get the input and output mixed up (it could overwrite an entire harddrive happily  :o ), so be careful!

If you want the image file to be even smaller, and you don't care about restoring the deleted files that are still on disc, you could ''zero out" the empty space, which will allow the compression to be more effective.  Post a reply if that is of any interest.


katuzo

  • Guest
Re: How much HD space?
« Reply #17 on: January 29, 2010, 01:15:14 PM »
I wish to be able to literally replace my current hard drive with the one I have made a backup on. I'll look into PartImage capable since I already have that on the SystemRescueCD that I made. I don't mind spending the time, it's easy to back up now, then to try to recover later.
Richie

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: How much HD space?
« Reply #18 on: January 29, 2010, 02:01:10 PM »
I wish to be able to literally replace my current hard drive with the one I have made a backup on. I'll look into PartImage capable since I already have that on the SystemRescueCD that I made. I don't mind spending the time, it's easy to back up now, then to try to recover later.
Richie

As in, you want to be able to unplug your current drive, plug in the new one and boot up?

If that is the case, then:
Code: [Select]
dd if=/dev/sda of=/dev/<device ID of new drive>will produce an identical copy with which you could do this.

You should be able to get the device ID of the new drive by running
Quote
fdisk -l  <-- that's a lower case "el", not the number "one"
after you plugged in the new drive.