Shuttoff or shutdown

Hi,

my question concerning the correct "turn off" procedure for Yun:
Can you just shutoff the power or does Linux needs a proper shutdown, especially when you have installed further packages?

Thanks!!!

I just unplug the Yun and have seen no ill effects, the only thing I have noticed is things in /tmp go away so don't use the temp directory to store stuff you want to keep.

More importantly, I have seen nothing in the documentation or forum. I expect the Arduino Yun people would have prominent warnings if a "proper" shutdown was needed.

Thank You!!!!!

noblepepper:
More importantly, I have seen nothing in the documentation or forum. I expect the Arduino Yun people would have prominent warnings if a "proper" shutdown was needed.

Indeed there is nothing particular to do, just unplug it. That said, if you customize the yun running whatever program needs a proper shutdown, you need to shut that program down properly and only then unplug the yun

The Raspberry Pi forums will tell you that you shouldn't just unplug, you should shut down first. I think this is especially relevant if the linux computer is busy writing to the SD card. I don't see why that wouldn't also apply to the Linux side of the Yun. You can connect a button to the Arduino that can then programmatically call the linux shutdown command, sudo shutdown -h now. Then you'd still have to wait for that to finish – I think indicating it with an LED somehow would be ideal.

The Yún runs a version of Linux called OpenWrt, which doesn't have a shutdown command. There's also no "sudo" command since you are always logged in as root.

There is a reboot command, but no shutdown. Being Linux it's not a good idea to simply turn off the power suddenly, especially if you've expanded its filesystem onto an SD card. You can actually — like any Linux OS — damage the filesystem by turning off the power without a proper shutdown.

So absent a shutdown command, how to shut down the Yún?

It turns out there is a halt command, which if you don't include a "-n" argument will also sync (synchronise) the filesystem prior to the halt.

So apparently the safe way is to shut down the Yún is with this:

  root@yun:~# halt

Note that if you're in a terminal and type 'halt' your terminal will freeze. This is normal; your Yún has disconnected the ssh session and halted. Now you can either power down or push the "YUN RST" button to reset/reboot the processor.