Skip to content

Instantly share code, notes, and snippets.

@RobCranfill
Created May 29, 2021 02:21
Show Gist options
  • Save RobCranfill/7fff5700d9b19d6b888e5993e9978f20 to your computer and use it in GitHub Desktop.
Save RobCranfill/7fff5700d9b19d6b888e5993e9978f20 to your computer and use it in GitHub Desktop.
#!/bin/bash
# compare the boot files on the RPi's SSD with the files on the SD card
sudo mount -r /dev/mmcblk0p1 /mnt/sdboot 2>/dev/null
# SSD BOOT FILES
FILE1="/boot/bcm2710-rpi-3-b.dtb"
# SD CARD BOOT FILES
FILE2="/mnt/sdboot/bcm2710-rpi-3-b.dtb"
FILE2BAD="/mnt/sdboot/bcm2710-rpi-3-b-plus.dtb"
# cmp --silent $FILE1 $FILE2 || echo "Files differ - update boot!"
# cmp --silent $FILE1 $FILE2BAD || echo "(test) Files differ - update boot!"
if cmp --silent $FILE1 $FILE2 ; then
echo "Boot file test OK"
else
echo "***** Boot files differ!"
fi
sudo umount /mnt/sdboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment