LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-11-2004, 12:33 AM   #1
movitto
Member
 
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;
Movitto
 
Old 06-11-2004, 02:25 AM   #2
motub
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:

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



NAME
shutdown - bring the system down

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

DESCRIPTION
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.

OPTIONS
-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, 02:38 AM   #3
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
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.
 
  


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


All times are GMT -5. The time now is 06:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration