LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 03: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, 03:42 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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, 04: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, 05: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 05:43 PM.
 
Old 07-07-2011, 07:06 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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



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 06:56 AM
Difference between init 0 and shutdown -h now cheng0017 Linux - Newbie 3 03-28-2010 01:38 PM
init 0 and init 6 wont works czezz Solaris / OpenSolaris 6 07-05-2007 12:57 PM
Mounting works, playing music works, reading tags doesn't Celettu Linux - Newbie 7 08-23-2006 12:27 PM
Echo /devPrinting doesn't work, echo /usb/lp0 works, Testpage works, Printing doesn't Hegemon Linux - General 3 08-15-2002 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:08 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
Open Source Consulting | Domain Registration