mikedefieslife
Posts: 17
Joined: Sat May 26, 2018 5:31 pm

What is wrong with these fstab entries?

Fri Jul 13, 2018 4:14 pm

Seems there isn't a nice easy to way to have the Pi automount usb drives in Raspbian, so I've had to take to adding them via the fstab.

This works well in terms of getting the disks mounted and usable, but then when I restart the Pi it boots into some kind of emergency mode.

What is it that is wrong with these fstab entries?

Code: Select all

proc            /proc           proc    defaults          0       0
PARTUUID=6ac1debd-01  /boot           vfat    defaults          0       2
PARTUUID=6ac1debd-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that

UUID=1520DC3D48736AD1 /media/photos ntfs-3g rw,defaults 0 0
UUID=48c944e9-d81f-33fd-b338-535a617fe7f0  /media/misc hfsplus force,rw
UUID=90a83158-560d-48ee-9de9-40c51d93e287  /media/macbackup hfsplus force,rw
Thanks in advance

User avatar
PeterO
Posts: 4257
Joined: Sun Jul 22, 2012 4:14 pm

Re: What is wrong with these fstab entries?

Fri Jul 13, 2018 4:24 pm

mikedefieslife wrote:
Fri Jul 13, 2018 4:14 pm
Seems there isn't a nice easy to way to have the Pi automount usb drives in Raspbian,
Works for me :roll:
I just plugged a USB drive into a hub on my PI3B+ and it's automounted both partitions just fine ...

Code: Select all

/dev/sdb1 on /media/pi/boot type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
/dev/sdb2 on /media/pi/rootfs type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4608
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: What is wrong with these fstab entries?

Fri Jul 13, 2018 4:45 pm

@mikedefieslife: Are you using Raspbian "full" (ie. with the Desktop etc.) or Raspbian lite?
The file-manager of the Desktop usually handles auto-mounting: http://www.cpmspectrepi.uk/raspberry_pi ... 29_Methods
Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
PeterO
Posts: 4257
Joined: Sun Jul 22, 2012 4:14 pm

Re: What is wrong with these fstab entries?

Fri Jul 13, 2018 4:48 pm

FTrevorGowen wrote:
Fri Jul 13, 2018 4:45 pm
Are you using Raspbian "full" (ie. with the Desktop etc.) or Raspbian lite?
The file-manager of the Desktop usually handles auto-mounting: http://www.cpmspectrepi.uk/raspberry_pi ... 29_Methods
Trev.
I'm using desktop, but OP may not be (he doesn't say).
, but then when I restart the Pi it boots into some kind of emergency mode.
See https://www.raspberrypi.org/documentati ... es/host.md It's not clear to me (and may not even be predictable) which device will be booted from if more than one is present.

PeterO
Last edited by PeterO on Fri Jul 13, 2018 4:53 pm, edited 1 time in total.
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4608
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: What is wrong with these fstab entries?

Fri Jul 13, 2018 4:51 pm

PeterO wrote:
Fri Jul 13, 2018 4:48 pm
FTrevorGowen wrote:
Fri Jul 13, 2018 4:45 pm
Are you using Raspbian "full" (ie. with the Desktop etc.) or Raspbian lite?
The file-manager of the Desktop usually handles auto-mounting: http://www.cpmspectrepi.uk/raspberry_pi ... 29_Methods
Trev.
I'm using desktop, but OP may not be (he doesn't say).
PeterO
I meant the O.P. - edited post to make that clearer :)
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

mikedefieslife
Posts: 17
Joined: Sat May 26, 2018 5:31 pm

Re: What is wrong with these fstab entries?

Fri Jul 13, 2018 5:16 pm

Sorry. I'm using command line only as I run the Pi headless.

Yes, with a desktop drives auto-mount like a dream. The procedure doesn't seem to be easy to replicate with using pmount etc..

Anyhow, that's for another thread. I'm just wondering what it is in my fstab that is stopping my Pi running stretch from booting up properly?

User avatar
thagrol
Posts: 869
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: What is wrong with these fstab entries?

Fri Jul 13, 2018 8:21 pm

mikedefieslife wrote:
Fri Jul 13, 2018 5:16 pm
Sorry. I'm using command line only as I run the Pi headless.

Yes, with a desktop drives auto-mount like a dream. The procedure doesn't seem to be easy to replicate with using pmount etc..

Anyhow, that's for another thread. I'm just wondering what it is in my fstab that is stopping my Pi running stretch from booting up properly?
Are all of those drives guaranteed to be present at every boot up of the pi? If one oir more are missing your boot will fail. Try adding "_nofail" to their mount options. WIth that present if the mount fails for any reason boot will continue but the drive won't be mounted.

FYI: several people on the forum have used usbmount to automate mounting USB drives. Not something I have experiance of but may be worth your trying it.

Edit: even with my suggested change to fstab you should be aware that drives will only be mounted automatically if they're present at boot time. They won't be mounted automatically if connected after booting, at least not without additional software installed or by you running

Code: Select all

sudo mount -a
Note to self: don't feed the trolls
If you believe "L'enfer, c'est les autres" (Hell is other people) have you considered that it may be of your own making?

Return to “Troubleshooting”