Filesystem check failed.
Hi,
I have got arch Linux dual booting with Win XP on my laptop. I have been getting a filesystem check error since yesterday and am unable to start Arch. Upon googling and searching the arch fora, I came upon some advice which I tried which has not worked yet. Hence the new post... Basically, I was attempting to print something off and accidentally chose a printer that was not connected to my laptop. After half a minute or so, it repeatedly started giving me notifications that the printer was not connected...in excess of 200 messages that the printer was not working which continued to pop up despite me canceling the print job. The whole system got really sluggish (for the first time in the last year) and I had to restart the laptop upon which the boot messages appear. It gets to the point where its loading the various filesystems. It mounts root and says it fine. Then it says Code:
/dev/sda3: clean, 171642/915712 files, 1837167/3662820 blocks /dev/sda1 is Windows XP /dev/sda3 is root /dev/sda2 is boot /dev/sda5 is home I tried fsck which tells me that home and boot are still mounted. So I booted up using an Ubuntu Live CD and checked and repaired each file system which it successfully did. Upon rebooting into Arch, I am getting the same message. I have not installed anything new and had upgraded the whole system a few days before the problem started. Not sure where to go from here. Any help, please Thanks Samsom |
I've never put /boot on a separate partition, but see if it'll let you "mount -n -o remount,ro /dev/sda2", and if so, "fsck -Ay".
|
Quote:
fsck -Ay only checks root as it says that boot and home are still mounted. I hope I don't have to reinstall the whole OS again.... |
I have had /boot on a separate partition on my Slackware system in the past, without trouble. Should work OK.
As for the fsck, if you can boot your Arch into init level 1, it should not mount the other filesystems, thereby allowing you to fsck them if needed. Boot to init 1, log in as root, and fsck the other filesystems if you need to. If they are mounted for some reason, unmount them first. FWIW, I usually do e2fsck -v -y /dev/blah rather than -Ay, though I am not currently reading the man page to compare the differences. -v -y means verbose + all-yes. PS - Like *stoopid wrote, if you want to fsck the / filesystem, remount it -ro first if it isn't already. Sasha |
hence the first part of my suggestion: try remounting them both readonly.
EDIT: Sasha beat me. Also, Arch boots into "maintenance mode" (i.e. single-user) on failed fscks, so you shouldn't have to switch to init 1 manually. |
Hi,
I have tried using an Ubuntu Live CD again and checked and repaired root, home and boot partitions. I can mount all the partitions while using the Live CD. I have to log in as root to access my Arch Home folder...I am not sure why. As I can access my Arch Root folder without logging in as root. I still cannot run fsck on the home and boot folder. When I run fsck, I get the message that the partition is mounted and I risk damage to the filesystem. When I try to unmount the home or boot partition, I get the message s umount /dev/sda5: not mounted I have rechecked my /etc/fstab file and it seems to be OK. Also, when I run fsck from the Live CD, the filesystems seem OK. So why would it say in Arch that its failing the check? Is it possible to boot my Arch system without the filesystem check? Samsom |
If you look at the man page for the "shutdown" command (/sbin/shutdown) you should see a -f option, which means "Skip fsck upon reboot" so a command something like:
shell# sbin/shutdown -rf -t0 now should shutdown the Arch and reboot it, skipping the fsck. Note that if the filesystem IS actually kinda borked, this risks making it more* borked, so keep that in mind. Also, if it hasn't been mentioned and you haven't tried it yet, you might try booting from your bootloader with the argument init=/bin/bash which basically boots the kernel and then drops you at the shell prompt. From there, perhaps you can do all the fscks you need to do, and then reboot. NOTE: booting to bash doesn't set PATH variables or other helpful things, so you need to specify the absolute path to even the most mundane things, for example: `ls` might not work, but `/bin/ls` will work. Sasha |
Quote:
Samsom |
I would certainly think so. No clue why it would be otherwise :) since clean = clean = clean.
If you discover otherwise, definitely let us know. That would be worth investigating! |
@grapefruitgirl
I tried your advice shutdown -rf -t0 now And on rebooting, it still gave me the same message. Any other advice.... Cheers Samsom |
I admit I'm somewhat at a loss here. From what I understand, all your filesystems are clean, according to Ubuntu LiveCD from where you fscked all filesystems. But when you boot the Arch, it tells you that there are unclean filesystems, but that they are mounted and/or are unclean?
Weird. I wonder, just as an experiment (extremely low-risk experiment, but an experiment nonetheless) can you go to init 1 in the Arch (or maintenance mode, whatever) and do (TYPE CAREFULLY!!!): rm -Rf /tmp/* rm -f /etc/mtab This should clean out your /tmp directory, and delete the mtab file which keeps a list of mounted filesystems. Now reboot. Upon reboot, if weirdness still prevails, humor us and post for us the output of: fdisk -l # <-- that is a lowercase "L" and paste for us the contents of your /etc/fstab file. :scratch: |
Whoooooppppieeeeeeee........Fixed the bloody problem!!!
Thanks a lot for all your help, everyone. Quote:
Just to confirm, I ran the mount command which showed my home and boot partition were mounted in /media instead of /home and /boot. To be specific, there were 5 new folders in my /media folder named usbhd-sda1 to 5 which were automatically mounting the sda* to each folder and confusing the hell out of the boot process ( sorry...but I am not clever enough to be any more technical) I deleted those directories and voila...I am up and running again. I still don't know how those new folders got created....but fixed for now. Thanks again Sasha for your help. BTW Do I need to create another /etc/mtab file or is it automatically created? Cheers Samsom |
Wow, cool! Glad you have made some definite progress :)
You should not need to create an mtab file manually. Have a look in /etc and verify that a new one is there automatically. Also, I think you should look closely into your HAL and/or UDEV (sorry, "UDEV" typo corrected) configuration and/or your fstab file, and examine your mount options to try to learn how this happened. I'd be 'guessing into the wind' if I were to start speculating on how those folders got created, and why and what was getting mounted there :) because you probably DO NOT want this to happen on any sort of regular basis! If you have no mtab file, we'll deal with that next, so have a look first and make sure it is there (or not). Sasha |
Quote:
I suppose that it was a problem with HAL as when I plug in a USB device, it gets auto mounted in a folder in /media. Code:
[sam@sony etc]$ cat /etc/fstab Code:
[sam@sony policy]$ cat 20-noatime-removable.fdi Samsom |
All times are GMT -5. The time now is 06:41 PM. |