LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 04-11-2007, 06:30 PM   #1
kc5hwb
Member
 
Registered: Jun 2001
Location: Colleyville, Texas
Distribution: Ubuntu 6.10
Posts: 82

Rep: Reputation: 15
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.
 
Old 04-11-2007, 08:32 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,305

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

Last edited by {BBI}Nexus{BBI}; 04-11-2007 at 08:50 PM.
 
Old 04-11-2007, 08:35 PM   #3
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,589

Rep: Reputation: 187Reputation: 187
"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
 
Old 04-11-2007, 10:16 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,483

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Just issue shutdown with "-F" - on reboot Ubuntu will honour the request for a forced fsck.
The manpage will have info.
 
Old 04-12-2007, 07:30 AM   #5
kc5hwb
Member
 
Registered: Jun 2001
Location: Colleyville, Texas
Distribution: Ubuntu 6.10
Posts: 82

Original Poster
Rep: Reputation: 15
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.
 
Old 04-12-2007, 12:50 PM   #6
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,589

Rep: Reputation: 187Reputation: 187
"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
 
  


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
Boot error fsck.reiserfs failed Run Manually anerusmc Linux - Newbie 5 11-03-2009 08:34 PM
Error in partition. Unexpected Inconsistency, won't let me run fsck! mlsbraves Slackware 2 04-15-2005 10:03 PM
Your /ect/fstab does not contain the fsck passno field LostinCode Mandriva 3 05-07-2004 04:15 PM
Boot error fsck.reiserfs failed Run Manually anerusmc Linux - Software 0 02-21-2004 10:49 PM
How run fsck? lectraplayer Linux - Newbie 1 10-05-2003 09:38 PM


All times are GMT -5. The time now is 11:31 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration