New IT forum
11 August 2022, 06:07:24 pm *
Welcome, %1$s. Please login or register.

: GertDuino now in stock.
 
Pages: [1]

Author Topic: "Unable to System halted"  (Read 6141 times)

alfon

  • Newbie
  • *
  • Posts: 28
"Unable to System halted"
« on: 25 February 2010, 09:12:12 pm »

I am still new to plugs. After playing a little with my new e-sata plug, I managed to brick it - something that apparently is a necessary step in the learning process. Anyway, I reinstalled ubuntu with the help of the installer, and everything seems to be fine, with one exception. When I try to shut down, I get the following:

Quote
[email protected]:~# halt

Broadcast message from [email protected]
        (/dev/ttyS0) at 18:17 ...

The system is going down for halt NOW!
 * Saving the system clock
 * Asking all remaining processes to terminate...                        [ OK ]
 * All processes ended within 2 seconds....                              [ OK ]
 * Deconfiguring network interfaces...                                   [ OK ]
 * Deactivating swap...                                                  [ OK ]
 * Stopping remaining crypto disks...                                    [ OK ]
 * Stopping early crypto disks...                                        [ OK ]
 * Will now halt
halt: Unable to System halted.
iterate IDE devices: No such file or directory


I assume that the system is attempting to write:
Quote
halt: Unable to iterate IDE devices: No such file or directory.
System halted.
but somehow the "system halted" part comes before the previous message is completely printed.

My questions are:
- Does anyone know the explanation for the messages at the end?
- Is there a fix?
- Most important: Should I consider this a safe shutdown?

Additional info:
The only thing that I did differently than the standard procedure, is that I used a USB hard disk (IDE) instead of the usb memory stick with the installer. Now this message appears regardless of whether the USB hard disk is connected or not.

Best regards,
Alf
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: "Unable to System halted"
« Reply #1 on: 25 February 2010, 10:07:14 pm »

The shutdown message is normal ... I think you can consider it "safe".

If you want, you could issue a reboot or shutdown now -r, and then interrupt U-Boot on the way back up.
Logged

alfon

  • Newbie
  • *
  • Posts: 28
Re: "Unable to System halted"
« Reply #2 on: 27 February 2010, 09:14:25 pm »

Dear Markus,

The shutdown message is normal ... I think you can consider it "safe".

If you want, you could issue a reboot or shutdown now -r, and then interrupt U-Boot on the way back up.


Thanks for the quick and reassuring reply :-)

I did some further research, which aside from confirming what you wrote, provided some explanation for theis annoying message, as well as a way to get rid of it.

To summarise, it seems that from some version onward, the linux kernel automatically flushes the write cache before poweroff, and shuts down the disk subsystems - but this is a relatively recent change. Before that, in order for disk caches to be safely cached, /etc/init.d/halt passed the -h argument ("Put all harddrives on the system in standby mode just before halt or poweroff.") to halt. Nowadays, the kernel does this on its own, and the -h argument causes the offending message to appear (either because the disk subsystem is already down by the time this arg is processed, or because IDE devices are no longer seen as such, but as SCSI ones - I 'm not sure which one).

However Ubuntu, unlike newer versions of Debian) still passes the (no longer needed) -h argument to halt in /etc/init.d/halt .
The solution, therefore, is to edit /etc/init.d/halt :
Quote
sudo nano /etc/init.d/halt

and comment out the following lines: (only the first would do, but the others are also pointless)
Quote
#       hddown="-h"
#       if grep -qs '^md.*active' /proc/mdstat
#       then
#               hddown=""
#       fi

Best regards,
Alf

References:
- https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/92685
- https://bugs.launchpad.net/ubuntu/+source/linux/+bug/193125
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: "Unable to System halted"
« Reply #3 on: 28 February 2010, 10:16:10 am »

Thank you for the research and update.
Logged
Pages: [1]
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!