LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-01-2004, 07:21 AM   #1
esi-eric
Member
 
Registered: May 2004
Location: Florida
Distribution: 7.2
Posts: 32

Rep: Reputation: 15
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.
 
Old 07-02-2004, 08:38 PM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
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
 
Old 07-06-2004, 07:25 AM   #3
esi-eric
Member
 
Registered: May 2004
Location: Florida
Distribution: 7.2
Posts: 32

Original Poster
Rep: Reputation: 15
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.
 
Old 07-06-2004, 12:31 PM   #4
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
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
 
Old 07-06-2004, 02:10 PM   #5
esi-eric
Member
 
Registered: May 2004
Location: Florida
Distribution: 7.2
Posts: 32

Original Poster
Rep: Reputation: 15
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.
 
Old 07-06-2004, 02:13 PM   #6
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
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
 
Old 07-06-2004, 02:17 PM   #7
esi-eric
Member
 
Registered: May 2004
Location: Florida
Distribution: 7.2
Posts: 32

Original Poster
Rep: Reputation: 15
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!
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
permissions reset on reboot trempel Fedora 11 08-18-2005 02:24 AM
Performing an action every reboot Zaulden Linux - Laptop and Netbook 9 08-03-2005 05:28 PM
won't boot or reboot without reset dcfnef Linux - General 4 04-04-2005 05:33 AM
Settings get reset on reboot xymian Debian 3 02-23-2005 04:53 AM
Linux software reset to cause x86 board to reboot esi-eric Linux - General 4 07-01-2004 09:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:56 PM.

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