Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 10-02-2003, 03:16 AM   #16
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30

Originally posted by maestro52
Running commands to shut off the computer is in no way an automatic process. I checked my KDE Control Center and the Session Manager in Components is and has already been set to shut off the computer after powering down.
Yes. I understand.. I hope this doesn't sound much like a smart-ass, but how you you shut down your machine otherwise. I wasn't aware of that KDE control panel feature, but I don't know what it does internally either.

At Slackware for example, when I type "halt" (or press a button that does this for me), the system will go to runlevel 0. It will execute /etc/rc.d/rc.0; which shuts down all services, flushes disks, turns off swap space, and last but not least: issues some poweroff / halt command to turn of the PC. I can change that script to execute another command

Originally posted by maestro52
1. I am a and have no idea of what to do with the kernel.
Sorry. I think we got a little too enthusiastic about this suggestion.

But I think you're missing some ACPI support for your mainboard; see acpi sleep states for some more information There are 2 power saving technologies: APM and ACPI. New motherboards seam to use ACPI. Maybe that's why it isn't working anymore.

Here is my kernel compiling guide..

1- download sources
* install the kernel sources of your distro. they will install in /usr/src/linux-version-number. You can also download a .tar.bz2 file at Go to /usr/src/, and extract it with "tar jxf linux-2.4.22.tar.bz2"
* create a symlink from /usr/src/linux-version-number to /usr/src/linux, for example:
ls -s /usr/src/linux-2.4.22 /usr/src/linux

configure it
* if you can find the kernel configuration of your distro (maybe at the source cd??), I'd recommend you use it! be sure you don't forget anything important The file should be copied/saved as /usr/src/linux/.config

* cd /usr/src/linux
* make menuconfig
Navigate through these config menu's, read the help for every option, the help usually gives suggestions too.
Compile drivers as modules (<M>), and other features + file systems as built-in (<*>) You could disable features if you're sure your system doesn't support this. removing built-in features speeds up your system kernel. At the general menu, choose your processor type. (will speed up too) If you want to dive in very deep, use the "dmesg | less" command to see what the kernel has to tell you, and what your system has/uses
* open /usr/src/linux/Makefile in a text editor, and upgrade the revision number, for example "-my1". (or you might overwrite your existing kernel modules)

compile it
* type these commands:
make dep
make clean
make bzImage
make modules

install it
make modules_install
cp /usr/src/linux/arch/i386/boot/bzImage /boot/linux-2.4.22-my1
cp /usr/src/linux/ /boot/

* create the links to
cd /boot
ln -s -f

* You may need to remove first:
* update your boot loader.. (I'll assume it's lilo here)
edit /etc/lilo.conf, add another "image = /boot/linux-2.4.22-my1" line, etc..
* run lilo, and reboot.

* backup your .config: cp /usr/src/linux/.config /boot/config-2.4.22-my1.
* clean up compiler objects:
cd /usr/src/linux
make clean
make mrproper


Originally posted by maestro52
[...] my ASRock K7VM2 was made SPECIFICALLY for Windows XP and some functions that are programmed into it for Windows most certainly do not work. So I am wondering if that may have somehow screwed the automatic shutoff.
That's a pitty. Linux supports a lot, but there are windows specific modems, printers, you should try to avoid. However, I'm not sure what could be specific to Windows XP on your mainboard. I think it's the APM vs ACPI thing, I've described above.
Old 10-02-2003, 03:49 AM   #17
LQ Newbie
Registered: Mar 2003
Distribution: Gentoo
Posts: 18

Rep: Reputation: 0
Are you using SMP by any chance or does your mobo support HyperThreading?
Old 10-02-2003, 04:18 AM   #18
Registered: Aug 2003
Location: Texas
Distribution: Fedora 9
Posts: 177

Original Poster
Rep: Reputation: 30
Smile THANK YOU VERY MUCH yapp! One more question perhaps?

I will respond to zebbedi first; I do not have any idea what SMP is and also do not know anything about HyperThreading? You would have to help me with understanding those things to be able to tell you if I have them and such.

Now yapp!
Excellent!! Just what I think I need. Of course, I will copy the original just in case I transpose something incorectly or if you forgot something in the instructions.

However, being a I have screwed my linux a few times before because I did things without asking for guidance. So to, cover my arse (so to speak), In case I somehow screw up the boot process and I am not able to get beyond the log in, which has happened in the past, can you tell me how I use command line instructions to remove the faulty kernel and put back the one I saved? Or since you said I should change the name of the kernel I compile, will that automatically leave the original and just create another one with the name I gave it? I undersand that if that were to occur there would be more kernels listed on the boot menu and that would automatically give me another kernel choice if mine fails. Is my thought correct? In any case I really would like to know how to manipulate/work with the linux files directly through commands since I truly believe I wil screw things again somewhere along the way.

A happier, but still curious Thank You Again!

Last edited by maestro52; 10-02-2003 at 04:27 AM.
Old 10-02-2003, 04:59 AM   #19
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
hehe thanks for your response.

Yes, you can run add multiple kernels to your boot menu. Slackware uses lilo, but redhat seams to use Grub.. For lilo, open the /etc/lilo.conf file, and you'll see one, or multiple, "image = " sections. Copy-paste, and change the name and label Run "lilo" to install the changes in the boot-sector. If your disto uses grub, you'll need to change the grub configuration file off course Maybe your distribution even has a graphical tool for this.

The reason I'd suggested to change the revision-version in /usr/src/linux/Makefile, is because "make modules_install" will install the modules in /lib/modules/kernel-verion-rev/ You don't want to overwrite those files

Kernel modules are some sort of drivers. You can load, and unload them. You can compile as many modules as you want, only built-in features cause the kernel to become big.

Instead of a default "make install", I copy that bzImage, and manually; for the same reason: it doesn't overwrite /boot/vmlinuz

A simple command line text editor is "pico", it works like the MS-Dos Edit. Use Ctrl+O to write a file. (shortcuts are displayed below). I use "vim" to edit my files, but that's not an editor I'd recommend to newbies. If you're used to it, you'll notice you can edit files a lot easier (and vim has syntax highlighting)

If you really mess up your Linux bootloader, make sure you have a rescue disk. You can use it to load/boot Linux. Loading Linux simply means; getting the kernel in the memory, and start it. Whether you use a floppy-disk, lilo at boot, or loadlin.exe for this doesn't really matter.

You could create a backup of *all* your kernel files first:
* tar zcvf kernel-backup.tar.gz /boot /lib/modules
restore this with:
cd /
tar zxvf <location of .tar.gz file>

To see what modules your machine has loaded:
* lsmod
To see what kernel you've loaded:
* cat /proc/version
See kernel boot messages:
* dmesg | less

...all these things require root permissions.
Old 10-03-2003, 06:16 PM   #20
LQ Newbie
Registered: Sep 2003
Location: France, Holland, UK, depends on my mood ;)
Distribution: Debian (Woody)
Posts: 2

Rep: Reputation: 0
Originally posted by yapp
what is modconf.. just curious.
From the manpage:

modconf is a script for installing kernel modules on Linux.
It exists solely on Debian, AFAIK, and it's damned useful if you want to save yourself a lot of kernel recompilation. I had the same problem as the OP when I first installed Debian, but after a bit of Googling around I discovered that all I needed to do was to run modconf (as root, of course), scroll down to kernel/arch/i386/kernel, select and install apm, and that was it -- next time I issued a "shutdown -h now", my PC powered itself off automatically, as if by some sort of voodoo magic!

Last edited by disaffected; 10-03-2003 at 06:23 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
turn off linux /shutdown computer xprometeus Linux - General 9 09-25-2010 02:18 PM
How do I turn off my computer? DDRfreak2 Mandriva 9 09-12-2005 07:41 PM
turn off computer spidna Slackware 2 08-12-2004 12:18 PM
How to turn off computer ginnytwo Linux - Software 10 07-27-2004 01:13 AM
Getting linux to turn off my computer ChimpFace9000 Linux - General 5 02-03-2003 09:00 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration