Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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
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.
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?
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)
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.