Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-19-2010, 04:23 PM   #1
LQ Newbie
Registered: Nov 2008
Location: Texas
Distribution: Ubuntu
Posts: 8

Rep: Reputation: 0
Question Restore an image: how to preserve file system?

We are trying to restore a LAMP server (Ubuntu 8.10 Server) that had some irreparable blocks on the HD. I used Clonezilla to back up what I thought to be a single image of the entire drive, but now it looks like it is just an image of the primary partition. OK, I can live with that... we reinstalled Ubuntu, then I booted the box from a live CD and tried to restore the old image over the primary partition. I used the following command:

cat system_drive_backup.img.gz.* | gzip -dc | dd of=/dev/sda

... Stolen from the thread at

Upon rebooting, GRUB hung (not unexpectedly). When I tried to reinstall GRUB, I discovered that there was no detected file system on the primary partition! I can only assume that the dd command blew it away... ?

Clonezilla has failed me in restoring the drive, but I still have img.gz.aa and img.gz.ab; seems like there should be a way to restore that back to the new HD. Any suggestions? (I really don't want to have to rebuild that box!) Thanks in advance...
Old 02-19-2010, 04:28 PM   #2
Senior Member
Registered: Nov 2006
Distribution: Debian Squeeze SMP AMD64
Posts: 3,318

Rep: Reputation: 126Reputation: 126
If you only backed up a partition, then you need to restore to a partition, not to the drive. So, partition your drive properly, then restore this way:
cat system_drive_backup.img.gz.* | gzip -dc | dd of=/dev/sda1
Notice "sda1" (first partition) instead of "sda"(drive). You will probably have to reinstall grub. Use Super Grub Disk unless you're confident in your abilities with grub.
Old 02-19-2010, 05:43 PM   #3
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,802

Rep: Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167
What makes you think you have a "dd" image ?.
Last I looked, clonezilla will use any of several (filesystem aware) tools to do the imaging - only resorting to dd if all else fails.
Why aren't you using clonezilla to do the restore ?.


disk recovery

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Hard drive Ubuntu Operating system 9.10 Complete back up and restore thedoctor Linux - Newbie 18 01-18-2010 06:09 AM
System reboot stop at kernel panic - after restore from clone image beeth2006 Linux - Server 4 09-18-2008 02:24 PM
clonezilla clone disk to image, when restore from image to destination hdd problem. hocheetiong Linux - Newbie 3 05-06-2008 07:59 PM
LXer: Creating a dd/dcfldd Image Using Automated Image & Restore (AIR) LXer Syndicated Linux News 0 03-07-2007 05:16 PM
how to restore the default file permissions (whole system) ? bbbb Linux - General 2 11-05-2005 04:10 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:30 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration