-   Linux - General (
-   -   Bad Magic Number? (

Thewyzewun 10-19-2003 03:32 PM

Bad Magic Number?
I can't boot into Linux, I'm running Mandrake 9.1, here's a copy of what it says during boot:

fsck.ext3: Bad magic number in the super-block while trying to open /dev/hda1
fsck.ext3: Bad magic number in the super-block while trying to open /dev/hdb5
/dev/hdb5: The superblock could not be read or does not describe a correct ext2 filesystem.
If the device is not valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might want to try running e2fsck with an alternative superblock:
e2fsck -b 8193 <device>

fsck.ext3: Bad magic number in superblock while trying to open /dev/hdb5
/dev/hda6: clean, 1488/387840 files, 49517/775128 blocks

Now as for me I don't have a clue what all this means, but hopefully someone who read this will. Alternatively I'll just put my computer into early retirement until I get a copy of Mandrake 9.2 (since I'm not interested in reformatting as a solution to this problem). Also, I do have data I would prefer not to lose, though its not "mission critical" (my collection of divx and ogg files)

Thewyzewun 10-19-2003 03:47 PM

Just thought I'd come back and add some more info on this. I've just deleted a 2 NTFS partitions, one of which was loaded with Windows XP Pro. Both partitions were much bigger than the ext3 partitions aswell. I've reformatted them as ext2 or 3 (whichever the mandrake control panel's utility would have selected as default). Also, when I told it to do this it was very very fast (didn't appear to do anything!). If you've got any questions you need to ask to give me any sort of answer fire away.

quatsch 10-19-2003 03:48 PM

you do get the option to provide the root password after the messages, right? Type in the root password and you will get ot a prompt. Do what it suggests:
e2fsck -b 8193 /dev/hdb5
e2fsck -b 8193 /dev/hda1

Actually, do you have two harddrives and set up so that you have two linux partitions on one hd, and a third one on the second? Or is one of those partitions windows formatted (i.e. ntfs or fat32)?

Thewyzewun 10-19-2003 04:26 PM

Actually my partition tables got about 7 partitions at the moment (or something daft like that) cos its a mess! I'll do as you've suggested and tell u what happens. Thanx :D

Thewyzewun 10-19-2003 04:31 PM

I just logged in as root and executed the commands suggested, but I got error messages identical to those above :(. I'm downloading Knoppix 3.3 btw (it'll be downloaded in 3 hours, but I'll have gone to bed by then since I have college at 0900 in the morning tomorrow (its 2230 at the moment)

quatsch 10-19-2003 04:44 PM

it could be that the partition table got mixed up (the numbering changes when you delete partitions). Once you login as root, take look at /etc/fstab. If /dev/hda1 and /dev/hdb5 (these are the trouble ones, right) are mounted to inessential places (not /, not /var, not /etc), then place a # in front of the lines for them.
You might have to remount your root partition r/w. The fstab will tell what your / partition is.
mount -o remount -o rw {root partition)

Thewyzewun 10-19-2003 04:59 PM

Thanks I'll go try that now :D I don't know much about how fstab works but I know that the numbers were deff changed when i deleted those NTFS partitions and created ext2/3 ones, and maybe they weren't given new mount points, I'll go look... thanks again, hopefully I'll have better luck this time :D

Thewyzewun 10-19-2003 05:22 PM

OK I got as far as the etc folder and I cant do"vi fstab" what other text editors are there that i can launch without a graphical interface cos gedit fstab don't work and I'll go try emacs... nope, suggestions? (im sure this is just cos of my unfamiliarity with the command line actually, thats the pitfall of running distros like mandrake methinks...

quatsch 10-19-2003 05:26 PM

stick with vi. Press I or Insert (the key) and you can start editing. When you are done, press ESC, and then type ':wq' (w/o the quotation marks) and it will save and quit. If it says that it could not write, quit by typing ':q!' and then remount your root partition read-write (see above).

Thewyzewun 10-19-2003 05:33 PM

No im used to having to press I to insert text etc, its just that the command vi is not found!!

quatsch 10-19-2003 05:35 PM

Oh sorry. Try
/bin/vi /etc/fstab

Thewyzewun 10-19-2003 05:41 PM

Thanks I'll go try that now

Thewyzewun 10-19-2003 05:43 PM

nope - /bin/vi doesn't exist

quatsch 10-19-2003 05:46 PM

that's strange. How about
/usr/bin/vi /etc/fstab

Do you have anything in those directories. If you created separate partitions for those, you'll have to mount them first.

Thewyzewun 10-19-2003 05:46 PM

I'm guessing thats a bad thing hehe
i also tried navigating to /etc/bin and then trying vi and it isn't there, theres something called vi@ in there tho (is that the wrong place?)

All times are GMT -5. The time now is 01:53 AM.