2

I am searching for MicroSD card for Raspberry Pi that won't get damaged. (See previous post, SanDisk Ultra SD Card with Raspberry Pi 3+ Suddenly Stopped Working (and is Overheated!))

On this product description, it says following,

If you are an experienced Raspberry Pi user, you probably know to perform a soft shutdown before unplugging power or you may end up with an unbootable system. Our MicroSD card images were created with special tweaks to increase performance while offering significantly more protection against data corruption from power issues.

How would user perform soft shutdown if they never SSH'd into the system in the first place.

What I mean is, I SSH into my Raspberry Pi from my Laptop. W

hat if I turned on the Raspberry Pi, but never SSH'd into it. And later on I turn off my Laptop and unplug my Raspberry Pi.

How would I perform a soft shutdown of Raspberry Pi if I never SSH'd into it to begin with, but simply plugged it in?

Ingo
  • 42,961
  • 20
  • 87
  • 207
Marium
  • 155
  • 1
  • 5

2 Answers2

2

As @Millways says, soft shutdown is simply shutting down the operating system before powering off.

Depending on what your Pi is used for, you may be able to automate the shutdown. I have this script which is called from /etc/rc.local

#!/bin/bash
# Control script for Raspberry Pi
# Runs at boot-up, as root

FLAG_FILE=/home/pi/donotshutdown

# Run the application.
my_application

if [ -f $FLAG_FILE ]
then
    # Flag file exists, no shut down
    rm $FLAG_FILE
else
    # Proceed to shut down
    shutdown now
fi

Normally, it runs the application then shuts down. If I want it to remain running when my application has finished, I just create (with ssh) the flag file.

Peter Bill
  • 339
  • 2
  • 8
1

Sounds like marketing talk!

If you use the shutdown on the Desktop (or sudo poweroff command) there should be no problem.

Your previous problem is likely a hardware failure or power supply issue - nothing to do with how it was shutdown.

It is simple to connect a pushbutton to the GPIO pins to perform a clean poweroff. See https://raspberrypi.stackexchange.com/a/42945/8697

NOTE All SD Card manufacturers claim that SD Cards are not designed to run an OS.

Milliways
  • 62,573
  • 32
  • 113
  • 225