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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
11-04-2008, 07:47 PM
|
#1
|
LQ Newbie
Registered: Nov 2007
Location: Shanghai,China
Distribution: gentoo
Posts: 19
Rep:
|
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
|
|
|
11-04-2008, 07:55 PM
|
#2
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083
|
Two things:
- you don't fsck dirs, but devices, for example, fsck /dev/sda2, but not fsck /
- you never ever fsck volumes that are mounted r/w, or you will seriously screw up them
|
|
|
11-04-2008, 08:02 PM
|
#3
|
LQ Newbie
Registered: Nov 2007
Location: Shanghai,China
Distribution: gentoo
Posts: 19
Original Poster
Rep:
|
Quote:
Originally Posted by i92guboj
Two things:
- you don't fsck dirs, but devices, for example, fsck /dev/sda2, but not fsck /
- 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
|
|
|
11-04-2008, 08:08 PM
|
#4
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083
|
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.
|
|
|
11-04-2008, 08:13 PM
|
#5
|
Senior Member
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,410
Rep: 
|
I'm not so sure you can run fsck.ext2 on an ext3 filesystem.
|
|
|
11-04-2008, 08:20 PM
|
#6
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083
|
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.
|
|
|
11-04-2008, 08:23 PM
|
#7
|
Senior Member
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,410
Rep: 
|
Quote:
Originally Posted by i92guboj
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".
|
|
|
All times are GMT -5. The time now is 10:02 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|