# My system always halts!!!(Possible problem with init script)

## MasterX

No mater what command I run (shutdown, reboot) in the end I will see the line "System is halted" and I have to press alt+Ctrl+del to reboot or the power button to turn the system off. I am using kernel 2.6.7, I have apm enabled and I am running the deamon apmd.

I am despaired here. Please, if you have an idea, if you know something please share it with me. It drives me crazy.

Thank youLast edited by MasterX on Mon Jul 26, 2004 11:11 pm; edited 1 time in total

----------

## geforce

Do you have  ACPI Support enabled.. Well, did you correctly configured it ?

----------

## MasterX

 *geforce wrote:*   

> Do you have  ACPI Support enabled.. Well, did you correctly configured it ?

 

I had and now I have APM. What do you mean by correctly configuring it?

I thought that ACPI has nothing to do with rebooting the system!!

----------

## GatoVolador

I've had a similar problem, and for me compiling apm as a module and having it force autoloaded did the trick. Note that I didn't have to have apmd going. One thing you could check is that the apm module is actually loaded. I suppose apmd would have to force the apm kernel module to load, but as I don't use it, I'm not sure. Try

```
lsmod
```

 to verify that the apm module is loaded before shutting things down.

In short:

1. Make sure you've got apm in the kernel (I use it as a module)

2. if using apm as a module put

```
apm
```

 in the file /etc/modules.autoload.d/kernel-2.x where x corresponds to your kernel version.

3. If still no luck, try stopping apmd before restarting. If it works and you don't need apmd, then

```
rc-update del apmd default
```

Good luck,

Jay

----------

## MasterX

APM is compiled in the kernel. That should work right?

When I compiled kernel with APM support I also started the deamon apmd. I have not tried the case where ampd is not running, but I have APM compiled. I will test that and let you know.

Is it possible that the scripts that take care the reboot/shutdown/halt process are mixed up. I do not know how this can be possible. I remember that I updated the baselayout just to be sure that this is not happening. But, you never know

----------

## Aynjell

The best way to go about things is true ACPI.

Unfortunately there have been a few bugs crawling around in the later kernel revisions. 2.6.5-r1 works perfectly with ACPI ( I have it running now with a ze4630us laptop by HP ), It works like a charm. I recommend scooting back to a 2.6.5-r1, because It is easier to configure and you are not gaining that much with these revisions that you could not just patch yourself...

----------

## Aynjell

The best way to go about things is true ACPI.

Unfortunately there have been a few bugs crawling around in the later kernel revisions. 2.6.5-r1 works perfectly with ACPI ( I have it running now with a ze4630us laptop by HP ), It works like a charm. I recommend scooting back to a 2.6.5-r1, because It is easier to configure and you are not gaining that much with these revisions that you could not just patch yourself...

----------

## MasterX

Aynjell,

Lets say that I compile the kernel with ACPI, what features should I compile? every single one? What about acpid. Does this need to run?

Moreover, do I really need to have ACPI, is not this necessary only for laptops?

----------

## ctford0

First of all what kind of computer are you using?  Is it a newer system that would have acpi (not only for laptops btw...)?  Is it an old AMD K6-2 that only has apm support and/or only emulated acpi?  Check your bios and make sure you have your power management set to apm if you do need to use apm.

If you cant find apm in the bios then you need to turn off apm in the kernel and compile with only acpi support.  You dont have to worry with all the acpi options like button, thermal, blah, blah, just compile acpi and thats it...

chris

----------

## MasterX

 *ctford0 wrote:*   

> First of all what kind of computer are you using?  Is it a newer system that would have acpi (not only for laptops btw...)?  Is it an old AMD K6-2 that only has apm support and/or only emulated acpi?  Check your bios and make sure you have your power management set to apm if you do need to use apm.
> 
> If you cant find apm in the bios then you need to turn off apm in the kernel and compile with only acpi support.  You dont have to worry with all the acpi options like button, thermal, blah, blah, just compile acpi and thats it...
> 
> chris

 

Chris,

my system is pretty new, two years old. A couple of months ago it was working just fine. But, suddenly, it could be the kernel, I can not reboot/poweroff the system. If I remember correctly my bios does not have APM support. So, ACPI is the one I should use. However, when the problem occured I was also using ACPI.So, is ACPI the solution or do I need to do something else.

----------

## Aynjell

When i used knoppix it gave me apm. And my setup probably would have melted had I not felt the blistering hot fumes coming from my systems exhaust ports. So if acpi is what your computer uses yes, else you use apm.

Just make sure you get that in. It is one of the few things that really really matter and yes make sure you read the help files associated with the acpi options they will teach you alot and will help you make your decision wisely...

Just make sure you do not fry your rig!  :Laughing: 

----------

## ctford0

ACPI is one of those things that you either have it or you dont.  So you either have APM (which is old) or ACPI.  I've honestly never had an issue using ACPI and my computer not rebooting.  So if you used ACPI before and it worked then you should also use it now, even though it doesnt seem to be working.

Do you recall anything that might have happened when it stopped working?  Possibly a kernel upgrade?

Like stated perviously in this thread, ACPI in the 2.6 series isn't quite 100%.  So if it worked Ok in the 2.4 series and not in the 2.6 then this could possibly be a reason.

Try this and see what happens.  Run make menuconfig and then disable apm and enable acpi support.  Then exit the kernel config and save it.

Now you want to copy your .config file to somewhere safe...

```

cp .config /root/kern_config

```

Now run make mrproper.  this will clean out all the old stuff.  then copy your kernel config back and run make menuconfig.  exit and save.  then build your kernel.

hope this helps

chris

----------

## MasterX

First of all I do not have a laptop, but a desktop. So, the idea of frying my system is out of the question.

Cris, 

I did what you said, but no luck.

This is what I see (the last three lines) when the system reboots

Deactivating swap                                                          [ok]

System halted

Unmounting filesystems ----> Here the systems freezes and I have to press alt+ctrl+del or the power off button.

So, the filesystems are never unmounted, and this is why when I boot the system I see the "Recovering Journal" line for each partition that I have.

It seems to me that this related to the scripts that are running and not to the kernel.

When I had kernel 2.4.* I did not have any problem, but also when I first installed kernel 2.6.* the system was working fine.

In the BIOS, the only thing that I saw is "ACPI to RAM" which is disabled, but this means that the BIOS supports ACPI

A couple of days ago, I had a problem with dhcpd, it was not releasing the ip address, although it said it was doing so. The solution was to install a newver version of dhcpd. The scripts are in package baselayout, and I have updated this package. So something else is wrong...

----------

## MasterX

I have sysvinit-2.8.5-r1 and baselayout-1.10.1-r1 emerged.

----------

## MasterX

I revert to baselayout-0.93-r4 and I unemerged sysvinit, but it did not help.

As I wrote previously the problem is that the system is halted before the filesystems are unmounted!!!

----------

## ctford0

this is a dumb question, but you are running etc-update right?

----------

## MasterX

 *ctford0 wrote:*   

> this is a dumb question, but you are running etc-update right?

 

yes, I am running etc-update.  Most of the times emerge askes you to run etc-update !!

----------

## ctford0

I didn't mean it as an insult, but I really can't think of anything else to suggest  :Sad: .  Maybe try booting the livecd and see if rebooting works there, if so then it has to be something with your install.

Sorry I can't be of more help.

chris

----------

## MasterX

 *ctford0 wrote:*   

> I didn't mean it as an insult, but I really can't think of anything else to suggest .  Maybe try booting the livecd and see if rebooting works there, if so then it has to be something with your install.
> 
> Sorry I can't be of more help.
> 
> chris

 

Do not worry, I was not offended   :Smile: 

Boot the LiveCD ..... this is a good idea, but I do not understand how this will help me find the problem

----------

## ctford0

 *MasterX wrote:*   

> 
> 
> Do not worry, I was not offended  
> 
> Boot the LiveCD ..... this is a good idea, but I do not understand how this will help me find the problem

 

well, i expect it to work correctly.  basically what this proves is that it is your current gentoo installation and not your system that is at fault.  

i really dont know how to fix your problem to be honest, short of trying to rebuild from a stage 3 or something...  :Sad: 

chris

----------

## MasterX

As it was expected, it reboots just fine from LiveCD.

Since, I used the LiveCD, I checked the filesystems and I did fund some minors errors on the partition table for /var and /tmp, which were fixed. 

But, no, my system wants first to halt and then to umount the filesystems.

Reinstalling Gentoo, from stage 3 won't do any good., because I do not know which package(s) is(are) affected. Since, I have tried to update baselayout, without a success, maybe something else is going on here. 

The possibility of a fresh install, is out of the question. This is Linux, not Windows!!

----------

## MasterX

OK, clearly the problem is with the program Init.

The question is which package do I need to reemerge?

Is it baselayout?

EDIT

I am cursed.... I boot in LiveCD and I updated baselayour, which apparently ovveride the old init, shutdown,reboot files. But that also did not help  :Evil or Very Mad: 

EDIT

----------

