Mandriva Expert
The place where your Mandriva Linux system finds support

fix unreadble linux partitions

+/- details
User gelmo70
Incident Number 71376
Date 2003/10/05 12:17
Status Incident closed
Paid Yes

Product 9.1 (Bamboo)
Architecture x86_32
Scope Installation

Products owned

Lines in bold below have not yet been seen by the customer - those in blue are from the customer

Username : Date : Action : Comments [ close all ]    
 
gelmo70 : 05/10/03 12:17 PM : Incident created
-   After shipping my pc I could no longer boot it with Linux. I had some file systems errors about a "damaged superblock". I tried to fix the problem by myself but I was not able to and now, after serveral tries and system reinstalls, my pc's situation is:

I have 2 hard disks and I have WinXp and Linux installed with a LILO boot manager.
On the first disk I have 1 ntfs partition for XP the 3 LInux partitions and at last a ext2 unreadable partition which was the former /home partition (which I want to recover).
On the second disk I have on undreadable ext2 (or ext3, I do not remember) linux partition (which I want to recover) and a FAT32 partition.

If I try to mount one of the two partitions, in /mnt for instance, I cannot see the contents and at the following boot the system finds some errors and it is then impossible to boot.

Here below you will find some information regarding my devices:

[root@localhost gelmo]# ls /dev/hd
hda hda1 hda2 hda5 hda6 hda7 hda8 hdb hdb1 hdb2 hdb5 hdc

[root@localhost gelmo]# cat /etc/fstab
/dev/hda5 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda8 /home ext3 defaults 1 2
none /mnt/cdrom supermount dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-15,codepage=850,umask=0 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,iocharset=iso8859-15,sync,codepage=850,umask=0 0 0
/dev/hda1 /mnt/win_c ntfs iocharset=iso8859-15,ro,umask=0 0 0
/dev/hdb2 /mnt/win_c2 vfat iocharset=iso8859-15,codepage=850,umask=0 0 0
none /proc proc defaults 0 0
/dev/hda7 swap swap defaults 0 0

[root@localhost gelmo]# mount
/dev/hda5 on / type ext3 (rw)
none on /proc type proc (rw)
none on /proc/bus/usb type usbdevfs (rw)
none on /dev type devfs (rw)
none on /dev/pts type devpts (rw,mode=0620)
/dev/hda8 on /home type ext3 (rw)
none on /mnt/cdrom type supermount (ro,dev=/dev/scd0,fs=auto,--,iocharset=iso8859-15,codepage=850,umask=0)
none on /mnt/floppy type supermount (rw,sync,dev=/dev/fd0,fs=auto,--,iocharset=iso8859-15,codepage=850,umask=0)
/dev/hda1 on /mnt/win_c type ntfs (ro,iocharset=iso8859-15,umask=0)
/dev/hdb2 on /mnt/win_c2 type vfat (rw,iocharset=iso8859-15,codepage=850,umask=0)

I look forward to hear from you.
Best regards

Andrea

 
gelmo70 : 06/10/03 08:13 AM : More info provided
-   After another try I succeded in mounting the hdb5 of the second disk. I used the command 'mount' from the command line instead of the diskdrake. OK!
I still cannot mount the hda6 partition of the first disk. Here below you will find the "mount" commands I used and the system responses:


[root@localhost gelmo]# mount -t ext3 /dev/hda6 /mnt/try
mount: wrong fs type, bad option, bad superblock on /dev/hda6,
or too many mounted file systems


[root@localhost gelmo]# mount -t ext2 /dev/hda6 /mnt/try
mount: wrong fs type, bad option, bad superblock on /dev/hda6,
or too many mounted file systems


Attachment
 
nexus_la : 06/10/03 03:23 PM : More info requested
-   try run e2fsck /dev/hda6

 
gelmo70 : 06/10/03 05:09 PM : More info provided
-   That's the result of the e2fsck command:

[root@localhost gelmo]# e2fsck /dev/hda6
e2fsck 1.32 (09-Nov-2002)
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/hda6
Could this be a zero-length partition?
[root@localhost gelmo]#

 
nexus_la : 06/10/03 06:14 PM : More info requested
-   Please post result of the following command
# fdisk -l /dev/hda

 
gelmo70 : 06/10/03 06:35 PM : More info provided
-   voilà:

[root@localhost gelmo]# fdisk -l /dev/hda

Disk /dev/hda: 41.1 GB, 41174138880 bytes
255 heads, 63 sectors/track, 5005 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1275 10241406 7 HPFS/NTFS
/dev/hda2 1276 5005 29961225 f Win95 Ext'd (LBA)
/dev/hda5 1276 1683 3277228 83 Linux
/dev/hda6 2008 5005 24081403 83 Linux
/dev/hda7 1684 1746 506016 82 Linux swap
/dev/hda8 1747 2007 2096451 83 Linux

Partition table entries are not in disk order
[root@localhost gelmo]#

 
nexus_la : 06/10/03 07:34 PM : More info requested
-   Try restore your partition table with fixdisktable from
http://bmrc.berkeley.edu/people/chaffee/fat32.html, but you have little chance
of success.

 
gelmo70 : 07/10/03 05:30 PM : More info provided
-   This is the output of that program. Shall I choose "Yes"? I do not know exactly what the program will do.

[root@localhost gelmo]# ./fixdisktable-0.3 -d -v /dev/hda
Getting hard disk geometry
cylinders=5005, heads=255, sectors=63
end_offset: 2147482624
FfEeSsNn

NTFS partition at offset 31744, length=(17592186042506.980 MB) 18446744071707799552
Sectors: start= 62, end=36028797015054356, length=36028797015054296
Hd,Sec,Cyl: start(0,63,0) end(251,48,267105)


Done searching for partitions.

Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
1 80 1 1 0 254 63 1023 63 -3909672 07 (Interpretted)
1 80 1 1 0 254 255 255 63 -3909672 07 (RAW)

1: 8001 0100 07fe ffff 3f00 0000 d857 c4ff
2: 0000 0000 0000 0000 0000 0000 0000 0000
3: 0000 0000 0000 0000 0000 0000 0000 0000
4: 0000 0000 0000 0000 0000 0000 0000 0000

Do you wish to write this partition table to disk (yes/no)? n
[root@localhost gelmo]#

 
gelmo70 : 07/10/03 05:40 PM : More info provided
-   I think this might be useful too:

[root@localhost gelmo]# mke2fs -n /dev/hda6
mke2fs 1.32 (09-Nov-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
3014656 inodes, 6020350 blocks
301017 blocks (5.00%) reserved for the super user
First data block=0
184 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000

[root@localhost gelmo]# e2fsck -b 32768 /dev/hda6
e2fsck 1.32 (09-Nov-2002)
/dev/hda6: Attempt to read block from filesystem resulted in short read while reading block 511

/dev/hda6: Attempt to read block from filesystem resulted in short read reading journal superblock

e2fsck: Attempt to read block from filesystem resulted in short read while checking ext3 journal for /dev/hda6
[root@localhost gelmo]#

 
nexus_la : 08/10/03 09:50 AM : Reply received
-   You have a broken partition table or hard disk.
plz run e2fsck then
grep "hda" /var/log/messages

 
gelmo70 : 08/10/03 05:53 PM : More info provided
-   Done.
Please find the results in the attached file


Attachment
 
nexus_la : 09/10/03 10:34 AM : More info requested
-   You have a hardware problem(broken harddisk drive).
try recover data using

#debugfs -s <superblock> /dev/hda6

<superblock> one of 32768, 98304, 163840, 229376, 294912, 819200, 884736,
1605632, 2654208, 4096000

if command result: "Bad magic number in super-block while opening filesystem"
try another superblock.

 
gelmo70 : 09/10/03 07:11 PM : More info provided
-   Please find the report of the command debufs in the file here attached


Attachment
 
nexus_la : 10/10/03 08:27 AM : Reply received
-   try use
#debugfs -s 32768 -b 4096 /dev/hda6
then
debugfs: ls

 
gelmo70 : 10/10/03 04:48 PM : More info provided
-   I tried that:

[root@localhost gelmo]# debugfs -s 32768 -b 4096 /dev/hda6
debugfs 1.32 (09-Nov-2002)
/dev/hda6: Can't read an inode bitmap while reading inode bitmap
debugfs: ls
ls: Filesystem not open

and then that:

[root@localhost gelmo]# debugfs -s 32768 -b 4096 /dev/hda6
debugfs 1.32 (09-Nov-2002)
/dev/hda6: Can't read an inode bitmap while reading inode bitmap
debugfs: open -s 32768 -b 4096 /dev/hda6

/dev/hda6: Can't read an inode bitmap while reading inode bitmap
debugfs: ls
ls: Filesystem not open

 
rwira : 19/10/03 06:19 PM : Reply received
-   Hi,

What is the status of your incident? If it is still valid, can you sumarize what is your problem and
what you have already tried. Else please close the incident.

Regards

 
gelmo70 : 20/10/03 02:46 PM : More info provided
-   The status is exactly the initial one, that is the device hda6 cannot be mounted, and you can see the description in the question text of the incident; all that I did is reported in the history of this incident.
Please let me know if there is anything else that I can do or if I lost my data.
Thank you

 
qa2 : 30/10/03 11:57 AM : Reply received
-   Dear sir , we had try to find a way to help you but it seems to be that
your partition is so corrupted,i think that you won't recover it properly in
our scope.
Maybe you will find help on Internet.You need to clear your partition if
you want to use.
Best Regards Christophe

 
 
gelmo70 : 31/10/03 07:23 AM : Incident closed
-  



This Incident is closed. It can not be edited anymore. You can create a new one by signing up/logging in your Mandriva Expert account.

  Mandriva  |  Contact  |  Legal  |  Privacy  |  Careers