Linux - NewbieThis 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!
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'd really recommend running shudown over "telinit" just so you're in the habit. Your distro may always do a "shutdown" on doing "telinit" (or "init") but most flavors of Unix didn't until recently. You can cause damage by telling it to stop the operating system but not stop underlying processes first as shutdown does.
shutdown -h 0 has the same effect as telinit 0 on my system. It must be referenced by the runlevel script.
However, shutdown -h 0 definitely has different effects in the two kernels (2.6.5.x and 2.6.12.x). In the older kernel, the "off-click" is brutal and precedes the disk spindown. In the newer kernel, the disk spins down gently before the off-click.
This gives the impression of it going into hibernation, and I would swear that when I last tried this kernel a few months ago I got a spontaneous disk spin-up several hours after shutting down. But possibly I am imagining things.
I would still like to understand better how the kernel influences these things, given that they are governed by the scripts in /etc.
/etc/init.d (more appropriately /etc/rc?.d since its possible one would be there not linked backed to /etc/init.d) are only part of the story. Actually these are a fairly recent development in Unix/Linux (considering Unix has been around since 1969). On HP-UX 9 they didn't exist so have only been around about 10 years. (NOTE: some flavors of Linux apparently don't use SysV init scripts.)
You can have a look at /etc/inittab which has been there far longer. Once upon a time I did most of my startups from within that and it is still what happens first.
The process "init" is PID 1 because it is the first thing that starts. Doing a "man init" should give you some additional details on this. For more detail as to what the kernel does I'll have to defer to someone else as I dont' really delve into that despite having attended internals training once upon a time.
Last edited by MensaWater; 10-06-2005 at 08:17 AM.
I guess the difference in shutdown behaviour between the kernels is just a refinement of the hardware support in the later kernel. As long as the effect is the same, I suppose that can only be a good thing.
Under kernel 22.214.171.124, my laptop will not properly power off. Having done a telinit 0 or a shutdown -h apparently with success, the machine will then turn on and boot up spontaneously in the middle of the night. I assume this was at 4.15am for a cron job, though to be honest I was in too much of a daze to check the cause.
Since I sleep in close proximity to my laptop, 4am boot-ups are not really desirable. And in any case I can't see how the cron job will get done, because the machine is in an unbooted state to start with. It seems to be a question of interference with the ACPI modules.
Anyone got any ideas what I can tweak or disable? Other than unplugging and taking the battery out, that is...
This thread has had a good few hits, so perhaps I'm not the only one with this unsolved problem.
To recap. My laptop does not power off completely with a telinit 0 or a shutdown -h now under recent kernels (126.96.36.199 and 188.8.131.52 at the very least). It did under 2.6.5.x.
Somewhere there must be a conflict between the kernel and the hardware, perhaps involving the ACPI power management protocols. Still seems strange to me that Linux doesn't have a command which just turns the machine off, always.
Any more ideas on commands and switch combos to try? Or power management settings to tweak?
Check the power-management support in the kernel. There are lots of ways that a laptop can implement power-management. The /var/log/messages file should have something to say... error-messages resulting from attempts to power-off and so forth.
But yep, it's definitely the kernel. As detailed in my posts above, the sound of the hard drive powering down is different. No other settings or the BIOS have been touched.
I was thinking about modifying the cronjob schedule to get round the nocturnal boot-up issue, but this hardly addresses the issue. The issue is that I don't want my computer starting up when it is meant to be turned off...
Perhaps this post should be in the hardware forum, because it seems to be a pure hardware problem. For my part I have no idea how to solve it, in any case!
Disabled hibernation in the BIOS. Made no difference to the "soft" power-down.
The reason this seems strange to me is that the machine does seem to be turning off properly, as under the older kernel. The shutdown script executes properly. All the services shut down one by one (including 'cron.d') before the final power-down.
So if the cron daemon and nothing else is running, how on earth is the machine powering up spontaneously?