Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-10-2004, 11:33 PM   #1
Registered: May 2004
Distribution: Fedora 4 and Slackware
Posts: 179

Rep: Reputation: 30
Question Unmounting root

Hi all;

I'm studying up on mounting and unmounting stuff, and other related topics such as fsck.
I want to do a fsck on the root file system, just to do (incase the worst comes, I know the process), but as all of you probably already know, you cant (or shouldnt) do a fsck on a mounted filesystem. I have booted into linux single user mode, both from the lilo prompt and using a boot disk, but I when I check what is mounted with the mount command it says my root file system is already mounted. I cannot unmount it using the umount command. So I was just wondering how I am to go about unmounting /

BTW I am running Red Hat 8 and am a major linux

Thx for the help;
Old 06-11-2004, 01:25 AM   #2
Senior Member
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Basically, you need to run fsck before the filesystem is mounted (at boot), and the main way to do that is to tell the system to do so when shutting down:

From man shutdown:

SHUTDOWN(8) Linux System Administrator's Manual SHUTDOWN(8)

shutdown - bring the system down

/sbin/shutdown [-t sec] [-arkhncfF] time [warning-message]

shutdown brings the system down in a secure way. All logged-in users are notified that
the system is going down, and login(1) is blocked. It is possible to shut the system
down immediately or after a specified delay. All processes are first notified that the
system is going down by the signal SIGTERM. This gives programs like vi(1) the time to
save the file being edited, mail and news processing programs a chance to exit cleanly,
etc. shutdown does its job by signalling the init process, asking it to change the run-
level. Runlevel 0 is used to halt the system, runlevel 6 is used to reboot the system,
and runlevel 1 is used to put to system into a state where administrative tasks can be
performed; this is the default if neither the -h or -r flag is given to shutdown. To see
which actions are taken on halt or reboot see the appropriate entries for these runlevels
in the file /etc/inittab.

-a Use /etc/shutdown.allow.

-t sec Tell init(8) to wait sec seconds between sending processes the warning and the
kill signal, before changing to another runlevel.

-k Don't really shutdown; only send the warning messages to everybody.

-r Reboot after shutdown.

-h Halt after shutdown.

-n [DEPRECATED] Don't call init(8) to do the shutdown but do it ourself. The use of
this option is discouraged, and its results are not always what you'd expect.

-f Skip fsck on reboot.

-F Force fsck on reboot.

-c Cancel an already running shutdown. With this option it is of course not possible
to give the time argument, but you can enter a explanatory message on the command
line that will be sent to all users.

time When to shutdown.
So, shutting down with shutdown -rF now ought to run fsck when the system reboots.

Hope this helps.
Old 06-11-2004, 01:38 AM   #3
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Another option would be with rescue disks or Live CD's (such as Knoppix). If you boot those, then they have their own root partition that you work out of. From there, you can fsck your hard disk based root partition like you would any other.


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
Unmounting a pendrive (not as root)? will103 Linux - Hardware 3 09-07-2004 08:55 PM
Help with unmounting root partition rlong411 Linux - Newbie 1 12-17-2003 11:26 AM
Unmounting??? DiZASTiX Linux - Newbie 3 05-13-2003 09:04 PM
Unmounting the cd? mrobi Linux - General 3 02-16-2003 12:23 AM
CD unmounting Paul_assheton Linux - General 14 04-16-2002 02:37 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration