LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-04-2008, 07:47 PM   #1
linuxgentoo
LQ Newbie
 
Registered: Nov 2007
Location: Shanghai,China
Distribution: gentoo
Posts: 19
Blog Entries: 1

Rep: Reputation: 0
fsck.ext2: Is a directory while trying to open /


Hi,all
I want to enable check root filesytem during boot ,the following code complete the task

fsck -y -C /

( /dev/sda3 is root)

it failed ,the log message:

fsck.ext2: Is a directory while trying to open /
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>


if i add
/dev/sda3 / ext3 default 1 1

everything looks well


why?

thanks
 
Old 11-04-2008, 07:55 PM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Two things:
  1. you don't fsck dirs, but devices, for example, fsck /dev/sda2, but not fsck /
  2. you never ever fsck volumes that are mounted r/w, or you will seriously screw up them
 
Old 11-04-2008, 08:02 PM   #3
linuxgentoo
LQ Newbie
 
Registered: Nov 2007
Location: Shanghai,China
Distribution: gentoo
Posts: 19

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Quote:
Originally Posted by i92guboj View Post
Two things:
  1. you don't fsck dirs, but devices, for example, fsck /dev/sda2, but not fsck /
  2. you never ever fsck volumes that are mounted r/w, or you will seriously screw up them
thanks for your reply

1) but /dev/sda3 already mounted /
2) before fsck filesystem,already mount filesystem ro

in fact ,in most popular linux distro,the script is checkfs.sh
 
Old 11-04-2008, 08:08 PM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
So I don't understand what the problem is exactly.

If you just want to use the standard checks, set up fstab accordingly and use tune2fs or a similar tool to set the time between checks (or the number of mounts).

If that's not it, how, when and from where are you running that fsck command?

PS. I don't think that the fact that it's mounted in / is relevant. fsck still works over device nodes, and not over mountpoints/dirs.
 
Old 11-04-2008, 08:13 PM   #5
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,410

Rep: Reputation: 141Reputation: 141
I'm not so sure you can run fsck.ext2 on an ext3 filesystem.
 
Old 11-04-2008, 08:20 PM   #6
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
All the ext?.fsck are symlinks to e2fsck usually. Ext2/3 is basically the same fs, just that ext3 uses a journal to keep track of the operations.
 
Old 11-04-2008, 08:23 PM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,410

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by i92guboj View Post
All the ext?.fsck are symlinks to e2fsck usually. Ext2/3 is basically the same fs, just that ext3 uses a journal to keep track of the operations.
Oh. Well as Gilda used to say: "never mind".
 
  


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
fsck ext2 "directory connectivity" calutateo Linux - General 2 08-03-2005 01:54 AM
Gentoo fsck.ext2 problem! Nz_Boy_2004 Linux - Distributions 1 11-28-2004 09:45 PM
fsck.ext2 - booting problems -- HELP blo1005 Linux - Software 2 06-16-2004 01:43 AM
fsck crashes fixing ext2 fs echapin Linux - General 2 05-28-2004 11:56 AM
error with FSCK.EXT2 cepol Linux - Software 1 04-13-2004 11:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:02 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
Open Source Consulting | Domain Registration