I want my Pi to mount my USB drive at boot if the drive is inserted, however, I also want the Pi to boot regardless of whether or not the drive is inserted at startup or not. I edited my fstab
file and used my devices UUID to mount it, and it works fine, but like the title says, it won't boot without the drive inserted.
I read online that I need to write nofail
in my fstab
line, which I tried doing but I think I did it wrong as it still won't boot. Here is the line I have written in my fstab
file:
UUID=9687-3A59 /mnt/usb vfat defaults 0 2, nofail
Also, I read from another user on here that if you go this route by adding nofail
to fstab
, if the drive isn't inserted you have to wait 90 seconds for the Pi to try mounting it. Is there an alternative to this? Something where I won't have to wait if it's not there, but it will still boot with or without the drive?
I am new to the Pi/Linux/Unix world, and this has all been a major learning process that I am enjoying so far.
nofail
to fstab after defaults, without a space between the comma andfstab
. The line should look like this:UUID=9687-3A59 /mnt/usb vfat defaults,nofail 0 2
man fstab
for a better understanding of how the file should be structured.