File system with errors
Hi everyone,
I am very new to linux and am therefore getting rather worried when i get this message Checking root filesystem / contains a file system with errors, check forced. Inode 98658 has imagic flag set /: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY (i.e., without -a or -p options) Then some stuff about an error and dropping me into a shell. SO i type fsck as it asks and it asks for a device to be checked so which one do i pick? i randomlly picked (well after a bit of internet seraching) hda so i type (i'm that new i'd better write this otherwise i might just be getting my command wrong!) fsck /dev/hda it says Paralleling fsck version 1.23 (15-Aug-2001) e2fsck 1.23, 15-Aug_2001, trying for backup blocks... fsck.ext2: Bad magic number in super-block while trying to open dev/hda The superblock could not be read or does not describle a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else) then the superblock is corrupt, and you might try running e2fsck with an alternative superblock: e2fsck -b 8193 <device> Bugger i say and try e2fsck -b 8193 /dev/hda It then returns with this e2fsck: Bad magic number in super-block while trying to open /dev/hda then the same message about ext2 filesystems that i mentioned above. I'm somewhat lost and scared (I won't mention as yet what data is on this linux box as yet but lets say it's fairly important to me). Can anyone help? Cheers Nask |
you need to specify a partition, not the entire drive. e.g. "fsck /dev/hda1"
|
OK
tried hda1with both the fcsk and e2fsck -b 8193 /dev/hda1 commands Same superblock error i'm afriad (Bad magic number in super-block while trying to open /dev/hda1). Thanks for the swift reposnse anyway! Nask |
tried again with hda3 as my harddrive is hda3 (that would have been a better place to start probably). but now it says
e2fsck: Attempt to read block from filesystem resulted in short real while trying to open /dev/hda3 could this be a zero length partition? Can anybody out there give me their thoughts please (well if relavent i don't want pages and pages about surreal ramblings!) Nask |
Sorry to bring this back to the top but i could still do with a hand of anyone has any ideas.
Thanks Nask |
Last post first: Your drive is hda, not hda3 <- that's the third partition on hda (first IDE-master on system bus). I don't think zero-length-partitions are useful, but maybe somebody knows their use ... ?
Your file-system is ext2?!? Have you checked /etc/fstab? Is it o.k.? |
yeah it is ext2, I'll check etc/fstab as i type on the other pc.
How do i check etc/fstab though, the same as fsck /etc/fstab Right tried that and is says : Attempt to read block from filesystem resulted in short read while trying to open /etc/fstab Bugger! ANy more clues out there please people? Nask |
The /etc/fstab is the filesystem table that tells mount which file systems to mount at boot time (among other things). This will only tell you which filesystems are mounted where.
What you want to watch for is during boot, just before the filesystem with errors message it will say something about checking the filesystem /dev/hda# where # is the number you are interested in. If this message scrolls off of the screen, you can use Shift-PgUp key combination to page up half a page at a time. Once you figure out which filesystem to check, use the command: Code:
/sbin/e2fsck /dev/hda# |
right on the bootup it says to me
actvating swap partitions: swapon /dev/hda5 invalid argument so i tried the /sbin/e2fsck /dev/hda5 It then returns with the message The filesystem size (according to the superblock) is 4096543 blocks The phsyical size of the device is 514048 blocks Either the supblock or the partition table is likely to be corrupt! Abort<y>? I type no it says /dev/hda5: clean 11/1026048 files, 137789/4096543 blocks What now?? Cheers Nask |
Can you start fdisk? If so, what does it tell you about your hda5? If you are sure that hda5 is your swap, then simply delete it and create it again with the correct / desired parameters.
|
ok then i did fdisk /dev/hda5 and it now says the following
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memopry only until you decide to write them. After that, of course, the previuos content won't be recoverable Command (m for help) NOW WHAT??! I've quit out of it as i don't want to break anything but some (more, thank you) help is required. Cheers Nask |
Quote:
|
apologies for being dumb but i've having [probelms with fstab as well now
WHat do i type? I've tried /etc/fstab and it says premission denied (I'm logged in as root). ALso i tried to look at fdisk /dev/hda5 what specifically do i press (i know i'm being soft here nto trying something but there is data onthis machine that i'd like to keep!). The linux swap file is type 82 by the way Nask |
anyway looked at fdisk /etc/hda and printed out what it saw
hda1 Win95 FAT32 hda2 Win95 EEXTENDED hda5 Linux swap hda6 Linux hda7 Win95 FAT32 So hda5 is defo my swap partition, all i need to do now is delete it and remake it? WIll i be able to do this without losing data from hda6. Cheers Nask |
cat /etc/fstab lists the contents of /etc/fstab. You should find ount from them, where your swap is supposed to reside (hda5??).
Use fdisk -- help or fdisk m (?) for the options. Oops you posted another one. Yes, you can delete partitions without danger to other parts of your hd. But: recreate it at once, without rebooting, else your partitions won't match /etc/fstab and then God help any beginners (I did it once...). Oh yes, best recreate it like it was / should have been, fstab will help you there. |
All times are GMT -5. The time now is 06:49 PM. |