PDA

View Full Version : Power Down won't work after hdinstall



FelixDzerzhinsky
01-13-2004, 12:12 PM
My computer powers down in windoze but not linux. This has also happened with suse and mandrake.

Doesn't matter if shutdown -h now in shell of from kde login manager.

my /etc/inittab:

# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.9 2001/05/31 10:37:50 knopper Exp $

# The default runlevel.
id:5:initdefault:

~~:S:wait:/sbin/sulogin

# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

# What to do in single-user mode.
~~:S:respawn:/bin/bash -login >/dev/tty1 2>&1 </dev/tty1

# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.

l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6

# What to do when CTRL-ALT-DEL is pressed.
ca::ctrlaltdel:/sbin/shutdown -h now

# Action on special keypress (ALT-UpArrow).
kb::kbrequest:/bin/echo "Keyboard Request -- edit /etc/inittab to let this work."

# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop

# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
# <id>:<runlevels>:<action>:<process>
1:12345:respawn:/sbin/getty 38400 tty1
2:2345:respawn:/sbin/getty 38400 tty2
3:2345:respawn:/sbin/getty 38400 tty3
4:2345:respawn:/sbin/getty 38400 tty4
5:2345:respawn:/sbin/getty 38400 tty5
6:2345:respawn:/sbin/getty 38400 tty6

# Example how to put a getty on a serial line (for a terminal)
#
#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100

# Example how to put a getty on a modem line.
#
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3

#-- isdnutils begin
# Change the lines below for your local setup and uncomment them.
# Use "init q" to reread inittab.
# look at the vboxgetty / mgetty manpage for more information (mgetty isn't
# standard!)
#
#I0:2345:respawn:/usr/sbin/vboxgetty -d /dev/ttyI0
#I1:2345:respawn:/sbin/mgetty -D -m '"" ATZ OK AT&Eyourmsnhere OK AT&B512 OK' -s 38400 ttyI1
#-- isdnutils end
# Run X Window session from CDROM in runlevel 5
#w5:5:wait:/bin/sleep 2
#x5:5:wait:/etc/init.d/xsession start


My /etc/lilo.conf

vga=791
# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# --------------- `install-mbr(8)', `/usr/share/doc/lilo/',
# and `/usr/share/doc/mbr/'.

# +---------------------------------------------------------------+
# | !! Reminder !! |
# | |
# | Don't forget to run `lilo' after you make changes to this |
# | conffile, `/boot/bootmess.txt', or install a new kernel. The |
# | computer will most likely fail to boot if a kernel-image |
# | post-install script or you don't remember to run `lilo'. |
# | |
# +---------------------------------------------------------------+

# Support LBA for large hard disks.
#
lba32

# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hde
# bios=0x81

#disk=/dev/sda
# bios=0x80

# Specifies the boot device. This is where Lilo installs its boot
# block. It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/hda

# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hda5

# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller. Using `compact' is especially recommended when
# booting from a floppy disk. It is disabled here by default
# because it doesn't always work.
#
# compact

# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=/boot/boot-menu.b

# Specifies the location of the map file
#
map=/boot/map

# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration. If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well. Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000

# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=20

# You can put a customized boot message up if you like. If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress. `single-key' goes with the `alias' lines in the
# `image' configurations below. eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
# message=/boot/bootmess.txt
prompt
timeout=150
# prompt
# single-key
# delay=100
# timeout=100

# Kernel command line options that apply to all installed images go
# here. See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""
append="hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=power-off"

# Boot up Linux by default.
#
default=Linux

image=/boot/vmlinuz-2.4.22-xfs
label=Linux
initrd=/boot/initrd.gz
read-only
# restricted
# alias=1

image=/vmlinuz.old
label=LinuxOLD
read-only
optional
# restricted
# alias=2

# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.
#
# other=/dev/hda4
# label=HURD
# restricted
# alias=3
other=/dev/hda1
label="Windows(hda1)"

My /etc/init.d/apmd:

#!/bin/sh
#
# Start or stop the Advanced Power Management daemon.
#
# Written by Dirk Eddelbuettel <edd@debian.org>
# Greatly modified by Avery Pennarun <apenwarr@debian.org>
#
# I think this script is now free of bashisms.
# Please correct me if I'm wrong!

PATH=/bin:/usr/bin:/sbin:/usr/sbin
APMD_BIN="/usr/sbin/apmd"

[ -s "${APMD_BIN}" ] || exit 0
apm_available || exit 0

[ ! -f /etc/default/rcS ] || . /etc/default/rcS
[ ! -f /etc/default/apmd ] || . /etc/default/apmd

case "${1}" in
("start")
echo -n "Starting advanced power management daemon: "
start-stop-daemon --start --quiet \
--exec "${APMD_BIN}" -- -P /etc/apm/apmd_proxy ${APMD}
case $? in
(0)
echo "apmd."
exit 0
;;
(1)
echo "apmd (already running)."
exit 0
;;
(*)
echo "(failed)."
exit 1
;;
esac
;;
("stop")
echo -n "Stopping advanced power management daemon: "
start-stop-daemon --stop --retry=1 --quiet --oknodo --exec "${APMD_BIN}"
echo "apmd."
exit 0
;;
("restart" | "force-reload")
"${0}" stop
"${0}" start
;;
(*)
echo "Usage: /etc/init.d/apmd {start|stop|restart|force-reload}" >&2
exit 3
;;
esac

todsr1
01-13-2004, 03:21 PM
Is apm enabled in the BIOS?

Stephen
01-13-2004, 05:06 PM
I had a problem with apm where the /etc/modutils/apm file was not correct and the device /dev/misc/apm_bios was missing. I had to change to the /dev/misc/ directory and MAKEDEV apm then make the changes in the file modutils directory run update-modules and in lilo.conf I put apm=on in the append line ran /sbin/lilo then also had to have a kernel without the acpi enabled in it so you may want to try acpi=off in the append line or compile a kernel without it.



>$ cat /etc/modutils/apm
alias char-major-10-134 apm
## Added by me for apm
alias /dev/apm_bios /dev/misc/apm_bios
alias /dev/misc/apm_bios apm
#alias /dev/apm_bios apm
options apm power_off=1


It seems like a strange way (to me anyway) to have the file but that is the only way I could get it to work.

FelixDzerzhinsky
01-13-2004, 06:41 PM
I have got it to go down to run level zero and give me a little message saying power down. At least it doesn't reboot. Ba bit like the days of Win 3.1 and Dos!

I'll try recompiling on the weekend.

Now my priority is to get rid of those offending kde icons and to get my digital camera to work. After that I can wipe my windows partition and use my win98 cd-roms at the pistol range for target practice.

I can use the partition for something useful like running an rpm based linux.