# Odd: /dev/hda3 has become /dev/hda6 ?????

## swagr

All of a sudden /dev/hda3 is "gone".

It still appears properly in fdisk, but mount /dev/hda3 always ends up mounting /dev/hda6. By this I mean df shows /dev/hda3 as mounted but the data in the mouned filesystem is from /dev/hda6.

I know how to mount a disk and how to use fdisk.

I have not touched partitions or changed /etc/fstab for months.

What could have caused this? How can I get data from /dev/hda3 ?

I'm very desperate here. hda3 is my home partition and I can't mount it.

Any help is appreciated.

Thanks

----------

## swagr

minor update:

If I do a raw hexdump of /dev/hda3 and /dev/hda6 they do have different data on them.

So why does "mount /dev/hda3" end up mounting /dev/hda6?

And why does df lie about mounted devices?

Does anyone think this could be the work of a hacker?

Or maybe my hardive is fried?

----------

## fghellar

Did you repartition your HD lately?

----------

## swagr

No. I have not repartitioned, or touched any configuration for months.

----------

## pilla

Use fdisk (command p) to get information about your current partition table. Maybe it has been damaged in some way

----------

## AlterEgo

DOS fdisk or Windows Parttion magic can sometimes mix up the partition table-order under linux. Even when you don't actually change anything.

It's odd, but I'm quite sure I've witnessed this a few times.

----------

## swagr

fdisk shows me exactly what I'd expect, and doesn't complainl about anything.

So to sum it up:

fdisk shows partitions ok.

hexdumping /dev/hda3 and /dev/hda6 shows different data.

mounting /dev/hda6 "/", /dev/hda1 "/boot" and  swap partitions are ok.

when I mount /dev/hda3 it shows up in the df command as being mounted.

but the data in the mounted partition is the same as the data in /dev/hda6. This is very easy to see because hda6 is my "/"  partition and hda3 is my "/home"

This is very very odd. As a Linux user for 5 years I really don't know how this could happen. But I need to fix it.

What I'd like to do is buy a new hard drive. dd /dev/hda3 to a file on the new drive and mount it  -o loop to see if that works and I can get my data. To bad that solution is going to cost me $100. I'll pay it if I have to, but since I don't understand the problem I can't justify it just yet.

----------

## pilla

very strange. HAve you tried to check the file systems? Have you verified the system logs? Looking for the usual suspects, which kernel do you use?

----------

## swagr

2.4.19-gentoo-r9

The system is a month-and-a-half  old install of gentoo 1.4.

I haven't changed a single thing since I initially set it up.

One day I just turned on the computer, logged in and got the message that my home directory didn't exist.

A little poking around gave me the info I've already shared.

Nothing of use in the logs.

Am I screwed?

----------

## swagr

Is there a Linux program that does a low level check of a hard drive (not of a filesystem)?

Is there one that attempts repairs?

----------

## waverider202

Did you just install WinXP?  When my friend installed WinXP, it decided to mess with the partition tables making slackware unbootable.  Gee....I wonder why Microsoft would do a thing like that?

----------

## waverider202

Did you just install WinXP?  When my friend installed WinXP, it decided to mess with the partition tables making slackware unbootable.  Gee....I wonder why Microsoft would do a thing like that?

----------

## Tiber

Actually, to expand on that....

(haha, posting from work!!  screw you, Solaris!!  what's up Jeff?)

When I installed WindowsXP, it did EXACTALLY that.  What happened was the partition with the windows bootloader on it (HDA2) became HDA1.  Windows does something with the first few sectors on the hard drive because it also killed LILO.  I believe the latest LILO and GRUB are smart enough to redo the disk correctly (issue a "lilo -R" on all your hard drive related nodes 'cause now you're not sure what's addressing what, and I'm not into GRUB enough to figure out what to do but a grub -setup might cure things)....  Amazingly, with the "fixed" lilo and MBR, it doesn't affect windows in the least.  Whatever it does, it does it during the install and as part of the installer.  The OS doesn't care what happens to the drive/partition order from that point forward.  Partition Tragic also failed to fix the problem for me, crashing out with a "disk unusable" error.  Although I only have an older copy (version 6 or 7).

----------

## swagr

Nope. Haven't installed/changed/removed OSs.

Let's put it this way:

If someone asked me did you do "X" between the times it worked, and didn't, the answer would be no.

----------

