Create an image of a pure Ubuntu-Installation on Macbook Pro

2

I'm running Ubuntu 11.10 on my Macbook Pro (Late 2009) as the only operating system, so theres's no Mac OS X oder Bootcamp installed. It runs fine and now i'd like to create an image of the current installation.

Unfortunately my Acronis True Image cd doesn't boot on this device and my attempts to create an image with partimage or dd from a bootable ubuntu live cd to a external hd failed ("can't read from block 0"). Are there any others out there with such an installation and if yes: how did you succeed in imaging your partition/device?

Stefan Müller

Posted 2012-03-23T10:27:52.550

Reputation: 21

What is the DD command you're trying from the Ubuntu live CD? I've had success with that method, on a similar model of MacBook, using Puppy Linux 4.3 as a live CD. I don't know if it matters, but I also have rEFIt (http://refit.sourceforge.net/) installed in my firmware.

– Zac B – 2012-03-23T14:33:42.460

dd would have worked, but it dumps the whole partition in its original size. i thought it should be possible to grab only the occupied sectors, like partimage does. so an image in 250 gb size from which only 20 gb are occupied is not a good option. – Stefan Müller – 2012-03-23T15:16:28.590

Answers

0

If you can get dd working on a liveCD (I prefer Puppy Linux), try this (block sizes etc are up to you):

  1. From your liveCD, write zeros to all of the free space on the drive. dd if=/dev/zero of=/path/to/anywhere/on/drive bs=4096
  2. Delete the zero file: rm -f /path/to/zero/file/from/step/1
  3. Create a compressed disk image of the drive: dd if=/dev/disk/you/want/to/image bs=4096 conv=noerror,sync | gzip -c > /path/to/compressed/image/backup.img.gz

There's a good deal more info on this process, and directions for taking backups of various partition tables/filesystem configs available here.

Zac B

Posted 2012-03-23T10:27:52.550

Reputation: 2 653