Latest LQ Deal: Latest LQ Deals
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 05-22-2004, 09:33 PM   #1
LQ Newbie
Registered: Sep 2002
Posts: 18

Rep: Reputation: 0
Question Why can't I restore a partition table backup containing a reiser partition?

Sigh, I can't find out why my HD images won't work with mandrake. I use the SystemRescueCD to backup my entire /hda drive using the following script:

echo " **************************************************
echo " Caution!!! This program will backup your hard drive"
echo -n " Do you want to proceed (Y/N)?"
read answer
if test "$answer" != "Y" -a "$answer" != "y";
then exit 0;
#mount the USB drive /sda1 and /mnt/images/backup
mkdir /mnt/images/backup
mount /dev/sda1 /mnt/images/backup
#backup the partition table from file
sfdisk -d /dev/hda > /mnt/images/backup/winxpm10partfile
#Backup the MBR to file
dd if=/dev/hda of=/mnt/images/backup/winxpmd10mbrfile bs=512 count=1
#Backup the images with Partimage
partimage save -b -z1 -f3 -o -d -e /dev/hda1 /mnt/images/backup/winxpprt
partimage save -b -z1 -f3 -o -d -e /dev/hda2 /mnt/images/backup/md10bootprt
partimage save -b -z1 -f3 -o -d -e /dev/hda3 /mnt/images/backup/md10rootprt
echo "Image backup is complete"

Where /hda1 is a windows partition, /hda2 is my boot partition (ext3), and /hda3 is my main mandrake partition (ReiserFS).

Backing everything up works great and everything can be restored as long as my partitions don't become modified. If I have to restore the partitions, when I run the reverse step of above (i.e. - I run "sfdisk -d /dev/hda < /mnt/images/backup/winxpm10partfile") I get an "invalid partition layout" error, the partition creation fails, and I basically lose my ability to restore my hd in on quick method.

Funny thing is that when I have FC1 or FC2 installed with the same setup (i.e. - /hda3 is ext3), everything works correctly for the restore process.

Any ideas why this is failing for mandrake / reiserfs? Is there a better way for storing the whole hd (partition/ mba / data ) in an easy-to-restore bundle? This frusstrates me tremendously, as I would rather use Mandrake but don't feel safe without being able to restore a backup image
Old 05-22-2004, 10:13 PM   #2
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Well you have me at a disadvantage as I haven't tried this with Mandrake or reiserfs.

One thing to look into tho... The part about using sfdisk and dd to save and restore the partition layout does seem kind of redundant but I read someplace that using the dd tool may be needed in the case of extended partitions.

Everytime I have installed Mandrake, it automatically sets up an extended partition.

With that in mind, maybe you should use dd to restore the mbr...

sfdisk /dev/hda < /mnt/images/backup/winxpm10partfile


dd if=/mnt/images/backup/winxpmd10mbrfile of=/dev/hda bs=512 count=1

EDIT: I just loaded Mandrake 10 on a box and as I expected, it created an extended partition. My partition table looked like this....
/dev/hda1 NTFS
/dev/hda2 Extended
/dev/hda3 Empty
/dev/hda4 Empty
/dev/hda5 Linux /
/dev/hda6 Linux Swap

I backed up the partition table using sfdisk and dd tool which is good because restoring the table using sfdisk failed ( because of the Extended partition ) . The partition restore worked using the dd tool so now I will proceed to restore the systems.

I'll let you know if that works ok.

Last edited by homey; 05-23-2004 at 01:23 AM.
Old 05-23-2004, 01:11 AM   #3
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Forgot to mention, the Mandrake system was using reiserfs.

Using the dd tool worked completely. So there is no need to use sfdisk until it is able to handle extended partitions.
I normally use Redhat and that system doesn't automatically create extended partitions. That's why I never had a reason to use dd instead of sfdisk.

Hope this helps abit.


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
How to restore partition table without a CDROM? welson_sun Fedora - Installation 2 10-11-2005 04:30 PM
backup partition table twantrd *BSD 1 08-20-2005 08:01 PM
ext3 partition table restore pats Linux - General 1 07-22-2005 11:44 PM
Overwrote partition table. System still running. :) Ways to restore? sleeper.service Linux - Hardware 9 12-19-2004 02:06 PM
No partition table present on scsi drive How do I restore it? kosiadis Red Hat 1 10-17-2003 05:50 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:56 PM.

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
Open Source Consulting | Domain Registration