Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| 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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-21-2007, 03:08 PM
|
#1
|
|
Member
Registered: Jul 2004
Distribution: Debian
Posts: 34
Rep:
|
Remount root filesystem read-only
Hello,
How can I remount the root filesystem read-only? I want to do that because i want to make a filesystem check with fsck.
Thanks!
|
|
|
|
04-21-2007, 03:16 PM
|
#2
|
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
see man mount…
Ex:
Code:
# mount -r -o remount /
|
|
|
|
04-21-2007, 03:36 PM
|
#3
|
|
Member
Registered: Jul 2004
Distribution: Debian
Posts: 34
Original Poster
Rep:
|
I tried that already, but it doesn't work:
Code:
# mount -r -o remount /
mount: / is busy
|
|
|
|
04-21-2007, 04:07 PM
|
#4
|
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
|
|
|
|
04-21-2007, 04:11 PM
|
#5
|
|
Member
Registered: Jul 2004
Distribution: Debian
Posts: 34
Original Poster
Rep:
|
Yes, I tried this also:
Code:
umount -r /
umount: /: device is busy
umount: /: device is busy
|
|
|
|
04-21-2007, 04:15 PM
|
#6
|
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
Are you in the middle of a copy or download?
|
|
|
|
04-21-2007, 04:23 PM
|
#7
|
|
Member
Registered: Jul 2004
Distribution: Debian
Posts: 34
Original Poster
Rep:
|
No, I am not. But however there are for sure files in use because it's the root file system. That's the problem. And i don't know how to force to remount read-only.
|
|
|
|
04-21-2007, 07:14 PM
|
#8
|
|
Member
Registered: Jul 2004
Distribution: Debian
Posts: 34
Original Poster
Rep:
|
Or is there another method to check the root filesystem without reboot?
|
|
|
|
04-21-2007, 07:45 PM
|
#9
|
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
Quote:
|
Originally Posted by zsolt_tuser
No, I am not. But however there are for sure files in use because it's the root file system. That's the problem. And i don't know how to force to remount read-only.
|
Personally, I have /var on a separate partition. Perhaps you might stop certain daemons temporarily (syslogd comes to mind).
|
|
|
|
04-21-2007, 08:47 PM
|
#10
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,225
|
Try it in single user - init 1 usually, but who knows with Debian.
I'd just force it on the next re-boot.
|
|
|
|
03-10-2010, 10:15 AM
|
#11
|
|
LQ Newbie
Registered: Aug 2007
Posts: 15
Rep:
|
Hi, i put this only for the record:
I have the same trouble,i cant remount with the "disk busy" letter, but i need to run fsck.reiserfs.
So googling i found this:
Code:
/bin/mount -no remount,ro /dev/sda2
Quote:
|
Originally Posted by man page of mount
-n Mount without writing in /etc/mtab. This is necessary for
example when /etc is on a read-only file system.
|
I find this too in http://old.nabble.com/init-1,-root-d...d16786781.html
Code:
man shutdown:
-F Force fsck on reboot.
or
Last edited by schlabs; 03-10-2010 at 10:32 AM.
|
|
|
|
04-27-2011, 04:01 PM
|
#12
|
|
LQ Newbie
Registered: Apr 2011
Posts: 2
Rep:
|
Stopping service that are accessing the filesystem
You need to make sure that you gracefully shut down any services that are holding open files before remounting. To do so, run:
You'll find things like portmap, rsyslogd, atd, etc., containing either "f" or "F" in the flags. All of these should be stopped. Many can be stopped with "service some_service_name stop", with a list of service names found in a location like /etc/init.d. A few processes (like rpc.statd, if it's running) will simply need to be killed. Once this is complete, you can use the above commands to remount your file system.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:05 PM.
|
|
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
|
|