LONGJA
Posts: 23
Joined: Wed Mar 28, 2018 4:04 pm

Latest updates 20/11/19 affecting fstab

Thu Nov 21, 2019 9:58 am

Morning,

I have a batch script that I use to install a series of libraries on my pi. One of these scripts runs the following commands to permanently mount a usb drive at boot...

sudo mkdir /mnt/usbstorage
sudo chown -R pi:pi /mnt/usbstorage
sudo chmod -R 775 /mnt/usbstorage
sudo apt-get update
sudo mount -o uid=pi,gid=pi /dev/sda1 /mnt/usbstorage
sudo apt-get remove usbmount --purge
sudo sed -i '$ a /dev/sda1\t/mnt/usbstorage vfat\tnofail,uid=pi,gid=pi 0 0' /etc/fstab
sudo mount -a
sudo reboot

Yesterday 20/11/19, the script stopped working after running...

sudo apt-get update

and the drive was no longer mounted. It can be mounted manually using the 'sudo mount' command above but that is no good.

I had followed the same process on the day before (19/11/19) and had no issues. Have there been any changes to the fstab in the latest set of updates?

Thanks

fbe
Posts: 616
Joined: Thu Aug 17, 2017 9:08 pm

Re: Latest updates 20/11/19 affecting fstab

Thu Nov 21, 2019 2:59 pm

No. AFAIK the most recent change to fstab was the replacement of device names with PARTUUID on Raspbian Images to support booting from USB (2017-04-10).

The only command in your script that changes fstab is the "sed" command. Even if any package update would cause a fstab change no updated package is installed by any of your commands (you would need to call "apt-get upgrade", to do that).

Return to “General discussion”