LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-23-2010, 05:56 PM   #1
samsom
LQ Newbie
 
Registered: Jan 2009
Posts: 27

Rep: Reputation: 15
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/sda2 is mounted.  /dev/sda5 is mounted.

Filesystem check failed.
Please repair manually and reboot. Note that the root file system is currently mounted readonly. To remount it read-write type: mount -n -o remount  ,rw /
When you exit the maintenance shell the system will reboot automatically.
In my system,
/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

Last edited by samsom; 01-24-2010 at 04:33 PM.
 
Old 01-23-2010, 07:48 PM   #2
slightlystoopid
Member
 
Registered: Jan 2010
Distribution: Arch, Gentoo, FreeBSD
Posts: 64

Rep: Reputation: 16
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".
 
Old 01-24-2010, 02:34 AM   #3
samsom
LQ Newbie
 
Registered: Jan 2009
Posts: 27

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by slightlystoopid View Post
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".
I only put my boot on a separate instruction as per the recommendations on the Arch wiki.

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....
 
Old 01-24-2010, 02:39 AM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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

Last edited by GrapefruiTgirl; 01-24-2010 at 02:41 AM.
 
Old 01-24-2010, 02:46 AM   #5
slightlystoopid
Member
 
Registered: Jan 2010
Distribution: Arch, Gentoo, FreeBSD
Posts: 64

Rep: Reputation: 16
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.

Last edited by slightlystoopid; 01-24-2010 at 03:09 AM.
 
Old 01-24-2010, 12:18 PM   #6
samsom
LQ Newbie
 
Registered: Jan 2009
Posts: 27

Original Poster
Rep: Reputation: 15
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
 
Old 01-24-2010, 12:40 PM   #7
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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
 
Old 01-24-2010, 01:35 PM   #8
samsom
LQ Newbie
 
Registered: Jan 2009
Posts: 27

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by GrapefruiTgirl View Post
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
Thanks for your advice. But if fsck from Ubuntu Live CD said the filesystem was clean, does that mean that fsck from within Arch is going to be the same.
Samsom
 
Old 01-24-2010, 02:02 PM   #9
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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!
 
Old 01-24-2010, 03:07 PM   #10
samsom
LQ Newbie
 
Registered: Jan 2009
Posts: 27

Original Poster
Rep: Reputation: 15
@grapefruitgirl
I tried your advice

shutdown -rf -t0 now


And on rebooting, it still gave me the same message.
Any other advice....
Cheers
Samsom
 
Old 01-24-2010, 03:32 PM   #11
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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.


Last edited by GrapefruiTgirl; 01-24-2010 at 03:33 PM.
 
Old 01-24-2010, 04:27 PM   #12
samsom
LQ Newbie
 
Registered: Jan 2009
Posts: 27

Original Poster
Rep: Reputation: 15
Whoooooppppieeeeeeee........Fixed the bloody problem!!!

Thanks a lot for all your help, everyone.

Quote:
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.
I tried it and the problem still persisted. However this time, when I ran fsck, I got a message that since mtab was gone, the system did not know if /home or /boot were mounted and it checked it anyway. Clean ...again.

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
 
Old 01-24-2010, 04:32 PM   #13
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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

Last edited by GrapefruiTgirl; 01-24-2010 at 05:03 PM. Reason: Corrected UDEV (was IDEV)
 
Old 01-24-2010, 04:56 PM   #14
samsom
LQ Newbie
 
Registered: Jan 2009
Posts: 27

Original Poster
Rep: Reputation: 15
Quote:
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
Yup...I have got an /etc/mtab file. Thanks

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
#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0

/dev/cdrom             /media/cd   auto    user,noauto,unhide,exec   0      0
/dev/dvd               /media/dvd  auto    user,noauto,unhide   0      0
#/dev/fd0               /media/fl   auto    user,noauto             0      0
/dev/sda1               /mnt/winxp  ntfs-3g    user



UUID=097bb8f1-7102-4771-b9e1-ec2c320e2f91 /boot ext3 defaults 0 2
UUID=508fd896-693a-4b18-bace-33fdf21c5ebb /home ext3 defaults 0 2
UUID=67354fc4-b077-4436-8624-5122a4bba1e9 / ext3 defaults 0 1
UUID=b8f1730c-a75d-4a91-83d9-b7d11f84fced swap swap defaults 0 0
This is the output of the file for automounting usb devices

Code:
[sam@sony policy]$ cat 20-noatime-removable.fdi
<device>
  <match key="block.is_volume" bool="true">
    <match key="@block.storage_device:storage.hotpluggable" bool="true">
      <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>
    </match>
    <match key="@block.storage_device:storage.removable" bool="true">
      <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>
    </match>
  </match>
</device>
I have a feeling this might be the culprit file, but cannot be certain. if it persists, I might try deleting it and go back to mounting usb devices manually and see if it sorts things out.

Samsom
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Filesystem check failed after full system update Leonid.I Linux - Software 8 09-24-2009 07:02 PM
Filesystem check failed! cerin Linux - Newbie 1 12-03-2005 07:42 PM
Failed to check filesystem jonmarco Linux - General 2 07-18-2005 05:12 AM
Failed to check Filesystem... keyz_182 Linux - General 8 11-22-2003 09:20 PM
Error during booting-filesystem check failed pallablahiri Linux - General 1 12-03-2001 02:41 AM


All times are GMT -5. The time now is 04:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration