Linux - SoftwareThis 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.
I'm trying to execute a fsck (e2fsck) on my system. Though I boot into single-user mode I'm not able to umount my /dev/sda1 root filesystem. Of course I can't run a fsck on my root partition (/dev/sda1 with / as mountpoint) without my root filesystem being unmounted.
When I try (in single-user mode of course) to run umount /dev/sda1 I get "device is busy". After I ran fuser -km /dev/sda1 my system doesn't give any error when I execute umount -l /dev/sda/1. Unfortunately, I don't notice any difference when I execute mount.
When I try to fsck my /dev/sda1 I see a warning that contains:
Quote:
sda1 is mounted.
WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.
I would like to execute the fsck command on my system without using a live cd.
I'm trying to execute a fsck (e2fsck) on my system. Though I boot into single-user mode I'm not able to umount my /dev/sda1 root filesystem. Of course I can't run a fsck on my root partition (/dev/sda1 with / as mountpoint) without my root filesystem being unmounted.
You can run fsck against a file system mounted in read only mode. When you boot into single user mode the kernel should mount / as read only.
If you cannot get / mounted in read only mode then I suggest that you use a live CD to run fsck.
Nope - the OP wants to fsck root - needs (should) be rw.
This works fine BTW - been there, done that.
Of course, fsck can trash files whilst doing it's job; that applies equally with root. Problem is (with root) you can wind up with a dead system.
That is the OPs choice - presumably s/he has read my sigline.
It seems to me that / doesn't have to be mounted in read only mode in order to execute a fsck.
It doesn't. What read only mode does is prevent other programs from updating the file system control blocks at the same time that fsck is updating the control blocks. Such simultaneous updates will scramble the file system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.