Running partimage from an Ubuntu LiveCD

Filed under: TechNotes, Data Recovery — lars @ 18:18:29

After spending a lot of time setting up my new Vista x64 install just the way I like it, I decided it would be a good idea to make a backup image of the boot partition so I could restore it in case something goes horribly wrong in the future.

I didn't realise that, although partimage is not included as a pre-installed application on the Ubuntu 8.04 LiveCD, that you can install it whilst running the LiveCD without actually needing to install Ubuntu to your hard drive.

The steps are as follows:

  1. Boot from Ubuntu 8.04 LiveCD (I recommend 32-bit - partimage gave me segmentation fault errors using the 64-bit version)
  2. Run Synaptic Package Manager.  Go to Settings - > Repositories -> select 'Community-maintained Open Source software', then click Close, then Reload.
  3. Open a terminal (from the Accessories menu)
  4. Run the following:
    sudo apt-get update
    sudo apt-get install partimage
  5. At this point I recommend running the Partition Editor from the System -> Administration menu.  It's a good way of checking which partition it is that you want to back up.  eg: /dev/sda1
  6. Then I go to the Places menu and select from the list the partition I want to write the image to.  This will automatically mount this partition, as well as open it in a Nautilus window (which I close).  If you don't have space on your PC you might want to manually mount a samba share (or some other network storage) a this point (see steps in section below).
  7. If you then return to your terminal and run:
    cd /media
    ls -l
    you should see your destination partition mounted there.  Keep this in mind, as you will need to know this path later (eg: /media/mydisk)
  8. Then run
    sudo partimage
    from the terminal.  This will launch partimage's UI in the terminal window.  It should be pretty self explanatory from here how you back up or restore a partition - but if you want more help there's a decent guide here.


Update: Dec 06, 2008

Using partimage with SMB

Often you will want to use partimage to backup or restore your partition to an SMB/windows network share, as you don't always have space on your local PC on which to store your partition backup.  To do this, there are some additional steps to enable mounting of the share:

  1. From the terminal, run:
    sudo apt-get install smbfs
  2. Then to mount this network share so that it is part of the filesystem:
    cd /media
    sudo mkdir myNetworkShare
    sudo smbmount //192.168.0.2/shareName /media/myNetworkShare -o username=teddy,password=badbear
    You should now be able to access the files on your network share under /media/myNetworkShare, and can select a location under here to create/restore your partition backup.



Restoring your FireFox Scrapbook index file

Filed under: TechNotes, Data Recovery — lars @ 06:54:58

Recently my Firefox Scrapbook items seemed to disappear, which was quite alarming. I suspect filesystem troubles caused by sharing the same Scrapbook between Windows and Linux on my dual-boot laptop, using the then beta version of the ntfs-3g drivers. It seems the index file (scrapbook.rdf) had been lost. My scrapbook data was still there, but all the categorisation and metadata stored in the index file was lost.

But fortunately, it seems the author of the Scrapbook extension had some foresight. In my Scrapbook folder/directory, I found a directory called "backup" that contained a bunch of files that look like this:

-rwxrwx---    1 1000     1000       200480 Mar 14 21:07 scrapbook_20070314.rdf
-rwxrwx--- 1 1000 1000 200480 Mar 15 20:53 scrapbook_20070315.rdf
-rwxrwx--- 1 1000 1000 201037 Mar 16 14:00 scrapbook_20070316.rdf
-rwxrwx--- 1 1000 1000 208 Mar 17 17:22 scrapbook_20070317.rdf

These RDF files are seemingly automatically created backups of the XML representing the index of your Scrapbook. Just pick the most recent (large) version and replace the scrapbook.rdf file in your Scrapbook directory, and you're back in business.




Recovering deleted NTFS Partition

Filed under: Data Recovery — lars @ 14:58:19

I recently deleted a couple of NTFS partitions from a dodgy hard-drive and had to attempt to recover them. Big thumbs up to the Windows-based GetDataBack from the guys at Runtime software that was able to recover alot of my files (though not all unfortunately), even after a bunch of other linux-based partition and file-system recovery tools failed to find a working NTFS filesystem. Really easy to use, I recommend it.

Update: 23 Oct 2009

I just read an interesting Slashdot story on this topic and a couple of the recommended free tools were TestDisk and PC Inspector.




powered by  b2evolution | blog tool | framework | hosting