Gentoo Archives: gentoo-user

From: Mark Shields <laebshade@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Problem with disk: cannot mount as ext3 but yes as ext2 ???
Date: Fri, 13 Oct 2006 16:34:06
Message-Id: 642958cc0610130928o516f5b46x65f6fdd3eceee23c@mail.gmail.com
In Reply to: [gentoo-user] [OT] Problem with disk: cannot mount as ext3 but yes as ext2 ??? by Gregory SACRE
1 On 10/6/06, Gregory SACRE <gregory.sacre@×××××.com> wrote:
2 >
3 > Hello,
4 >
5 >
6 > I had a hard disk attached on an old RedHat PC formatted and mounted
7 > as ext3 filesystem.
8 > I removed the hard disk from the PC and plugged it in my Gentoo box. I
9 > tried to mount it as ext3 file system and got this error:
10 >
11 >
12 > --------------------------------------------------------------------------------
13 > | # mount -t ext3 /dev/hdd1 /jukebox
14 > | mount: wrong fs type, bad option, bad superblock on /dev/hdd1,
15 > | missing codepage or other error
16 > | In some cases useful info is found in syslog - try
17 > | dmesg | tail or so
18 >
19 > --------------------------------------------------------------------------------
20 >
21 > I then tried to see the partition type with fdisk:
22 >
23 >
24 > --------------------------------------------------------------------------------
25 > | Command (m for help): p
26 > |
27 > | Disk /dev/hdd: 81.9 GB, 81964302336 bytes
28 > | 16 heads, 63 sectors/track, 158816 cylinders
29 > | Units = cylinders of 1008 * 512 = 516096 bytes
30 > |
31 > | Device Boot Start End Blocks Id System
32 > | /dev/hdd1 1 158816 80043232+ 83 Linux
33 >
34 > --------------------------------------------------------------------------------
35 >
36 > My next step was to try to repair it with fsck.ext3:
37 >
38 >
39 > --------------------------------------------------------------------------------
40 > | fsck.ext3 -p /dev/hdd
41 > | fsck.ext3: Bad magic number in super-block while trying to open /dev/hdd
42 > | /dev/hdd:
43 > | The superblock could not be read or does not describe a correct ext2
44 > | filesystem. If the device is valid and it really contains an ext2
45 > | filesystem (and not swap or ufs or something else), then the superblock
46 > | is corrupt, and you might try running e2fsck with an alternate
47 > superblock:
48 > | e2fsck -b 8193 <device>
49 >
50 > --------------------------------------------------------------------------------
51 >
52 > I tried what was written with e2fsck:
53 >
54 >
55 > --------------------------------------------------------------------------------
56 > | e2fsck -b 8193 /dev/hdd
57 > | e2fsck 1.39 (29-May-2006)
58 > | e2fsck: Bad magic number in super-block while trying to open /dev/hdd
59 > |
60 > | The superblock could not be read or does not describe a correct ext2
61 > | filesystem. If the device is valid and it really contains an ext2
62 > | filesystem (and not swap or ufs or something else), then the superblock
63 > | is corrupt, and you might try running e2fsck with an alternate
64 > superblock:
65 > | e2fsck -b 8193 <device>
66 >
67 > --------------------------------------------------------------------------------
68 >
69 > After googling for a while, and not really finding an answer, I tried
70 > to mount it as readonly, and because of a typo, I mounted it as
71 > ext2... and it worked!!! I tried then to mount it normally, not
72 > anymore as read-only with ext2 format... and it worked!!!
73 > So my first question is: how come?
74 > I'm sure the filetype is ext3 as it can be seen in my old fstab:
75 >
76 >
77 > --------------------------------------------------------------------------------
78 > | [...]
79 > | /dev/hdb5
80 > swap swap defaults 0 0
81 > | #/dev/hdc1 /jukebox ext3 defaults
82 > 1 1 --> this is the one ;-)
83 > | [...]
84 >
85 > --------------------------------------------------------------------------------
86 >
87 > I thought maybe I could try to repair it with the normal fsck:
88 >
89 >
90 > --------------------------------------------------------------------------------
91 > | fsck /dev/hdd1
92 > | fsck 1.39 (29-May-2006)
93 > | e2fsck 1.39 (29-May-2006)
94 > | /dev/hdd1: Attempt to read block from filesystem resulted in short
95 > read while reading block 525
96 > |
97 > | /dev/hdd1: Attempt to read block from filesystem resulted in short
98 > read reading journal superblock
99 > |
100 > | fsck.ext3: Attempt to read block from filesystem resulted in short
101 > read while checking ext3 journal for /dev/hdd1
102 >
103 > --------------------------------------------------------------------------------
104 >
105 > Is there anything wrong with my hardware? Is it a super-block problem?
106 > Is there a way to solve it?
107 >
108 > Thank you in advance!
109 >
110 > Greg
111 > --
112 > gentoo-user@g.o mailing list
113 >
114 >
115 Have you looked into tune2fs? I converted an ext2 to an ext3 with it by
116 running tune2fs -j /dev/sda9, you might want to see if that utility can
117 provide any assistance.
118
119 --
120 - Mark Shields