Backup Windows installed on BIOS RAID with SUSE

From openSUSE

This article is in need of attention!
You are welcome to improve this article. Refer to this article's discussion page for more information.


If this article: [1] sounds very familiar to you, well, then you already know it all. I am not such expert to write an article of similiar worth, but newbies and intermediate users might find this useful...

I'll try to mitigate these circumstances by using as many as possible free tools when dealing with M$ stuff:

Backing Windows Vista installed on a BIOS RAID partition with OpenSUSE 10.x install DVD

Or some other Windows, or with some other Linux. Or any other partition on a RAID device (but Linux for one you would not have any reason to put on such inferior and expensive RAID other than to coexist with a Windows OS on the same computer, through dual boot).

The title I'd like to keep the same, regardless of the same procedure, other than the part concerning "dmraid -ay" can be applied to backup any other device. You sure can use this procedure, modified in the respective parts, for backing up your Linux installation, for example, and it doesn't have to be over your home network. But the title I think should remain as it is now, because it offers you a way to do a little something with your MS little OS in the open-source way... I am not, and never wish to be, familiar with MS things and ways (other than what I had to learn about those), but I don't think they can offer anything such as the reputable GNU Linux dd program, the true engine performing these backups I am writing about.

A word of caution: You may wish to skip to the notes at the very bottom and read what this procedure cannot be of any help with, since some intrinsic M$ qualities weigh in on the ways of the world and carry clout!

But the foremost word of caution needs to be put here. As soon as you tell MS you used Linux on your it-seems-privatized-by-MS computer, be it for anything but most typically dual booting, and most certainly backing up an MS OS partition, you are entitled to no MS tech support at all. So, since they generally still can't tell (but do find about "shred" below) who read and wrote the partition in question (I don't think anyone can tell who made the good restore if it's performed correctly, some program by Symantec or Norton, or your good old Linux --if it's executed correctly, all the, read slowly, bits, are where they were at the time the backup was taken from that partition in question... So just use a more appropriate description of your problem, and problems you'll be having on that stuff, and get the support... Of course these are wary of that issue, so, when I was trying to get MS support they kept asking me repeatedly whether I had Linux to dual boot with my Vista on my system... My brother manages booting, I only work on this Vista and it boots in automatically.... would be a good answer to such hypocrisy. It'd be great someone challenged them legally on this issue!

Vista Business. Abit KN8 Ultra. nVidia nForce4 RAID. stipe-mirroring 2x2 200GB WD2000KS HDD (SATA 2). That's 4x200GB = 800 commercial GB. 2x200 striped equals 400 GB, and it's mirrored to as much, so the other 400GB is ...for security .

Click the link just below and you'll find there's a way to boot into your Linux installed into a partition on the BIOS RAID, alongside Windows of some kind, by inserting a floppy disk upon firing up or restarting your computer, that is into your Linux installed without the Master Boot Record on the privatized-by-MS-they-would-want-it-to-be computer with being touched at all!

http://forums.suselinuxsupport.de/lofiversion/index.php/t50039.html

(that was for 10.2. For 10.3, pls. bare in mind there seem to be issues with BIOS RAID, at this time:

http://forums.suselinuxsupport.de/index.php?showtopic=62333

at least I had issues)

That much for those wishing not to have to deal with the Microsoft aversion to Linux. If there's no dual boot, and the Linux is being booted from the floppy, they must give you support, because the Linux didn't touch anything that Windows Operating System is installed on, or is having it's programs in, whatsoever. And if they should claim all of your RAID space disallowing you to even install something on a partition of it, I think so insane only that gang can get... Hopefully they wouldn't.

Of course, you should some day, if you're a novice, learn how to possibly use/rescue/anything-else your Windows partition, through GNU Linux programs such as ntfs-3g:

http://www.ntfs-3g.org/

So you may need as many as three or more blank DVD's to back up the partition Vista installed on. Two blank DVD's suffice to me at the time I started writing this (the Vista partition I was backing up was just over 42 GB or so). It did prove later, after many Suse updates (smart I like best, I'm afraid it's still not the default, so search for tutorials on it; I myself use it thanks to the advice a Suse developer gave me a few months ago, this is his site: http://jengelh.hopto.org/), that even one sole DVD disk sufficed, regardless of which of the two versions I used, Suse 10.2 or Suse 10.3.. Improved some code? Which exactly is our of the reach of my understanding of Linux.

I tried partedmagic-1.6, and I did learn very useful tricks with it, so I suppose in many an occasion of rescue partedmagic is the way to go. But Suse seems to offer more support with this particular hardware of mine.

You need local network. And a computer to back up your dd's files to. Or it could be the Vista computer itself if you have enough room on a suitable partition (a plain Linux partition of any kind, a Windows VFAT partition, or even an NTFS partition other than the one with the installed Vista -- but then you have to use ntfs-3g -- on the Vista computer itself).

There is one consideration concerning backing up anything M$. They seem to regard any kind of backup writing such as by some kind of Linux OS (be it on CD or from an adjacent partition), wrongfully as pirate business. I remember backing up another Windows locally on the host computer, and I understood clearly that there is no way of ultimately knowing by restoring somewhere else on the local computer, that your backup was successful. No way! The Windows would simply detect there was another clone of it on another partition on the same host, and... refused to log me in for that mere reason (I was left in the log in - log off loop). So take notice!

And, regardless of having a number of computers in my local network I don't need but one or two of them to run theirs, the MS Windows, stuff, so I'll know for myself if the backup was successful only when I will need it (and I usually do).

Once Suse 10.2 (same later with 10.3), in the menu of which, once the splash showed upon boot, you chose the rescue option, is up, run:

$ dmraid -ay

You should get something like this:

$ ls -l /dev/mapper


lrwxrwxrwx 1 root root 16 Jan 8 10:30 control -> ../device-mapper

brw------- 1 root root 253, 2 Jan 8 10:30 nvidia_djcbfhff

brw------- 1 root root 253, 0 Jan 8 10:30 nvidia_djcbfhff-0

brw------- 1 root root 253, 5 Jan 8 10:30 nvidia_djcbfhff-0_part1

brw------- 1 root root 253, 1 Jan 8 10:30 nvidia_djcbfhff-1

brw------- 1 root root 253, 4 Jan 8 10:30 nvidia_djcbfhff-1_part1

brw------- 1 root root 253, 3 Jan 8 10:30 nvidia_djcbfhff1

brw------- 1 root root 253, 6 Jan 8 10:30 nvidia_djcbfhff_part1


Command used (from "history" command I ran later):

  11  ls -l /dev/mapper/ |cat >> /tmp/AT8-Cmn/dd_70420_KN8-WVB/70420_KN8-WVB.devMapper

(actually I used just "l /dev/mapper", but that is Suse specific).

Purposefully I made one single partition so far, and that is what you see. Easier to explain.

nvidia_djcbfhff-0 or nvidia_djcbfhff-0_part1 is that 40 odd commercial GB partition that Vista is being installed on. And nvidia_djcbfhff-1 or nvidia_djcbfhff-1_part1 is the mirror of the same size, so nvidia_djcbfhff1 or nvidia_djcbfhff_part1 or both (I am not sure, but using any of them seemed to work for me) is the partition stripe-mirrored proper.

This backup of this story I was making on the first reboot after the Vista installation started. If it was to work, then at least there wouldn't be any more typing of that stupid code, the so called "Product Key" ... Arghhh... (and then I would not turn into a zombie - grin).

Actually, I had done this previously so I was confident that it would work, and I was to do the restore as I was writing... Yes, I piped in the history (pls. type "man history" without quotes) from the two consoles I used back then (when I first started this howto, I am doing a revision seven months on, it's November 2007) to do the backuping work, and was to get going. I had started writing this howto out of respect for the Open Source, GNU Linux, OpenSuSE and all the good guys, but I had little time, so I had to cut on some explanation.

  27  ip addr add 192.168.100.19/24 dev eth1
  28  ip addr
  30  ping 192.168.100.3
  32  mkdir /tmp/someNetWorkDir
  34  mount -t nfs 192.168.100.3:/Cmn /tmp/someNetWorkDir
  36  mkdir /tmp/someNetWorkDir/dd_70420_KN8-WVB
  57  cd /tmp/someNetWorkDir/dd_70420_KN8-WVB

(WVB is for Windows Vista Business, KN8 is my MBO. Also 70420 is a kind of time stamp. It stands for 2007-04-20. Good thing timestamps in the filenames of backups.)

On another console:

  48  mount /dev/mapper/nvidia_djcbfhff_part1 /tmp/Win_Vista

Of course, here you see all the M$ exuberance... like autoexec.bat, config.sys, Documents and Settings etc. etc. If not, you made something wrong, or something in your system is not supported, or I made a typo or some such, so you couldn't get what I meant (if you suspect of that, try contacting me, see in bottom, http://www.exDeo.com) :

  49  ls -l /tmp/Win_Vista
  54  umount /tmp/Win_Vista
  63  mount 

I believe it is imperative to unmount it before backing it up. "mount" alone lets you check if all is OK.

Now the engine of the backup needs to be put to work.

  65  dd if=/dev/mapper/nvidia_djcbfhff_part1 | gzip -6c  | split -d -b1080m - 70420_KN8-WVB_nvidia_djcbfhff_part1.dd

dd if=/dev/mapper/nvidia_djcbfhff_part1 reads the Vista installed partition on the RAID. That is piped to gzip to compress it at a good compression rate (of course if your preference is bzip2, substitute to your likeness), and further the compressed backup is split into 1080MB (not commercial but true megabytes, the "MiB"; actually I like to use -b1085m as 4 times 1085MB fit nicely on any DVD, to my knowledge), so that four of each such files can be comfortably burned on a DVD. "man split" for more. The "-" on it's own after b1080m, allows me to name the backup. "-" only means end of options and what follows it will be the backup file's name.

For the novices that might be reading this. The character "|" is the pipe, and I can't remember what else it might be called. On US keyboard, it's Shift + the closest key to the right Shift key. On UK keyboard it's Shift + the closest key to the left Shift key...

On the backup comp, reached through the local network, as above, these files I got, when I first started writing this howto, in the backup:


-rw-r--r-- 1 root root 1132462080 Apr 20 2007 70420_KN8-WVB_nvidia_djcbfhff_part1.dd00

-rw-r--r-- 1 root root 1132462080 Apr 20 2007 70420_KN8-WVB_nvidia_djcbfhff_part1.dd01

-rw-r--r-- 1 root root 1132462080 Apr 20 2007 70420_KN8-WVB_nvidia_djcbfhff_part1.dd02

-rw-r--r-- 1 root root 1132462080 Apr 20 2007 70420_KN8-WVB_nvidia_djcbfhff_part1.dd03

-rw-r--r-- 1 root root 1132462080 Apr 20 2007 70420_KN8-WVB_nvidia_djcbfhff_part1.dd04

-rw-r--r-- 1 root root 1132462080 Apr 20 2007 70420_KN8-WVB_nvidia_djcbfhff_part1.dd05

-rw-r--r-- 1 root root 1132462080 Apr 20 2007 70420_KN8-WVB_nvidia_djcbfhff_part1.dd06

-rw-r--r-- 1 root root 815104337 Apr 20 2007 70420_KN8-WVB_nvidia_djcbfhff_part1.dd07

As I said above, later, I got the whole of Vista partition on one DVD (improved Linux code?).

At this point you might want to store these files somewhere else than where you've made them (in my case on another computer running Suse Linux 10.x). I burn them on DVD disks. I don't have time for much explaning, but if you "man" in your console (my preference is konsole in kde), you might understand:

md5sum 70420_KN8-WVB_nvidia_djcbfhff_part1.dd?? >> MD5SUMS

mkdir 1 2

mv -i 70420_KN8-WVB_nvidia_djcbfhff_part1.dd0[0123] 1

mv -i 70420_KN8-WVB_nvidia_djcbfhff_part1.dd0[4567] 2

cp MD5SUMS 1

mv MD5SUMS 2

mkisofs -R -J -ldot -allow-lowercase -o 1.iso 1/

mkisofs -R -J -ldot -allow-lowercase -o 2.iso 2/

wodim -v 8 dev=/dev/hda 1.iso

wodim -v 8 dev=/dev/hda 2.iso

Of course, the mkisofs line is for Suse 10.2. Suse 10.3 has genisoimage instead.

Restoring as I said I would. Familiar enough with command line to know that it will actually write back that backup onto those 4x200 GB disks at the appopriate place where the original partition is which Vista is installed on. You can also see the HDD led giving up the HDD activity on the Vista comp (of course, issuing just "top" on another console will let you watch how the commands you issued use your computer resources).

$ top

This is the command for restoring: cat 70420_KN8-WVB_nvidia_djcbfhff_part1.dd0? | gunzip | dd of=/dev/mapper/nvidia_djcbfhff_part1

The "cat 70420_..." command concatenates them in the order these files were made by split (by dd, gzip and split actually). And that is piped to gunzip to be uncompressed, and it is dd'd into the original partition. Of course, again, a neat way to see what is happening, is just to issue "top" on another console and see dd and gunzip contending the first position...