I mount the SD card on boot with the following line in /etc/rc.local
:
mount /dev/sda2 /media/USB_OC > /home/pi/logs/USB_mount_log 2>&1
This was working perfectly until an apt-get upgrade
and now it fails with:
mount: special device /dev/sda2 does not exist
This line still works manually however. So I've added sleep 10
above it in rc.local
, and now it mounts ok on boot. But I'm a bit uneasy implementing hacky workarounds like this without understanding the underlying cause. Is there a better solution?
fstab
entry like everyone else.apt-get upgrade
?