Sunday, 12 October 2008

mount a NTFS partition on hardware RAID0 controller under linux


My main computer has a major hardware issue (probably the motherboard, maybe the cpu).
I can't re-install windows, it crashes in the middle of the installation.

To complicate things, I've installed my windows on a (fake)hardware RAID0. It's fake because the raid part is handle by the windows driver. That's why you can still see the hard drives under linux as /dev/sda /dev/sdb etc... even after having setup your RAID0/1/5 Array in the bios.

As I'm not completely dumb, I've stored no critical data on the RAID array...
But still, I wanted to check that fact (I'm not dumb ;) and get some non critical files, such as game save (I don't play that much recently... so sad, but it may change once Diablo III or Starcraft II is released).

To get my data back, I've used a linux Distribution and use it's DMRAID capabilities.

I've downloaded and burned the Gentoo Live CD.
BTW, it's a really great distribution. I loved to installed it from scratch and compile all from sources.

boot onto it.
At grub prompt I typed the following to get DMRAID support :

boot: gentoo dodmraid


Once the livecd start up (when it could with my hardware issues) with a nice 1920*1200 interface, I opened a shell and do the following :

sudo -s                                   #(0)
alias ll="ls -la"                         #this one should be always set by default !
mkdir /a                                  #(1)
ll /dev/mapper                            #(2)
total 0
drwxr-xr-x  2 root root    180 Oct 13 00:18 .
drwxr-xr-x 17 root root   4320 Oct 13 00:18 ..
lrwxrwxrwx  1 root root     16 Oct 13 00:18 control -> ../device-mapper
brw-rw----  1 root disk 253, 2 Oct 13 00:18 nvidia_dacaiefa
brw-rw----  1 root disk 253, 5 Oct 13 00:18 nvidia_dacaiefa1
brw-rw----  1 root disk 253, 1 Oct 13 00:18 pdc_bjahfddb
brw-rw----  1 root disk 253, 4 Oct 13 00:18 pdc_bjahfddb1
brw-rw----  1 root disk 253, 0 Oct 13 00:18 pdc_caafigga
brw-rw----  1 root disk 253, 3 Oct 13 00:18 pdc_caafigga1



mount /dev/mapper/nvidia_dacaiefa1 /a     #(3)
cd /a
ll


So,
  • First: get root access
  • Next : create a simple directory within the root (remember it's a livecd, it's in memory modification). I needed the shortest path possible to not loose time typing long path as my system was really not stable.
  • Next : find the name of the device representing the Fake RAID. For me, it was nvidia_*. nvidia_dacaiefa is the (virtual raid0) hard drive, and nvidia_dacaiefa1 it's first and only NTFS partition.
  • Next : Mount the ntfs partition in the filesystem.
Finally, I used command such as :
tar jxf /tmp/BunchOfFiles.tar.bz2 path1 path2
and
scp /tmp/BunchOfFiles.tar.bz2 toto@my.server.com:/home/toto/tmp


to get my data out of this sick computer !

No comments: