Re: debian is neat but how do I turn the computer off?
indeed, booting with append= apm=on nls_cp950 nls_cp437 causes the second line not to appear in /var/log/messages anymore: Jun 14 09:10:51 debian kernel: apm: BIOS version 1.2 Flags 0x07 (Driver version 1.13) Jun 14 09:10:51 debian kernel: apm: disabled on user request. and allows shutdown -h now to really poweroff the whole computer. However, no matter how I inquire to the kernel, e.g. lsmod, it doesn't mention apm. Also my futile attempt to load those two code pages doesn't get any mention of success or failure in /var/log/*. I was trying to read Chinese vfat filenames. Also dmesg is not in the log rotation scheme, why? -- http://jidanni.org/ Taiwan(04)25854780 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian is neat but how do I turn the computer off?
On Sat, Jun 15, 2002 at 02:56:33PM +0800, Dan Jacobson wrote: | indeed, booting with append= apm=on nls_cp950 nls_cp437 ^^^ I don't think any part of the kernel will actually do anything with those arguments. | and allows shutdown -h now to really poweroff the whole computer. Good. | However, no matter how I inquire to the kernel, e.g. lsmod, it doesn't | mention apm. $ cat /proc/apm lsmod isn't going to list stuff that isn't a module. The debian-packaged 2.2 kernels have apm built-in, not as a module. (I presume you're using kernel 2.2.20. Is that right?) | Also my futile attempt to load those two code pages doesn't get any | mention of success or failure in /var/log/*. I was trying to read | Chinese vfat filenames. How about including the commands you've tried and their output here? I can't give a success example because I'm using a custom-built kernel that doesn't have those modules. I just installed the kernel-image-2.2.20 package so I could see, /lib/modules/2.2.20/fs/nls_cp950.o is right there. Simply running 'modprobe nls_cp950' will load the module. | Also dmesg is not in the log rotation scheme, why? Probably so you can still see the boot log in 3 months or so. It's not going to get bigger because you haven't been rebooting :-). The file /var/log/dmesg gets overwritten each time you boot. HTH, -D -- 640K ought to be enough for anybody -Bill Gates, 1981 http://dman.ddts.net/~dman/ pgpmfwuX6CDMf.pgp Description: PGP signature
Re: debian is neat but how do I turn the computer off?
On 15 Jun 2002, Dan Jacobson wrote: However, no matter how I inquire to the kernel, e.g. lsmod, it doesn't mention apm. That's presumably because apm is compiled into the kernel and is not a module. Patrick -- Patrick Wiseman [EMAIL PROTECTED] Linux user #17943 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian is neat but how do I turn the computer off?
On Fri, 2002-06-14 at 11:51, Derrick 'dman' Hudson wrote: On Fri, Jun 14, 2002 at 10:39:54AM +1000, James Cameron wrote: | (b) how to make this change to /etc/inittab as a package to be installed | on multiple machines? One character difference. It doesn't look like inittab is in any package, so I don't know the best way to automatically change it on multiple systems. The package I have made (which also adds a graphical shutdown image using zgv) does this in the post-installation script ... # change control/alt/delete sequence to halt rather than reboot sed 's/shutdown -t1 -a -r now/shutdown -t1 -a -h now/' \ /etc/inittab /etc/inittab.dpkg.lenny-shutdown mv /etc/inittab /etc/inittab.pre-lenny-shutdown mv /etc/inittab.dpkg.lenny-shutdown /etc/inittab telinit q But I was hoping to find a more elegant solution. ;-) -- James Cameron ([EMAIL PROTECTED]) http://quozl.linux.org.au/ (or) http://quozl.netrek.org/ signature.asc Description: This is a digitally signed message part
Re: debian is neat but how do I turn the computer off?
On Fri, Jun 14, 2002 at 02:59:24PM +1000, James Cameron wrote: | On Fri, 2002-06-14 at 11:51, Derrick 'dman' Hudson wrote: | On Fri, Jun 14, 2002 at 10:39:54AM +1000, James Cameron wrote: | | (b) how to make this change to /etc/inittab as a package to be installed | | on multiple machines? | One character difference. It doesn't look like inittab is in any | package, so I don't know the best way to automatically change it on | multiple systems. | | The package I have made (which also adds a graphical shutdown image | using zgv) does this in the post-installation script ... | | # change control/alt/delete sequence to halt rather than reboot | sed 's/shutdown -t1 -a -r now/shutdown -t1 -a -h now/' \ | /etc/inittab /etc/inittab.dpkg.lenny-shutdown | mv /etc/inittab /etc/inittab.pre-lenny-shutdown | mv /etc/inittab.dpkg.lenny-shutdown /etc/inittab | telinit q | | But I was hoping to find a more elegant solution. ;-) That's how you edit files from the shell :-). If you try this : sed 'sed script' file file you'll end up with either 1) an error from the shell, if 'noclobber' is set 2) a clobbered file, because the open for writing is done before the data is read Thus a temp file is needed for the redirection to work as intended. -D -- I tell you the truth, everyone who sins is a slave to sin. Now a slave has no permanent place in the family, but a son belongs to it forever. So if the Son sets you free, you will be free indeed. John 8:34-36 http://dman.ddts.net/~dman/ pgpqi9zdHp2XI.pgp Description: PGP signature
Re: debian is neat but how do I turn the computer off?
On Fri, Jun 14, 2002 at 11:15:31AM -0500, Derrick 'dman' Hudson wrote: On Fri, Jun 14, 2002 at 02:59:24PM +1000, James Cameron wrote: | The package I have made (which also adds a graphical shutdown image | using zgv) does this in the post-installation script ... | | # change control/alt/delete sequence to halt rather than reboot | sed 's/shutdown -t1 -a -r now/shutdown -t1 -a -h now/' \ | /etc/inittab /etc/inittab.dpkg.lenny-shutdown | mv /etc/inittab /etc/inittab.pre-lenny-shutdown | mv /etc/inittab.dpkg.lenny-shutdown /etc/inittab | telinit q | | But I was hoping to find a more elegant solution. ;-) That's how you edit files from the shell :-). If you try this : sed 'sed script' file file you'll end up with either 1) an error from the shell, if 'noclobber' is set 2) a clobbered file, because the open for writing is done before the data is read Thus a temp file is needed for the redirection to work as intended. You can get around this using perl's -i switch: perl -pi -e 's/shutdown -t1 -a -r now/shutdown -t1 -a -h now/' /etc/inittab telinit q (Or -i.pre-lenny-shutdown if you want to keep a backup as above.) -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian is neat but how do I turn the computer off?
C == Chris Kenrick [EMAIL PROTECTED] writes: C On Thu, Jun 13, 2002 at 08:12:35AM +0800, Dan Jacobson wrote: poweroff just does the same as shutdown -h now for me: turns off the disks only. On mandrake 7.2 however, shutdown -h now does indeed turn off the whole computer, cold, quiet. So what have I not adjusted? C You need to turn on APM support in the kernel. Presuming you are using C LILO as your bootloader, adding C append = apm = on C to /etc/lilo.conf should do the trick. append = apm=on indeed seems to work, at least at a boot prompt trial [I don't tire the disks by testing more than once a day] Anyways, why then do I still see Jun 14 09:10:51 debian kernel: apm: BIOS version 1.2 Flags 0x07 (Driver version 1.13) Jun 14 09:10:51 debian kernel: apm: disabled on user request. in the logs. Where is it getting turned off? Why isn't me turning it back on mentioned? By the way, of the other experiments: insmod: apm: no module by that name found I sure don't understand linux modules. It cannot be found, but one can turn it on at the boot prompt. So I even did installed powermgmt-base, because I think there were some apm words in there... zanier and zanier... coocoo By the way, to read Chinese file names from vfat disks, on mandrake one can see lsmod: nls_cp950 98064 2 (autoclean) nls_cp437 3952 2 (autoclean) whereas on debian I search low and high for anything with 950 in its name... no go. Is this another item for lilo append? Only then can I use them as fstab options? -- http://jidanni.org/ Taiwan(04)25854780 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian is neat but how do I turn the computer off?
On Sat, Jun 15, 2002 at 04:34:29AM +0800, Dan Jacobson wrote: | By the way, of the other experiments: | insmod: apm: no module by that name found | I sure don't understand linux modules. It cannot be found, but one | can turn it on at the boot prompt. In the pre-packaged 2.2 kernels it is built-in instead of a module. In the pre-paackaged 2.4 kernels it is a module and you'll need to load it with an entry in /etc/modules. | By the way, to read Chinese file names from vfat disks, on mandrake | one can see lsmod: | nls_cp950 98064 2 (autoclean) | nls_cp437 3952 2 (autoclean) | whereas on debian I search low and high for anything with 950 in its | name... no go. I don't have a 2.2 kernel anymore, but looking in the 2.4 config : $ grep 950 /boot/config-2.4.18-386 CONFIG_NLS_CODEPAGE_950=m it is included as a module. $ locate 950 | grep ^/lib/modules /lib/modules/2.4.18-386/kernel/fs/nls/nls_cp950.o At least with the pre-packaged 2.4 kernel you can simply 'modprobe nls_cp950'. 2.2 is soo last-year. 2.4 is this-year. ;-) -D -- ...the word HACK is used as a verb to indicate a massive amount of nerd-like effort. -Harley Hahn, A Student's Guide to Unix http://dman.ddts.net/~dman/ pgp29S2IIeGAG.pgp Description: PGP signature
Re: debian is neat but how do I turn the computer off?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sat, Jun 15, 2002 at 04:34:29AM +0800, Dan Jacobson wrote: By the way, of the other experiments: insmod: apm: no module by that name found I sure don't understand linux modules. It cannot be found, but one can turn it on at the boot prompt. OK, APM is compiled into the kernel and not as a module. So I even did installed powermgmt-base, because I think there were some apm words in there... zanier and zanier... coocoo powermgmt-base isn't necissary to power off. I've never even heard of that package before. - -- Baloo -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9CqlqNtWkM9Ny9xURAoNJAJ0Vk2yil1ud3jo7YqI9BH5aujQehQCfZ8fH V+eEkXWEIPhqtJrGiQluPuw= =mz3D -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian is neat but how do I turn the computer off?
On Thu, Jun 13, 2002 at 08:12:35AM +0800, Dan Jacobson wrote: poweroff just does the same as shutdown -h now for me: turns off the disks only. On mandrake 7.2 however, shutdown -h now does indeed turn off the whole computer, cold, quiet. So what have I not adjusted? You need to turn on APM support in the kernel. Presuming you are using LILO as your bootloader, adding append = apm = on to /etc/lilo.conf should do the trick. If you're running GRUB, add apm=on to the parameters of the kernel line in /etc/grub.conf - Chris -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian is neat but how do I turn the computer off?
On Thu, Jun 13, 2002 at 08:12:35AM +0800, Dan Jacobson wrote: You want to turn the computer *off*!? OFF!? Why in the world would you want to do such a thing? ;-) | poweroff just does the same as shutdown -h now for me: turns off the | disks only. On mandrake 7.2 however, shutdown -h now does indeed | turn off the whole computer, cold, quiet. So what have I not | adjusted? You probably don't have apm enabled. It is not enabled by default because some systems (that debian supports, mainly older ones) don't support apm. In your bootloader config, add apm=on to the end of the kernel command line. (in lilo that's part of an append= line, in grub just stick it at the end of the kernel line) | By the way, on mandrake when we do shutdown -h now, we see a | comforting sequence of messages about this and that being turned off | one by one, Debian shows that too as the system shuts down. | Indeed all the documentation I read about how to use debian never | mentions what happens one day when you (the nerve!) want to turn the | computer off. I've never used 'poweroff'. I've always used '/sbin/halt'. (which I think is also equivalent to 'shutdown -h now') Even when I used RH I used 'halt' (IIRC) but not poweroff. If you don't have apm enabled, you should still be able to run '/sbin/halt' and see the system shut down to the point where it says System halted though it won't actually shut off. If you have apm enabled (and your BIOS supports it) the system should shut itself off at that point. Also, the default inittab has Ctrl-Alt-Del mapped to reboot the system. You can always use that to try and reboot. (I remapped it to shutdown on my systems because I wanted to) HTH, -D -- Pride goes before destruction, a haughty spirit before a fall. Proverbs 16:18 http://dman.ddts.net/~dman/ pgprxQPs41TNw.pgp Description: PGP signature
Re: debian is neat but how do I turn the computer off?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, Jun 13, 2002 at 08:12:35AM +0800, Dan Jacobson wrote: poweroff just does the same as shutdown -h now for me: turns off the disks only. On mandrake 7.2 however, shutdown -h now does indeed turn off the whole computer, cold, quiet. So what have I not adjusted? I can't remember if Debian's default kernel has an apm module or not but you can find out. If you type insmod apm as root, you should get some form of brief happy success message. If this works, add apm to the end of /etc/modules. By the way, on mandrake when we do shutdown -h now, we see a comforting sequence of messages about this and that being turned off one by one, however with debian's poweroff we see one or two messages --- we don't even know if it has properly turned everything off in sequence or did we use some emergency stop command for use in case of fire only. Strange, on my Debian system it shows everything shutting down...you sure you were looking at the correct tty? Plus, after it says system halted, you could always just push (or hold) the power button on the case...that should work, too... APM isn't enabled by default because it's not a reasonable expectation that every machine Debian will be installed on will have APM support; this is a feature, not a bug. - -- Baloo -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9CDGGNtWkM9Ny9xURAo0eAKCOcc0MW9VLbWLA634lUJGobqL71QCfU0hW 0gaPsaGUAxqi7UUySXRbtTI= =Uumc -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian is neat but how do I turn the computer off?
Everyone has been recommending APM for this, but my motherboard (Abit VP6) wouldn't turn the power supply off until I turned on ACPI in the kernel. Check up on this as well as APM. ps - I heard that APM is turned off in the presence of SMP, so that may have been the reason. -- Nick On Thu, Jun 13, 2002 at 08:12:35AM +0800, Dan Jacobson wrote: poweroff just does the same as shutdown -h now for me: turns off the disks only. On mandrake 7.2 however, shutdown -h now does indeed turn off the whole computer, cold, quiet. So what have I not adjusted? By the way, on mandrake when we do shutdown -h now, we see a comforting sequence of messages about this and that being turned off one by one, however with debian's poweroff we see one or two messages --- we don't even know if it has properly turned everything off in sequence or did we use some emergency stop command for use in case of fire only. Indeed all the documentation I read about how to use debian never mentions what happens one day when you (the nerve!) want to turn the computer off. By the way the poweroff man page is a real winner with all the options that only apply to some of the commands, and the different behaviors depending on run level, for such a serious command. -- http://jidanni.org/ Taiwan(04)25854780 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian is neat but how do I turn the computer off?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, Jun 13, 2002 at 04:51:02AM -0500, Nick Traxler wrote: Everyone has been recommending APM for this, but my motherboard (Abit VP6) wouldn't turn the power supply off until I turned on ACPI in the kernel. Check up on this as well as APM. Depends on the board. Some use that [weird] ACPI standard instead of APM like the rest of the world. ps - I heard that APM is turned off in the presence of SMP, so that may have been the reason. I coulda sworn it could still kill power for it on SMP systems... - -- Baloo -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9CSKVNtWkM9Ny9xURAu64AKCevbtr1FVLTisidwKT87AGh34VKgCfaLlj QPcf6KxUe9sNwo9ofzDs/9Q= =EZbM -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian is neat but how do I turn the computer off?
On Thu, Jun 13, 2002 at 03:54:13PM -0700, Paul Johnson wrote: | -BEGIN PGP SIGNED MESSAGE- | Hash: SHA1 | | On Thu, Jun 13, 2002 at 04:51:02AM -0500, Nick Traxler wrote: | Everyone has been recommending APM for this, but my motherboard (Abit | VP6) wouldn't turn the power supply off until I turned on ACPI in the | kernel. Check up on this as well as APM. | | Depends on the board. Some use that [weird] ACPI standard instead of | APM like the rest of the world. ACPI is new and less complete/mature (at least in linux). APM is older, many buggy/limited BIOS implementations exist, and is more mature (in linux at least). Either one should be able to power off your machine, if your BIOS supports them. (ACPI puts more control in the OS hands whereas APM requires the BIOS manuf. to get it right) | ps - I heard that APM is turned off in the presence of SMP, so that may | have been the reason. | | I coulda sworn it could still kill power for it on SMP systems... It can, if you override the defualts just right. I have no SMP systems, so I don't remember the incantation. The reason APM is usually disabled is due to potential race conditions or conflicts between the 2 CPUs (eg one wants off, the other isn't done). -D -- Religion that God our Father accepts as pure and faultless is this: to look after orphans and widows in their distress and to keep oneself from being polluted by the world. James 1:27 http://dman.ddts.net/~dman/ pgpQpeb0Zl1h4.pgp Description: PGP signature
Re: debian is neat but how do I turn the computer off?
ps - I heard that APM is turned off in the presence of SMP, so that may have been the reason. I coulda sworn it could still kill power for it on SMP systems... /usr/src/kernel-source-2.4.18/Documentation/Configuration.help, line 115: Symmetric Multi-Processing support CONFIG_SMP snip The Advanced Power Management code will be disabled if you say Y here. and still SMP is enabled by default in kernel-source-2.4.18.deb (for which I have just filed a bug) greetz, Joris -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian is neat but how do I turn the computer off?
* Paul Johnson ([EMAIL PROTECTED]) [020613 15:54]: On Thu, Jun 13, 2002 at 04:51:02AM -0500, Nick Traxler wrote: Everyone has been recommending APM for this, but my motherboard (Abit VP6) wouldn't turn the power supply off until I turned on ACPI in the kernel. Check up on this as well as APM. Depends on the board. Some use that [weird] ACPI standard instead of APM like the rest of the world. Weird or no, it's pretty nice when you have it set up right. Just press the power button, and it shuts everything down cleanly and powers down. Can APM do that? (that's a legitimate question, not a smarmy nah-nah remark.) If your board supports it, I'd recommend enabling ACPI in the kernel and installing acpid to get that working. good times, Vineet -- Currently seeking opportunities in the SF Bay Area Please see http://www.doorstop.net/resume.shtml pgpt9FySVxhdj.pgp Description: PGP signature
Re: debian is neat but how do I turn the computer off?
On Thu, 2002-06-13 at 14:53, Derrick 'dman' Hudson wrote: Also, the default inittab has Ctrl-Alt-Del mapped to reboot the system. You can always use that to try and reboot. (I remapped it to shutdown on my systems because I wanted to) (a) how to make this work even in X, (b) how to make this change to /etc/inittab as a package to be installed on multiple machines? -- James Cameron ([EMAIL PROTECTED]) http://quozl.linux.org.au/ (or) http://quozl.netrek.org/ signature.asc Description: This is a digitally signed message part
Re: debian is neat but how do I turn the computer off?
On Fri, Jun 14, 2002 at 10:39:54AM +1000, James Cameron wrote: | On Thu, 2002-06-13 at 14:53, Derrick 'dman' Hudson wrote: | Also, the default inittab has Ctrl-Alt-Del mapped to reboot the | system. You can always use that to try and reboot. (I remapped it to | shutdown on my systems because I wanted to) | | (a) how to make this work even in X, It does ... I think (but I'm not testing it right now -- I'm using the machine :-). | (b) how to make this change to /etc/inittab as a package to be installed | on multiple machines? The change is as follows : --- inittab.origThu Jun 13 20:47:58 2002 +++ inittab Thu Jun 13 20:47:48 2002 @@ -30,7 +30,7 @@ z6:6:respawn:/sbin/sulogin # What to do when CTRL-ALT-DEL is pressed. -ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now +ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now # Action on special keypress (ALT-UpArrow). kb::kbrequest:/bin/echo Keyboard Request--edit /etc/inittab to let this work. One character difference. It doesn't look like inittab is in any package, so I don't know the best way to automatically change it on multiple systems. every -D -- Microsoft encrypts your Windows NT password when stored on a Windows CE device. But if you look carefully at their encryption algorithm, they simply XOR the password with susageP, Pegasus spelled backwards. Pegasus is the code name of Windows CE. This is so pathetic it's staggering. http://www.cegadgets.com/artsusageP.htm http://dman.ddts.net/~dman/ pgpROCXG4MbUZ.pgp Description: PGP signature