LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using PartImage to Save a Windows XP drive (https://www.linuxquestions.org/questions/linux-newbie-8/using-partimage-to-save-a-windows-xp-drive-596952/)

AnEyeForTexas 11-03-2007 07:22 PM

Using PartImage to Save a Windows XP drive
 
I have a win xp box with 2 drives, C: and E:. The system is on C:, the data on E: (which is much bigger).

I am trying to use partimage in a Ubuntu 7x live-cd session to create an image of the system drive in a directory named "backup" on E:. But everything I try drives me to a dead-end with an inscrutable error message.

So, are there any preconditions which must be met before I can do this? The Ubuntu file browser sees both disks and has rw access to them.

Do I have to "mount" the drive(s) in a terminal first? If so, how? When I try, mount tells me that the drive doesn't exist in /etc/fstab. If I try to edit /etc/fstab, no can do.

Partimage sees the source drive, but I don't know how to describe the target file/location.

I must have spent 20-30 hours on this and still have no backup image. Any help would be appreciated.

dgar 11-03-2007 08:25 PM

An absolute emergency backup can be created with
dd if=/dev/sda1 of=/some/path/with/a/TON/of/space bs=32k

I don't recommend it.

IIRC, Partimage checks to see if the partition is 'dirty' meaning a chkdsk has to report OK, and the system shut down cleanly. This might hose you. It's a risk.

To mount an ntfs system do the following:
sudo mkdir -p /mnt/windows
sudo umount /dev/sda1
sudo mount -t ntfs-3g /dev/sda1 /mnt/windows

There are some bug reports that the new Gutsy kernel is somehow 'grabbing' the NTFS device.... check with this maybe?

sudo lsof /dev/sda1

AnEyeForTexas 11-04-2007 08:03 AM

Thanks for the reply. At least I know what I should do. However ...

I can make the mountpoint directory (/mnt/windows) but I can neither unmount nor mount /dev/sdb (which is how fdisk reports my data drive). When I try, I'm told that the directory does not exist. The actual error message is:

Failed to access '/dev/sdb': No such file or directory

Indeed, when I ls -la as root, there is no such directory.

There is nothing under /media either.

This is all happening from a Ubuntu live (7.x) cd.

Any other ideas?

Gary

dgar 11-04-2007 09:53 AM

Ahh.

/dev/sdb is the "name" for the whole second device. (First could be a cdrom, but unlikely)

Partitions are named:
/dev/sda1 <-- First partition on first drive, usually a bootable part
/dev/sdb2 <-- Second partition on second drive
/dev/sda5 <-- First Logical Partition on first drive

The output of the following cut and paste would be very helpful:

Code:

sudo fdisk -l
On mine it looks like:
Code:

dan@sodoku:~$ sudo fdisk -l

Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x97c197c1

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        7269    58388211  83  Linux
/dev/sda2            7270        7296      216877+  5  Extended
/dev/sda5            7270        7296      216846  82  Linux swap / Solaris

Some other random tips I've found googling around:
Make damned sure your windows machine isn't in 'hibernate' mode.
Run a checkdisk and a defrag in windows first.
Do a 'shutdown' to make sure your not in hibernate mode. :)

I have never tried partimage on a Dynamic Disk type of windows partition. I don't think it will work, but I may be wrong. Have you tried windows 'ntbackup.exe' and try the 'automatic system recovery' backup option? You

dgar 11-04-2007 09:55 AM

Ahh.

/dev/sdb is the "name" for the whole second device. (First could be a cdrom, but unlikely)

Partitions are named:
/dev/sda1 <-- First partition on first drive, usually a bootable part
/dev/sdb2 <-- Second partition on second drive
/dev/sda5 <-- First Logical Partition on first drive

The output of the following cut and paste would be very helpful:

Code:

sudo fdisk -l
On mine it looks like:
Code:

dan@sodoku:~$ sudo fdisk -l

Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x97c197c1

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        7269    58388211  83  Linux
/dev/sda2            7270        7296      216877+  5  Extended
/dev/sda5            7270        7296      216846  82  Linux swap / Solaris

Some other random tips I've found googling around:
Make damned sure your windows machine isn't in 'hibernate' mode.
Run a checkdisk and a defrag in windows first.
Do a 'shutdown' to make sure your not in hibernate mode. :)

I have never tried partimage on a Dynamic Disk type of windows partition. I don't think it will work, but I may be wrong.

To attempt a data backup from another angle, have you tried windows 'ntbackup.exe' and try the 'automatic system recovery' backup option? ntbackup for windows home editions are found on the cd install media somewhere. :rolleyes:

AnEyeForTexas 11-04-2007 11:40 AM

Thanks again. I'm pretty sure that there's no hibernation going on, and that the disks are perfectly defragged.

Here's what happens upon attempting mount:

root@ubuntu:/# mount /dev/hdb1/backup
mount: can't find /dev/hdb1/backup in /etc/fstab or /etc/mtab
root@ubuntu:/#
root@ubuntu:/# mount /dev/hdb1
fuse: mount failed: Device or resource busy
FUSE mount point creation failed
Unmounting /dev/hdb1 ()

Unmounting /dev/hdb1 makes no difference to the above results.

Thanks for the ntbackup suggestion. I didn't know about it and will seek.

This is so frustrating. All I want to do is back up my hard drive. I can't believe it's this difficult!

Gary

dgar 11-04-2007 12:13 PM

I was shocked at hard it was to backup data since windows me and windows xp home edition. It spoke legions about what MS thinks of home users when they decided to deliberately remove the backup util from the default install!

AnEyeForTexas 11-05-2007 12:33 PM

Thanks to all! For reasons which I do not understand, mounting any drive from the live cd OS simply did not work. But I found a little utility for ntfs which mounted the drive just fine, and after that I was able to use partimage.

You're right about M$ backup limitations. They seem to think that home users just don't want to do it ... the tools the offer will do restorations, but only if the OS is working. If the OS has cratered, you're simply SOL. Which is why I turned to linux. It was an ordeal, but ahhh! The feeling of security!

Gary


All times are GMT -5. The time now is 08:55 AM.