Help - Search - Members - Calendar
Full Version: Hard disk not recognized correctly
Linuxhelp > Support > Hardware Support
frazelle09
Have been having problems with my hard disk. It finally stopped booting. i got another one, installed it and installed the old one, a Maxtor DiamondMax Plus8, as slave.

Ran >
[root@LaGrandota frazelle09]# fdisk -l

Disk /dev/hdb: 8455 MB, 8455200768 bytes
255 heads, 63 sectors/track, 1027 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 8355 17985 77350270 83 Linux
/dev/hdb2 9630 21708 97014885+ 83 Linux
/dev/hdb3 8355 16710 67109888 0 Empty
Partition 3 does not end on cylinder boundary.
/dev/hdb4 8355 16710 67109888 0 Empty
Partition 4 does not end on cylinder boundary.

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1275 10241406 83 Linux
/dev/sda2 1276 9730 67909306+ 5 Extended
/dev/sda5 1276 9730 67909275 83 Linux

The first disk is the injured one. It is obviously not detected correctly. It is only 40 GB in size (C/H/S = 4998, 255, 63). MCC (The "Control Panel from PCLinuxOS, Hardware tab, reports two disks, hda and hdb.) Hdb correctly reports two partitions as hdb1 and hdb2.

There is another tab in Control Panel called Run Config Tool. This runs something which looks like GParted and which would allow me to mess with the partitions. i say "mess" because at this point when i select hdb1 it has a tab to select Mount point. i chose /boot because it didn't offer "/" and when i did so, it listed a number of files which i remember being on this partition -- mainly the OS, /home is on the other, hdb2, partition.

First question: Should i "keep" Mount Point /boot, or use "/" or does it make any difference? i don't care about booting this thing again, just want to get my files from the second partition.

Second question: The other tabs are: Resize, Format, Delete. If i choose Format, it asks for a file type. i was using reiserFS but it is not detected as such. It shous up as Ext2. If if i format this partition, will this wipe all the info?

Thanks for any help and have a great evening! smile.gif
michaelk
Reformatting the partition will wipe out the information.

Yes it makes a difference and you do not want to mount your old drive to either / or /boot. I assume you are booting from sda which appears to have
a running linux OS.

Just create a directory to use as a mount point. You do not mention the distribution you are running but typically it will be /media or /mnt to use for
removable media or non OS data.

example:
mkdir /media/olddrive

mount -t reiserfs /dev/hdb2 /media/olddrive

The partition table appears to be corrupted so trying to mount the partitions might fail.
frazelle09
Michaelk! Thanks for such a great reply!!! Although it was pretty short, it seemed to be right on, many of the others i've seen on other forums were pretty much all over the place, so i hope you can continue to help... (Most of them have just told me to wipe, format it and press on --- ARG!!!)

i've been "messing" with the poor thing and used Testdisk again and pretty much wiped out my SATA as well -- ha, ha, ha, ha ... If i weren't so used to reinstalling OSs, i really be bummered. i hope i haven't done anything to the Maxtor, however. i'll hook it up again and see how it's recognized and so forth and report back. BTW, i thought i had mentioned that we are using PCLinuxOS "...MCC (The "Control Panel from PCLinuxOS,...", but not to worry. Have a great morning! smile.gif

Chuckle, after reviewing you comment about mounting, i finally figured out you are suggesting i mount it on my Sata, Duh. Now the comment about partitions makes sense.
michaelk
Sorry, yes you did say you were using PCLinuxOS.

FYI, in linux all files are arranged in one big tree, the file hierarchy, rooted at /. The mount command attaches a filesystem to the tree at a mount point.
And mount point is nothing more then a directory.

Recovering data is not an easy task if not sometimes impossible so yes the easiest solution would be to wipe everything and start over.
frazelle09
Michaelk, thanks for replying! i appreciate your comments. Uh, let's just say that wipe and format are not options at this point -- but thanks anyway!

Update. i switched the hd to another compu and installed as slave again. Didn't want to risk borking my good box again. Ug. It is an HPVectra. Funny thing, it seems to have a better BIOS handler than this mobo that i'm currently using. It is able to set the C/H/S for each hd! Wow! although it doesn't seem to "keep" the settings. It also recognizes the hd as a Maxtor, something the other mobo wasn't able to do. Hmmm... those little green guys again.

Anyhoo, i used Testdisk again and after inputting the correct numbers for C/H/S, and running Find Partitions, it came up with the two partions and...

NO ERRORS!!! -- Is this a good program or what? It also recognized them as ReiserFs' and showed the correct size (although i can never tell since there's MB and Mb and sectors and clusters and everything else), but they are approx. 10 and 30 GB in size (for / and /home). It also had an option to write the partition table, which i did. ???

So, i let myself feel very happy for a couple of minutes (big happy smile icon here) and proceeded to do what you indicated...

mkdir /media/oldhd

mount -t reiserfs /dev/hdd2 /media/oldhd

And got, after the system worked a while, several errors. Something about seek errors? Shucks, i can't remember if i used hdd or hdd2. Hmmm.. Back to the drawing board. i'm downloading a bunch of updates now, so shall try a little later. Thought you'd at least like an update.

Have a great afternoon and thanks again for all the help! smile.gif (here's my one and only icon since this forum only permits one...)
frazelle09
Well, i'd like to think that we're almost there. Finally got the downloads installed and was able to execute the commands again. This is what we obtained...

[frazelle09@ExtraLinux ~]$ su
Password:
[root@ExtraLinux frazelle09]# fdisk -l

Disk /dev/hdc: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 1019 8185086 83 Linux
/dev/hdc2 1020 4865 30892995 5 Extended
/dev/hdc5 1020 1528 4088511 82 Linux swap / Solaris
/dev/hdc6 1529 4865 26804421 83 Linux

Disk /dev/hdd: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 * 1 1275 10241406 83 Linux
/dev/hdd2 1276 4998 29904997+ 83 Linux
[root@ExtraLinux frazelle09]# mount -t reiserfs /dev/hdd1 /media/oldhd
[root@ExtraLinux frazelle09]# mount -t reiserfs /dev/hdd2 /media/oldhd
mount: wrong fs type, bad option, bad superblock on /dev/hdd2,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[root@ExtraLinux frazelle09]# dmesg | tail
hdd: task_in_intr: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
hdd: task_in_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: task_in_intr: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
ide1: reset: success
hdd: task_in_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: task_in_intr: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
end_request: I/O error, dev hdd, sector 80251707
[root@ExtraLinux frazelle09]#

What do you think? Are we going to be able to get anything off this hdb2? i was able to very easily mount hdb1
and can now browse the files, although they are just the OS files. On the one hand, this is very encouraging, but
on the other, i still can't get to the important ones on the second partition. i downloaded another program, QuickRecoveryReiserFSTrial
and am thinking about trying it out. At least we can see if they can be accessed (or if the program actually works.)

Thanks again for your patience and help and have a great evening! smile.gif
michaelk
You need a second mount point for the hdd2. However the errors are not related to this
You can running fsck on hdd2 too. The partition should not be mounted when running fsck.
fsck /dev/hdd2
frazelle09
michaelk, Thanks for the reply! i wasn't really expecting it. i'll try your suggestion when this "recovery" program gets through with it's dry run. It's almost $90 -- a little out of my reach i'm afraid, but at least it might give me some useful info as to what it thinks is recoverable. It's up to 75% now, after about 10 hrs., so maybe before bedtime i can get a peek.

i also ran across something from Testdisk, here http://www.cgsecurity.org/wiki/Damaged_Hard_Disk, which says i can make a copy of the partition with Antonio Diaz's 'ddrescue' with these commands...

# first, grab most of the error-free areas in a hurry:
./ddrescue -n /dev/old_disk /dev/new_disk rescued.log
# then try to recover as much of the dicy areas as possible:
ddrescue -r 1 /dev/old_disk /dev/new_disk rescued.log

Maybe PCLinuxOS already has this program.

Thanks again for you suggestion and have a wonderful evening! smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.