LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-07-2011, 04:15 PM   #1
jeriryan
Member
 
Registered: Apr 2003
Location: United States
Distribution: RHEL 5.4, Snow Leopard
Posts: 87

Rep: Reputation: 15
Shutdown works and init 0 doesn't, so how are they different?


When I bring down a certain machine with some nfs mounts using init 0, it hangs forever while trying to bring down the mounts, but if I bring it down using halt -p (which I've read just calls shutdown if I'm in init 3), it comes down in a timely manner. I've also read that shutdown still calls all the rc.d kill scripts just like init 0, so what is actually the difference between them? Is it this:
Quote:
All processes are first notified that the system is going down by the signal SIGTERM
? Does init not do that?

I'm not trying to directly troubleshoot why NFS makes me hang with init 0 at this point, just wondering why shutdown works whereas init 0 doesn't.
 
Old 07-07-2011, 04:42 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Have you examined /var/log/messages to see what, if any, error messages are logged in re the use of init 0?
 
Old 07-07-2011, 05:11 PM   #3
jeriryan
Member
 
Registered: Apr 2003
Location: United States
Distribution: RHEL 5.4, Snow Leopard
Posts: 87

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bigrigdriver View Post
Have you examined /var/log/messages to see what, if any, error messages are logged in re the use of init 0?
Thanks for your reply. Briefly, didn't see anything useful, but I'm not really interested in fixing the NFS hanging issue at the moment, I'm more curious about why init 0 doesn't work while shutdown does when I always thought they were pretty much aliases for the same command. Can someone confirm if these are these commands are in fact different in some significant way?
 
Old 07-07-2011, 06:39 PM   #4
brian-ocs
LQ Newbie
 
Registered: Jul 2011
Location: San Diego, CA
Distribution: CentOS 6, Linux Mint Debian Edition
Posts: 18

Rep: Reputation: 1
That sounds like an issue with the way the NFS share is being exported or mounted. Sometimes the "sync" option can cause issues. Can you post the server's /etc/exports file and your local /etc/fstab file?


_________________________
www.OneCourseSource.com

Last edited by brian-ocs; 07-07-2011 at 06:43 PM.
 
Old 07-07-2011, 08:06 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
I think shutdown is more of a script that does a controlled shutdown (sic)
Quote:
The shutdown script that calls halt(8) as the last thing in the shutdown sequence ...
http://linux.die.net/man/8/shutdown

init just does it ; you should really use telinit http://linux.die.net/man/8/init.

Actually, I'd stick to shutdown for shutting down; also covers reboot and halt in a controlled manner...
 
  


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
Ubutnu won't boot. Error: Target file system doesn't have /sbin/init. No init found. Zeljka_Lin Linux - Newbie 9 05-02-2011 07:56 AM
Difference between init 0 and shutdown -h now cheng0017 Linux - Newbie 3 03-28-2010 02:38 PM
init 0 and init 6 wont works czezz Solaris / OpenSolaris 6 07-05-2007 01:57 PM
Mounting works, playing music works, reading tags doesn't Celettu Linux - Newbie 7 08-23-2006 01:27 PM
Echo /devPrinting doesn't work, echo /usb/lp0 works, Testpage works, Printing doesn't Hegemon Linux - General 3 08-15-2002 02:13 PM


All times are GMT -5. The time now is 01:02 PM.

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