Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 03-26-2005, 12:35 AM   #1
LQ Newbie
Registered: Jan 2005
Location: Singapore
Posts: 4

Rep: Reputation: 0
Ubuntu screwed up my second Windows (/dev/hda5 HPFS/NTFS) partition

Dear all,

I hope you guys can help me on this. I have a 120GB HD which I have divided three ways, two partitions for Windows and the last one for Fedora Core 3.

Things were working great until my friend passed me a copy of Ubuntu which had just arrived by post. So being the inquisitive me (serves me right), I had to install it.

The installation was fine until I tried to reboot to Windows whereupon it hung at

Booting ‘Windows Nt/2000/XP’
Root (hd0,0)
Filesystem type unknown, partition type 0x7
chainloader +1

I googled around and managed to find a fix to that, namely to go into the Bios and change the harddisk access from “auto” to “LBA”. That helped and I was able to boot into my Windows XP.

But once I got in there, I realised that my second Windows partition (D: drive) was not accessible. Meaning it shows up in “My Computer” but when I tried to double-click on it, I was asked whether I wanted to format it. Naturally I freaked out because I have tons of data in there.

So I tried to see if I could mount that drive in Ubuntu. When I rebooted into that, I did a “fdisk –l” and was able to see the following partitions and discovered to my relief that my D: drive (which I am assuming to be /dev/hda5) is still intact.

Disk /dev/hda: 122.9 GB, 122942324736 bytes
16 heads, 63 sectors/track, 238216 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

_ Device Boot _ _ _Start _ _ _ _ End _ _ _Blocks _ Id _System
/dev/hda1 _ * _ _ _ _ _ 1 _ _ _ 83226 _ _41945683+ _ 7 _HPFS/NTFS
/dev/hda2 _ _ _ _ _ 83226 _ _ _167444 _ _42446030 _ _f _W95 Ext'd (LBA)
/dev/hda3 _ _ _ _ _167445 _ _ _238216 _ _35669088 _ 83 _Linux
/dev/hda5 _ _ _ _ _ 83226 _ _ _166452 _ _41945683+ _ 7 _HPFS/NTFS
/dev/hda6 _ _ _ _ _166452 _ _ _167444 _ _ _500346 _ 82 _Linux swap

So I tried to mount it "mount -t ntfs -o umask=0222 /dev/hda5 /media/windows" and I got this error:

"mount: wrong fs type, bad option, bad superblock on /dev/hda5, or too
many mounted file systems"

I then tried all other possibilities like changing the type to vfat or not specifying the type and I still couldn’t mount that drive and retrieve the data.

I even tried it with knoppix 3.6 and the error message was still the same.

It’s been close to a week now and I’ve searched through almost all the forums I know and I’m at the end of my wits and would like to ask if anyone out there knows what I can do to either (1) get to my data in my Windows XP D: drive, or (2) mount it in linux, copy all the data and burn it on to a CD.


Thanks a lot in advance.
Old 03-26-2005, 05:30 PM   #2
Registered: Aug 2004
Location: Australia
Distribution: Fedora
Posts: 282

Rep: Reputation: 30
First of all. Don't panic.

If i were in your situration i would want to inspect the d: and make sure the data are there first.

the mount problem you had mentioned could be:

1) the /dev/hda5 is screwed up
2) mount does not support ntfs.

Well, since I am not using debian and you did not mentioned the version, so I have no idea if case 2 is possible.

If it is because Ubuntu 's mount does not support ntfs, try

If this help you to see the data in d: drive again, you'dl make a backup of them via ftp or whatever before making any next move to fix the system.

If this help you to mount and you find the data is all gone, then at least you know they are gone.
Old 03-27-2005, 01:17 AM   #3
LQ Newbie
Registered: Jan 2005
Location: Singapore
Posts: 4

Original Poster
Rep: Reputation: 0
I'm trying not to panic. :-)

With reference to your question 2, the answer is "yes", my kernel does support NTFS. I was able to mount my first Windows partition /dev/hda1 which makes my inability to mount the second one worrying.

As for the version, it's: Linux version (buildd@terranova) (gcc version 3.3.4 (Debian 1:3.3. 4-9ubuntu5)) #1 Tue Oct 12 12:41:57 BST 2004

Old 03-30-2005, 02:36 PM   #4
LQ Newbie
Registered: Dec 2004
Distribution: Gentoo 2.6.11-r4
Posts: 6

Rep: Reputation: 0
I'm with you on this one... last night I rebooted into win2k, and for some foolish reason typed "chkdsk" in the prompt window. My system instantly rebooted and /hdb1 was gone. (it's visible, but no, I don't want to format it).

What worries me, is that this has happened before. A power outage shutdown my system while I was in linux (SuSE at the time). I had a similar experience to yesterday, but I foolishly rewrote the paritition table and formatted the drive. Everything was gone, I did have backups for most things though. I did lose the data on my NTFS partition that time... but did recover my linux partition (the filenames were randomized). I suspect my secondary hard drive has issues that allow it to write bits unexpectedly when it loses power. (WD CAVIAR SE 200GB)

Now: there isn't much relevant information out there on this topic... most people think it's just a simple issue of some bit of code missing, or an incorrect syntax -- but it's a corrupted drive.

ahwkong is right.... "the /dev/hda5 is screwed up"

fdisk -l

/dev/hda1   *           1        1020     8193118+   7  HPFS/NTFS
/dev/hda2            1021       14945   111852562+   f  W95 Ext'd (LBA)
/dev/hda5            1021        2325    10482381    b  W95 FAT32
/dev/hda6            2326       13798    92156841   83  Linux
/dev/hda7           13799       13927     1036161   82  Linux swap / Solaris
/dev/hda8           13928       14945     8177053+  83  Linux

Disk /dev/hdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1       24321   195358401    7  HPFS/NTFS
dev/hda1 and /dev/hda5 mount fine... so it isn't a software issue. /dev/hdb1 is visible, so it isn't a problem with the partition table.

dmesg | grep hdb1

NTFS-fs error (device hdb1): read_ntfs_boot_sector(): Primary boot sector is invalid.
NTFS-fs error (device hdb1): read_ntfs_boot_sector(): Mount option errors=recover not used.
 Aborting without trying to recover.
NTFS-fs error (device hdb1): ntfs_fill_super(): Not an NTFS volume.
mount -t ntfs -o ro /dev/hdb1 /mnt/wing

mount: wrong fs type, bad option, bad superblock on /dev/hdb1,
       or too many mounted file systems
So... it could be a boot sector issue... or a bad superblock... or something else... I'm reluctant to do anything at this point, as once again, i'm not certain of what i'm doing. Any ideas?

Old 03-30-2005, 03:36 PM   #5
LQ Newbie
Registered: Dec 2004
Distribution: Gentoo 2.6.11-r4
Posts: 6

Rep: Reputation: 0
Good news... I don't know if a full repair of the partition is possible, but it looks like this tool can extract quite a few files:
Old 04-12-2005, 12:11 PM   #6
LQ Newbie
Registered: Jan 2005
Location: Singapore
Posts: 4

Original Poster
Rep: Reputation: 0
Hey all, thanks for the assistance. I can't seem to recover it and will have to accept the inevitability of a unrecoverable partition. *sob* (there goes the porn :-))

Thanks again for the advice.


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
can`t mount ntfs hda5? yohanes Linux - Newbie 3 09-19-2005 07:03 AM
what is /dev/hda5 lil'boomer Linux - Newbie 3 02-27-2005 07:19 AM
HPFS / NTFS problem C: partition appears to be empty thk33 Linux - Software 2 08-11-2004 10:22 AM
Lost XP HPFS/NTFS partition ajkhan Linux - General 3 09-19-2003 07:54 AM
how to moutn hpfs/ntfs farhan Linux - General 3 03-10-2003 08:08 PM > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 08:31 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
Open Source Consulting | Domain Registration