LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Performing a Software Reset from Linux 7.2 to cause a reboot of the x86 processor (https://www.linuxquestions.org/questions/linux-hardware-18/performing-a-software-reset-from-linux-7-2-to-cause-a-reboot-of-the-x86-processor-199863/)

esi-eric 07-01-2004 07:21 AM

Performing a Software Reset from Linux 7.2 to cause a reboot of the x86 processor
 
I am running Redhat Linux 7.2 and I am interested in performing a software reset from within Linux so that the hardware reboots after performing the reset. I have found various solutions to this problem on the web, but none have seemed to work! If you have a solution to my problem, your input would be greatly appreciated! Thank you very much!

Eric.

finegan 07-02-2004 08:38 PM

Rather old disro, you're looking to load the module apm.o, that'll allow for a bios real-mode power off call.

/sbin/modprobe apm

Cheers,

Finegan

esi-eric 07-06-2004 07:25 AM

Finegan,

Thank you so very much for the reply to my post!

I tried "/sbin/modprobe apm" and I got the following error message "Can't locate module module apm". I even tried "/sbin/modprobe /usr/bin/apm" and I got the following response: "modprobe: can't locate module /usr/bin/apm". What am I doing wrong Finegan??? And, once I have this going on the command line, how do I incorporate this functionality into my "C" code??? Your assistance is greatly appreciated!!! Thank you so very much!

Eric.

finegan 07-06-2004 12:31 PM

Apm is a program and a kernel module, its a driver, Advanced Power Management. It was replaced with a standard know as ACPI, but the Linux kernel didn't support that until 2.4.20-ish, and RedHat never released on it... no matter, acpi is useful for laptops, apm is simple bios interaction.

apmd is the daemon that goes along with it that can control various aspects of power management. Offhand its usually /usr/sbin/apmd

Apm might have been built into your kernel, but RH might have just not compiled in the necessary aspect for real mode power off, there are a bunch of options for apm in the kernel compile. Let's see if they compiled apm directly into the kernel:

dmesg | grep apm

Should pop back something like:

root@sidearm:~# dmesg | grep apm
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16)

If it returns nothing... and there's no module. I'm a bit perplexed because I remember the old rh7.2 kernel had it, I ran that distro once for a little while on a laptop... or maybe it didn't, huh.

You could compile a new kernel, but all of that work for apm and real mode power off is a bit much, if you want to jump into kernel compiles, its worth it more if you're just wanting to learn about kernel compiling. Of course, RH7.2 is very very old now, not the best learning platform really.

Cheers,

Finegan

esi-eric 07-06-2004 02:10 PM

Finegan,

I did what you said and I received the following result....

dmesg | grep apm


root@ESI:# dmesg | grep apm
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.14)

Very similar to what you told me it should look like.

But, I still try and try your command (I tried "/sbin/modprobe apm" and I got the following error message "Can't locate module module apm".) I get the same error message despite the fact that the module is there and loaded!!!!

By the way, how do you implement this in C ????

Thank you very much for all of your time and consideration!

Eric.

finegan 07-06-2004 02:13 PM

The module isn't there because its compiled directly in, but apparently without the option that allows for soft reset or halt... its a kernel recompile if you're up for it.

Implement what in C? The code necessary to do the reset is in the kernel, its just RH didn't compile it in...

Cheers,

Finegan

esi-eric 07-06-2004 02:17 PM

Well, I absolutely have to be able to perform the software reset in C! It is a requirment of the project I am working on!


All times are GMT -5. The time now is 05:12 PM.