tips
9 tips Setup and devices
One command, setting or habit at a time about Setup and devices: what it does, the line to copy and a caveat or two.
Setup and devices 9
-
Turns on the serial console on the GPIO pins, so you can see boot messages without a monitor or network.
enable_uart=1 -
Writes a Raspberry Pi image from the terminal, and refuses it if the SHA-256 hash does not match.
sudo rpi-imager --cli --sha256 <hash> raspios.img.xz /dev/sdb -
Helps separate a bad cable or port from a bad disk.
sudo smartctl -l sataphy /dev/sda -
Captures a numbered series of still photos at a fixed interval for a time-lapse.
rpicam-still --timeout 30000 --timelapse 2000 -o timelapse/image%04d.jpg -
Reads SMART data only when a disk is awake, so a check never spins it up.
sudo smartctl -n standby -H /dev/sdb -
Shows and sets how long a hard disk retries a bad sector before it reports an error.
sudo smartctl -l scterc /dev/sda -
Reads the smart data of a USB-attached drive by using SAT pass-through.
sudo smartctl -d sat -a /dev/sdb -
Lists the devices smartctl can read and the -d type that fits each.
sudo smartctl --scan -
Lets the smartd daemon test drives on a schedule and mail you the warnings.
DEVICESCAN -a -m root -s (S/../.././02|L/../../6/03)
Nothing in this filter yet.