Raspberry Pi B+ with no monitor and no remote desktop - how to see if shutdown is complete?

Hello,

I have a Raspberry PI B+ with raspbian installed.

I intend to use it as a server without any monitor/display /keyboard/mouse attached.

There are tutorials out there describing how to solder circuits so that one can attach a "shutdown-button" via GPIO-interface.

So - without display and without keyboard - one could press the shutdown-button for safely shutting down the system before removing the raspberry from the electrical grid.

My question is:

When a shutdown is initiated - how do you see when that shutdown is complete in case there is no monitor/ display attached to the Raspberry Pi B+?

Can you deduce something from the way in which the two LEDs blink?

Sincerely

Timo

Reply to
Timo
Loading thread data ...

The ACT LED will blink ten times in a steady pattern before going out. That is when it is safe to remove power.

Reply to
Dom

Well, I've got one that I just switch on/off like a pocket calculator, or the kitchen light: at least 50 times a week.

It's battery-powered to play TextToSpeech sound files; and the only control is the on-off-power-switch; which also allows me to sort-control the playing, depending IN which of 3 playing-states I chose to switch-off.

  1. during play=don't play in next cycle;
  2. during a prompt after the play=don't play again & mark for deletion;
  3. during the prompt after 2,=leave the FileName unchanged, so as to again be at the queue-head, for the next powered cycle.

As regards powering-down in a disciplined way, like landing an aircraft: if you drop a banana, does it break?

Reply to
Unknown

Pilots' credo. "Any landing you can walk away from is a good landing. Any landing where you can fly the plane again is a great landing."

Reply to
JimR

LOL

Reminds me of a cabin announcement I heard on a Southwest Airlines flight: "This plane is equipped to land on water. However, it can do so only once..."

--
-michael - NadaNet 3.1 and AppleCrate II: http://home.comcast.net/~mjmahon
Reply to
Michael J. Mahon

Surely the easiest way is to ssh into the RPi and do:-

shutdown -h now

--
Chris Green
Reply to
cl

With the old model the ethernet link status goes off when the interface has shut down. This does not help when you use a USB WiFi dongle as the link status is always off, but when you are luck the WiFI dongle has another status light.

During shutdown, those indicators turn off quite late in the shutdown sequence, it should be safe to power off a few seconds later.

I have no B+ so I don't know if it still has the LNK LED. It may be integrated with the RJ45 connector.

Reply to
Rob
[...]

When I use PuTTY for shutting down, I don't see when the shutdown is complete - at some stage during the course of actions initiated by the shutdown-command, the ssh-client (PuTTY) displays the message "Server unexpectedly closed network connection" .

Well -- with "sudo shutdown -h now" it's not that unexpected. But via ssh I don't see when the shutdown is complete.

When using xming or xrdp, I also don't see when the shutdown is complete: I can't see what's still going on on the raspberry pi when the remote-connections are down...

Sincerely,

Timo

Reply to
Timo

As has been noted, the ACT (or OK in older models) LED blinks 10 times at halt time. Another way is to monitor the serial port Tx pin - this will go from high to low at the same time. This is used by some power-down systems to see when the Pi has shutdown, etc.

Gordon

Reply to
Gordon Henderson

Yes. That was noted in Dom's posting.

After reading Dom's posting, I got the habit of watching out for the green LED (ACT on my raspberry pi B+) to blink ten imes in a steady pattern before removing power when shutting down the raspberry pi. (Be the shutdown initiated via pressing the shutdown-button, be the shutdown initiated via shutdown command from remote-computer via ssh-shell like PuTTY, or via xrdp, or via x-forwarding to xming.)

Thank you very much.

By the way---where did you get this information?

I ask because I'm not all too experienced yet with raspberry pi and related things. In addition to bothering readers of this newsgroup with my silly questions, I could try to track down manuals and other sources of information. Problem hereby is: Via google I find many tutorials where those actions are listed that are needed for achieving one or another goal. I can slavishly obey these instructions and exactly do what is said therein. This way I got soldered and attached to the raspberry pi both a reset- and a shutdown switch and I managed to install a script under raspbian which does monitor the shutdown-switch. This way I got installed xrdp and samba under raspbian. But this way I do not gain real knowledge / deeper understanding of how computers actually work and how the raspberry pi actually works.

Sincerely

Timo

Reply to
Timo

Personal observation and reading articles on other people building shutdown buttons for their Pi's.

Don't stop reading! (and experimenting)

Gordon

Reply to
Gordon Henderson

Many years of experience with Linux and Unix-type operating systems, plus checking the official Raspberry Pi forums (where I post as "rpdom" as there was already a "Dom" there when I joined)

formatting link
lots of stuff of interest, lots of noise, terrible search system - use Google instead with "site:raspberrypi.org your-search-term-here"

Reply to
Dom

Can't speak for Gordon but here are some resources:

formatting link
formatting link
formatting link

Reply to
A. Dumas

--snip --

!?! why do you solder ? Hasn't it got like version A? Soldering is dangerous. And your query about : my one ver:A is just switched-off [ten times a day for a year] after I've heard the TTS that it's playing; like you switch off your pocket-calculator. The rules for mechanical hard-disks apparently don't apply.

Reply to
Unknown

But you surely can still get a half-written file somewhere as a result of simply switching off. It's pretty unlikely to have serious effects but it *might*.

--
Chris Green
Reply to
cl

There are two risks. The first is that part of a file or meta-data may be held in cache and not written back to disk/card. Journalling file systems help with that.

The second only applies to cards. Cards use wear-levelling, and at a time of their choosing move data around. In particular, the directories get heavy activity so are the things most likely to be moved. If power is removed while this is happening then the card may be corrupted. Whether it does become corrupted depends on the algorithms used in the card. It is possible for the operations to be done in an atomic fashion, so that they are seen either to have succeeded or to have not started, whenever the power is removed. Some cards may do this, some don't.

This type of corruption does happen on USB memory sticks. The internal technology is the same. The corruption usually results in a device that cannot be recovered or re-used.

--
Alan Adams, from Northamptonshire 
alan@adamshome.org.uk 
http://www.nckc.org.uk/
Reply to
Alan Adams

This is where an SSD shows its advantage. As they are meant to be used as everyday replacements for computer hard disks and not just storing photos on cameras, so they have to do some very aggressive caching of writes so as not to use up the flash write cycle limits very quickly.

This means they are designed to be able to flush out cached writes as the power fails, reducing the probability of interruptions during wear levelling. They can still suffer corruptions, but its several orders of magnitude less likely than SD cards or USB sticks.

The only issue with SSDs and the Pi, is you are going to waste their terrific performance sitting them behind a slow USB2 interface.

---druck

Reply to
druck
[snip]
[snip]

It is possible to fix USB sticks and, presumably, cards that have had their Master Boot Record or Partition Boot Record corrupted. See, for example, .

Reply to
Gordon Levi

Please do not feed the troll.

Reply to
mm0fmf

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.