General :: Shutdown A Box Without Running Init 0?
Sep 30, 2010I want to shutdown my computer as if power was cut off (don't ask me why). How do I do this under Linux?
View 6 RepliesI want to shutdown my computer as if power was cut off (don't ask me why). How do I do this under Linux?
View 6 Repliessee if there are differences between init 0 and shutdown -h now?
View 3 Replies View RelatedIm having a bit of a problem with a init script which I wrote to start and stop oracle listener and database. My system is Redhat 5.4 64bit and oracle 10g2 standard database (64). I have created the script and added the script using
chkconfig add orashut, and on the script by chkconfig level 345 orashut on Now I can use service orashut start, stop, restart, and works fine and when the system comes up the database and the listener would come up as planed. But the problem is when I do a reboot or shut down the db or the listener would not shutdown as expected, I placed at K00 values as well in rc0.d and rc6.d to give the priority at the shutdown. Even though all the configurations say this script should run before everything else at the shutdown time this is not working.
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.
I have a service that when shutdown requires a username and password. I use `read` in my script to gather this info because I can't have it in the file. When I run the init script by hand it will ask for the username and password and everything shutsdown properly. When I run reboot or halt I get no prompt. get user input in a shutdown process?
View 2 Replies View RelatedI have an init.d script (dahdi-redfone) that works perfectly if you call "service dahdi-redfone stop" but for some reason when I reboot or shutdown it never gets called.Below in the listing of my rc6.d directory
# ls /etc/rc.d/rc6.d
K01dnsmasq K05anacron K20nfs K65dahdi-redfone K85messagebus K88auditd K90bluetooth K99readahead_early
[code]....
I cant shutdown without running sudo shutdown. When I try to use the default gnome shut down it takes me back to the logon screen. Fresh install today and I've had the same problem on other installs.
View 9 Replies View RelatedWhat's the correct way to shutdown system while apt-get is still running? apt-get complains about unclean shutdown when I just shutdown computer.
View 2 Replies View RelatedSimple question: what parameters can be used to shutdown a computer running Linux/OSX in 30 seconds? I've always run Windows, where I would go shutdown -s -t 30 but the parameters are different. I've looked it up here but it will only let you shut a computer down at a specific time (like 8:00) rather than in a specific amount of seconds.
View 4 Replies View RelatedI've used the following script here: [URL] to upgrade Alsa to 1.0.21 in Ubuntu 8.04. Now whenever I run:
Code:
sudo shutdown -h <time> or sudo reboot from the terminal I get a rather annoying beep sound. What's even more annoying is if I use the shutdown command to specify a time I get a beep every 10 minutes or so.
I've tried disabling the terminal beep in the terminal profile, disabling the beep in System/Preferences/Sound, adding "blacklist pcspkr" to /etc/modprobe.d/blacklist, and running gconf-editor from the terminal and setting /desktop/gnome/peripherals/keyboard/bell_mode to 'off' rather than 'on'.
I'm trying to reboot the server (shutdown -r now).But it seems like nothing happened.
When I try "shutdown -c", the system prompts "shutdown: cannot find pid of running shutdown."
I have a firewall script setup to run in rc2.d. There is a K99 for it and then an S99. The problem however, is that it isn't being called. No errors, no logs, nothing. The symlinks in /etc/rc2.d point to /etc/init.d/script, but nothing ever happens on boot or shutdown. I can manually do /etc/init.d/script start and it will start just fine, including printing a line that it is starting. What's going on here? The permissions are the same as the other scripts in the init directory, so I doubt that is a problem.
View 4 Replies View RelatedI'm trying to get a daemon to start automatically using an init bash script - i suppose this is what it is called. This is what I did to 'install' the script.
sudo cp inittestdaemon /etc/init.d/
sudo update-rc.d inittestdaemon defaults 91
sudo chmod 777 /etc/init.d/inittestdaemon
The script didn't work, so I tried running it directly on the terminal and this is the error which i got:
[Code]...
Data points:-Ubuntu 2.6.32-19-server-First symptom, blinking cursor on boot-After removing quiet from the boot options I see that it runs through the init scripts and then hangs-I can boot to command line by putting "rw init=/bin/bash" but don't know what to do once I get there to diagnose the problem-The system is primarily a fileserver/XBMC htpc-The system was running for several months before this restart so I can't identify a specific change as the problem unless it's because...-Recently I made changes to all of the disks by switching from JBOD to software raid (with mdadm)
View 4 Replies View RelatedIm am building a Linux distro. It will be very tiny and fast.
I only have a minimal linuxkernel (bzImage) who is 1,2 mb big. And then I have Busybox who is 174,6 kb big.
The commands in busybox is: cd, ls, mkdir, rmdir, wget, httpd, clear, rm, poweroff, halt, reboot, fdisk, mount, umount, free, and cp.
When I compiled the kernel i use initramfs/initrd function and point it to a folder where initrd/initramfs source is.
The kernel works OK with others initramfs/initrd files. But not with my own.
Quote:
Here is how the end of the kernelcomplie look like.
Quote:
Here is my init file who is the initrd/initramfs source.
Quote:
The initramfs folder contains "bin" (folder) and "init" a file. No more.
The problem is that the kernel cannot find/read init file.
i want to run a script when computer shutdown to close my teamspeak2 serveri know how to start it automatically http://www.fedorafaq.org/basics/#startonbooti found a good start stop script for ts2Quote:
#! /bin/bash
# Copyright (c) 2004 TeamSpeak team All rights reserved.
#
[code]...
I have a small but annoying problem... I have two scripts that I want to run automatically one at boot and one at shutdown. For the one at boot I tried to put it in rc.local or to create a file in /etc/init.d/ based on the others files in the folder but nothing worked... I need it to run system-wide and not once a specific user is logged in.
For the script at shutdown I don't know how to do it but it can be user specific or system-wide I don't really care. I am running Ubuntu 10.10 64bits with kernel 2.6.35-24-generic
PS. I should add that when executed manually both scripts works perfectly well and I don't need those script to run continuously in the background, just run and quit.
I cannot locate shutdown log for Linux shutdown to check various activities carried out during shutdown. I can view Startup Log which is availble on console>Applications>System Tools>System Logs.
I have included Shutdown/Startup in dbora, so that Oracle 10gR2 Shutdown/Startup will be automated during OS Shutdown/Startup.
I want to check Shutdown log because Oracle Shutdown was not running, as from $ORACLE_HOME/shutdown.log contains no entries, where as startup log contains latest startup details.
That means here 2 issues are there. One, I want to locate OS Shutdown Log and the other being Why Oracle Shutdown not getting executed.
I'm use ubuntu 8.10 ( on a msi 645 notebook ) and i'm trying to shutdown from grub. I have add these entries to menu.lst after the ### END AUTOMAGIC KERNEL LIST
title Halt
halt
I only get a black screen but the pc is still running someone said it only put grub to sleep or something. I also tried this commands sudo shutdown -h now or init 0, poweroff... but there all "unrecognized commands" in grub... Is there a possibilty to shutdown from grub.
I've been dual booting 10.10 with Windows7 for about a month. Today is the first time I've encountered a serious problem.
This morning, nothing functioned properly after trying to open several programs. The computer seemed to be "frozen", although the mouse was working fine.
I decided to reboot, but then encountered an even bigger problem.
It failed to boot and got this message: no init found. try passing init= bootarg
The problem now is that it requires a Live CD session and I keep getting this: GLib-WARNING **: getpwuid_r(): failed due to unknown user id (0)
In case it matters, I didn't install 10.10 from an ISO, I just upgraded from 10.04.
Ubuntu 9.10 will not boot! System froze this morning, I restarted and it is now failing to boot. Starts loading grub and I get this message:
mount: mounting /dev/disk/by-uuid/04aa3697-7bc0-45b5-b86a-77a1e6534bd5 on /root failed: invalid argument
mount: mounting /sys on /root/sys failed: no such file or directory
mount: mounting /dev on /root/sys failed: no such file or directory
[code]....
I booted with 9.04 LiveCD discovered the drive could not be mounted-ran fsck -ln and it told me the drive has no valid partition table. I have had intermittent problems mounting flash drives before this, so I'm kind of worried it might be a hardware issue.Also have files on that drive I would rather not lose, so reinstalling is hopefully a last resort.
I have a VPS that has 512MB of ram. I'm using it as a mail/web server. It keeps running out of memory. I know amavis/clamav are memory hogs, but I checked my ps aux and found 100's of instances of "apache-init-server" running. I killed them all, and they keep spawning back. What could be causing this. I've never seen this on a webserver before. OS: CentOS 5.5
View 10 Replies View Relatedi wrote a script and placed it in init.d some time ago to run on system startup. that all works well and good. but now i have changed the script (all i basically did was add the line echo 'afasdfasdfsf' > /tmp/x at the start), and the problem is that when i reboot, the old script still seems to be running (ie nothing shows up in /tmp/x). is this a standard feature of ubuntu and i simply need to reload the new script into some sort of cache?
View 2 Replies View RelatedSo I found many methods on google, but no one works. It seems that this one is THE Debian way.
Code:
### BEGIN INIT INFO
# Provides: mystartupscript
#[code]...
me the difference between /etc/init.d scripts and /etc/init.d/rc?.d scripts.
View 3 Replies View RelatedI have written an init script and placed it in /etc/init.d/ directory.What I would like to know is, will the script run automatically or we need to install the script using "install_initd" command.If I have to invoke this command manullay, what will be the best place to do this ? Can I add this to "/etc/init.d/rcS" file
View 6 Replies View RelatedI'm trying to boot Emdebian lenny on my compact flash and it shows the following errors during boot time :
Code:
Mounting local filesystems ... done .
/etc/rc.d/S35mountall.sh : line 45 : uname : command not found .
[code]...
openSUSE 10.3 on Itronix IX260+ Stuck on command line, init 3, and all attempts at graphic init 5 fail. Get these messages:(EE) No devices detected; Fatal screen error: no screens found; AIGLX disabled Primary Device is PCI 01:00:0kernel:device-mapper:multipath round-robin:version 1.0.0 loaderkernel:device-mapper:table:253:0:multipath: error getting device
kernel:device-mapper:ioctl: error adding target to tableProblem would seem to be with the device-mapper, but have no idea how to fix it.
While I was using my computer a few days ago, the terminal stopped working properly, so I tried to reboot, and when it started up again it wouldn't boot and said "no init found. try passing init=bootarg"
This has happened twice before, so I really need to figure out what keeps happening, otherwise I can't continue to use linux. i reinstalled both times before. i think that this is caused by a process that prevents me from using the hard drive, because when I try to check the disk in the terminal or in gparted, it says Device or resource busy while trying to open /dev/sda1. Filesystem mounted or opened exclusively by another program?
Also, in the disk utility, in the lower right corner of the filesystem it has a spinning "loading wheel".(i'm not sure if that means anything)
I am using ubuntu 10.10, but am not sure what kernel I am using, but i tried a few different kernel options(there's three of them at start up). safe mode does not work either.
I have installed a cluster computer with 10 nodes . The manufacturer is HP . All nodes and the master node have redhat enterprise linux installed in them . When I shutdown the nodes from the master terminal using "shutdown -h now" they get shutdown . But they dont get completely turned off . This issue bothers me when the power supply is given , all nodes boot up simultaneously generating a huge heat .
Thing to note : When we shutdown our PC they get completely turned off . When the power supply is given , a press on the Power On button is required to boot the system. But , why does it not happpen in the case of cluster? Is there any other way of completely turning off the nodes from the master terminal ?