LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   HELP..can't mount root filesystem (https://www.linuxquestions.org/questions/linux-software-2/help-cant-mount-root-filesystem-417740/)

WindowsDependant 02-20-2006 06:36 PM

HELP..can't mount root filesystem
 
Ok, when I got up this morning and turned on my suse 10 box, I got an error that says"

fsck failed. Please repair manually and reboot. The root filesystem is currently mounted read-only. To remount it read-write do:

bash# mount -n -o remount,rw /

Attention: Only CNTRL-D will reboot the system in this maintenence node. Shutdown or reboot will not work.

Give root password for login: "

Which of course I did and ran the above command (mount -n -o remount,rw /)

After that it seems to work, it just puts me back at the root prompt "(none)#"
ok so I hit cntrl-d to restart. (also i tried "reboot"), but when it fires back up again it goes through the same process.

I'm new to Linux, so this has really got me stumped. Any help is greatly Appreciated.

Thanks In Advance.

Komakino 02-20-2006 06:50 PM

You need to fsck the disk. Just run:
fsck /dev/hdax

where x is the partition number for your root partition. Also, fscking isn't that common any more...are you using an ext2 filesystem?

stress_junkie 02-20-2006 06:55 PM

Code:

fsck failed. Please repair manually and reboot. The root filesystem is currently mounted read-only. To remount it read-write do:

bash# mount -n -o remount,rw /

Attention: Only CNTRL-D will reboot the system in this maintenence node. Shutdown or reboot will not work.

Give root password for login: "

That message says to do two things. "Please repair manually". That is the key.

When you log on as root you have to run fsck, then reboot. This is the form of the fsck command.

$ fsck -C -y <root partition>

So if your root partition is /dev/hda1 then you would enter

$ fsck -C -y /dev/hda1

Then forget the mount command. Reboot the computer.

WindowsDependant 02-20-2006 07:00 PM

re:
 
I can't be certain, but i believe that I am running ext2. anyway, I ran the command fscd /dev/hda3 and it says "Will read-only check conistency of the filesystem on /dec/hda3".... Do you want to run this program, YES/NO. i type yes and run it. it comes back with fsck.reiserfs /dev/hda3 failed (status 0x10). Run Manually.

By the way, Is it possible to see if I am running ext2 filesystem from where I am (the aforementioned prompt (none):~#)?

P.S. Thanks for the lightning fast reply. :)

Komakino 02-20-2006 07:05 PM

Looks like it's reiser not ext (fsck ran fsck.reiser when you loaded it).
To see what mounted partitions types are, type 'mount'.
Then, if it turns out to be ext3 run:
fsck.ext3 /dev/hda3

WindowsDependant 02-20-2006 07:10 PM

mount returns this:
/dev/hda3 on /type reiserfs (rw,acl,user_xattr)
proc on /proc type proc (rw)

Komakino 02-20-2006 07:15 PM

OK, so it is reiserfs.

Try
fsck.reiserfs -r /dev/hda3

Tell us what the output is...there might be an error code (a number) that can tell us something if this fails.

Hang on...your mount output indicates that / is mounted read-write. That's not good. We need it remounted read-only. Before trying the above, try:
mount -o remount /dev/hda3

WindowsDependant 02-20-2006 07:29 PM

hmmm lot of output here, looks like several "bad_stat_data" occurrences. FilesSytem seems mounted readonly. Skipping journal replay. Checking internal tree../ 1 (of 3)/ 80 (of 133)bad_internal: vpf-10320:block 1835327, items 79 and 80: The wrong order of items: [294349 294351 0x0 SD (0)], [517 52994 0x1 DIR (3)] the problem in the internal node occurred (1835327), whole subtree is skipped. Then it goes on with more... any of this help? or do you guys need all the output?

Komakino 02-20-2006 07:35 PM

When it's all done...is there any numerical output (just a single number)? If not, see if a reboot fixes it (type reboot, don't just turn off)

WindowsDependant 02-20-2006 07:45 PM

umm no pecific error code i think...several entries saying object(...) is shared by at least two files. Cam be fixed with --rebuild tree only. then the scan finishe and sats "Comparing bitmap...vpf-10640: The on-disk and the correct bitmaps differs Bad nodes were found emantic pass skipped 3 found corruptions can be fixed only when running with --rebuild-tree" reiserfsck finished at.....

also tried reboot. no luck. :(

Komakino 02-20-2006 07:50 PM

OK, one more thing I can think of:

fsck.reiserfs --rebuild-tree /dev/hda3

but do NOT interrupt it once it's started

WindowsDependant 02-20-2006 08:20 PM

That did the trick. I appreciate you taking the time. Would you have any idea what may have caused this in the first place?


All times are GMT -5. The time now is 02:20 AM.