LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   How to run FSCK and error in FSTAB (https://www.linuxquestions.org/questions/ubuntu-63/how-to-run-fsck-and-error-in-fstab-545259/)

kc5hwb 04-11-2007 06:30 PM

How to run FSCK and error in FSTAB
 
I wanted to run FSCK on my primary drive, but I got an error, so I backed out..

Code:

jason@SAMSON:~$ fsck
fsck 1.39 (29-May-2006)
WARNING: bad format on line 11 of /etc/fstab
e2fsck 1.39 (29-May-2006)
/dev/sda1 is mounted. 

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.


Also, you can see the bad format on line 11 of my FSTAB file, but I don't get this...there IS NO line 11 here...

Code:

# /etc/fstab: static file system information.
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc            /proc          proc    defaults        0      0
# /dev/sda1
UUID=5e7da045-0340-44be-9b8f-d894a9a3bfe9 /              ext3    defaults,errors=remount-ro 0      1
# /dev/sda5
UUID=bc9fd14a-eafb-44a8-93c7-1ba9edd4cc95 none            swap    sw              0      0
/dev/hdb        /media/cdrom0  udf,iso9660 user,noauto    0      0
#Ydrive

There is nothing under #Ydrive, could this be the problem? I count that line as line 10.

{BBI}Nexus{BBI} 04-11-2007 08:32 PM

The blank line under #Ydrive may be the problem. Go to the end of the #Ydrive line and hold your del key to see if it clears the blank line.

As for running fsck. You don't run fsck while your drives are mounted. You need to boot into single user mode and then run fsck.

+++ The Listing below is just an example, adapt it for your own use +++

a) Take down system to single user mode and unmout system

Let us say you would like to run fsck on /home (/dev/sda3):

init 1
umount /home
umount /dev/sda

fsck /home

OR

fsck /dev/sda3

OR

e2fsck -y /dev/sda3

I hope this helps.

jailbait 04-11-2007 08:35 PM

"WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage."

Another way to run e2fsck is to boot a live CD, make sure the filesystem is umounted, and then run e2fsck.

-----------------
Steve Stites

syg00 04-11-2007 10:16 PM

Just issue shutdown with "-F" - on reboot Ubuntu will honour the request for a forced fsck.
The manpage will have info.

kc5hwb 04-12-2007 07:30 AM

Thanks for all the tips. Does the FSCK check the entire volume? I thought it was like a CHKDSK in Windows and checked the whole drive. But after reading what {BBI}Nexus{BBI} said, I wonder if it is just for one directory at a time.

jailbait 04-12-2007 12:50 PM

"Does the FSCK check the entire volume? I thought it was like a CHKDSK in Windows and checked the whole drive. But after reading what {BBI}Nexus{BBI} said, I wonder if it is just for one directory at a time."

fsck checks a partition.


---------------------
Steve Stites


All times are GMT -5. The time now is 06:03 PM.