[solved] Unable to auto mount drive on lubuntu

I'm setting up a web server on a banana PI, with Lubuntu.

When I change the mount options of the HHD, with the GUI Or /etc/fstab the os is unable to mount the drive on startup.

During Boot the boot process is halted untill you press S to skip the mounting process.

Dose anyone know of why it is cannot mount the drive, and is it possible to fix this problem since I cannot attach the extra storage to the web server.

Edit: could anyone tell me if they are any drive mounting logs

I have not dealt with Banana Pi, but I ran a Ubuntu Server on a laptop for a long time with an HDD in an external USB enclosure. I used a program called USBmount (this concise guide is okay), as per this recommendation from the Ubuntu documentation. I think USBmount is available for Raspbian at least, I don't know what you are running on the Banana Pi. Two words of warning though, USBmount is currently not under development, and I found it will mount the partitions on the USB drive/stick as /media/usb0, /media/usb1 and so on. Only problem I ran into was that it was not always that the same partitions got mounted to the same mountpoint (usb0, usb1 et cetera), so only having one partition makes it a lot easier if you have other stuff pointing to it (then it'll always be usb0). This could be my fault for not delving deep enough in the options of the conf file though.

Edit: Oh, I must not have read your post thoroughly enough. You're running Lubuntu, then it'll definitely be available in he repositories.

Edit !!: As said, I don't have experience with Banana Pi. but I can see there are a couple different models. Is your extra storage connected via USB or the SATA port or?

Hello @Infinatum,

I left your /var/boot/boot.log in my post on the other thread because it illuminates the point where your system fails to complete user space. I gather you can skip over the failed step and have a somewhat compromised running system, but with drives you'd like to have mounted still unmounted.

The closest I can come to that is to query systemd

Lbuntu uses systemd to manage Linux on Lubuntu, including orchestrating startup. The log that you posted is a low-resolution rendition of lots of information systemd logs into its journal. If you can get into a shell after skipping over the failed step, then you can query systemd regarding failed services. These may include the drives that failed to mount, as drives are mounted by systemd services.

It just so happens that I have a systemd-based system which is having startup issues. Now while my issues are unrelated to yours, the systemctl commands that I used to probe the issue are not unlike you would use to probe the issue of your drive mount failures.

I'd like to ask systemd about any failed services:

Estella gosgood # systemctl list-units -t service --failed
  UNIT               LOAD   ACTIVE SUB    DESCRIPTION
● nfs-idmapd.service loaded failed failed NFSv4 ID-name mapping service
● sntp.service       loaded failed failed Set time via SNTP

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

2 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.


Ah - I have two failed services. You, issuing a similar query, may uncover file mounting services that have failed.

I'd like to know details about one of these two failed services. Here's how I ask systemd:

Estella gosgood # systemctl -l status nfs-idmapd.service 
● nfs-idmapd.service - NFSv4 ID-name mapping service
   Loaded: loaded (/usr/lib64/systemd/system/nfs-idmapd.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2017-03-23 20:42:29 EDT; 34min ago
  Process: 280 ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS (code=exited, status=1/FAILURE)

Mar 23 20:42:27 Estella systemd[1]: Starting NFSv4 ID-name mapping service...
Mar 23 20:42:29 Estella systemd[1]: nfs-idmapd.service: Control process exited, code=exited status=1
Mar 23 20:42:29 Estella systemd[1]: Failed to start NFSv4 ID-name mapping service.
Mar 23 20:42:29 Estella systemd[1]: nfs-idmapd.service: Unit entered failed state.
Mar 23 20:42:29 Estella systemd[1]: nfs-idmapd.service: Failed with result 'exit-code'.

Now I have a snipped of systemd journal entries centered on my failed nfs-idmapd.service. I have a bunch of hints to pursue.

That's my brief demo in getting systemd to expand detail on what may be going on. There are more examples on this Fedora page:

How to debug Systemd problems

Hope this helps...

1 Like

post your fstab

cat /etc/fstab

Not OP, but I have a similar issue.
#main will mount, but the others won't.

/dev/mapper/fedora-root / ext4 defaults 1 2
/dev/mapper/fedora-swap swap swap defaults 0 0
/dev/mapper/fedora-home /home ext4 defaults 1 2
UUID=6e96eece-9f65-428a-ade2-3b1eb9f28951 /boot ext4 defaults 1 2

#main
UUID=C8A683C7A683B50A /mnt/main ntfs rw,suid,dev,exec,auto,nouser,async,nofail 0 0

#myStuff
UUID=F2B42133B420FC2B /mnt/myStuff ntfs rw,suid,dev,exec,auto,nouser,async,nofail 0 0

#backup
UUID=E6D07D36D07D0DD5 /mnt/backup ntfs rw,suid,dev,exec,auto,nouser,async,nofail 0 0

Once I replaced 'defaults' with rw,suid,dev,exec,auto,nouser,async #main finally mounted

status mnt-myStuff.mount
● mnt-myStuff.mount - /mnt/myStuff
Loaded: loaded (/etc/fstab; generated; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2017-03-24 10:22:23 EDT; 8min ago
Where: /mnt/myStuff
What: /dev/disk/by-uuid/F2B42133B420FC2B
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Process: 924 ExecMount=/usr/bin/mount /dev/disk/by-uuid/F2B42133B420FC2B /mnt/myStuff -t ntfs -o rw,suid,dev,exec,nouser,async (code=exited, status=21)

Mar 24 10:22:22 localhost.localdomain systemd[1]: Mounting /mnt/myStuff...
Mar 24 10:22:23 localhost.localdomain mount[924]: ntfs-3g-mount: failed to access mountpoint /mnt/myStuff: No such file or directory
Mar 24 10:22:23 localhost.localdomain systemd[1]: mnt-myStuff.mount: Mount process exited, code=exited status=21
Mar 24 10:22:23 localhost.localdomain systemd[1]: Failed to mount /mnt/myStuff.
Mar 24 10:22:23 localhost.localdomain systemd[1]: mnt-myStuff.mount: Unit entered failed state.

I'm not sure what to do

I never used Systemd before so let me know if i'm doing something wrong.

Typing in the following command gives the following result

systemctl list-units -t service
systemctl: command not found

I looked up the error and it seems that systemctl is not on the newest version of lubuntu

EDIT: i'm trying out Ubuntu MATE and see if i get the same problem

I'm using Fedora so it may be different, I don't know if systemctl is on Ubuntu.

As Dynamic_Gravity asked, can you post your fstab file?

It's located in /etc/fstab

in terminal you can type:

cat /etc/fstab

and just copy/paste whats in there.

1 Like

Seems to work now thanks,

I originally mounted the drives via the GUI Gnome Disks Program.

what was originally in the fstab file

/dev/disks/by-uuid/b72b1511-4ea7-457a-818c-1cd1a697e5a8 /mnt/b72b1511-4ea7-457a-818c-1cd1a697e5a8 auto nosuid,nodev,nofail,x-gvfs-show 0 0

After setting up the fstab file (foilowing the guide below) lubuntu seems to start with no errors as well as mounting the dives.

What i put in the fstab file

/dev/sda1 /mnt/disk01/500GB ext4 defaults 0 0
/dev/sda2 /mnt/disk02/500GB ext4 defaults 0 0

Thanks for all the help.

Links Used;

1 Like

Hello @Infinatum,
Looks like you are good to go! Maybe not of immediate interest to you anymore, but I wished to settle the side-story of the existence of systemd on lubuntu, if for other people who stumble over this thread and would like to see the question settled.

For giggles and snorts, I put lubuntu 16.10 (yaketty-yak) on a USB stick this morning (America/New_York), which I think is pretty current - the home page claims this is current.

It's running now on the venerable Dell GX620 which I'm sitting at and am running it off a USB stick in the "Try it, you'll like it!" mode. Seems that systemd is the runtime manager here:

lubuntu@lubuntu:~$ ps -el | grep systemd
4 S     0     1     0  3  80   0 - 34304 -      ?        00:00:11 systemd
4 S     0  1039     1  0  80   0 - 12313 -      ?        00:00:00 systemd-journal
4 S     0  1071     1  0  80   0 - 11447 -      ?        00:00:00 systemd-udevd
4 S   100  1132     1  0  80   0 - 31893 -      ?        00:00:00 systemd-timesyn
4 S     0  1158     1  0  80   0 - 11103 -      ?        00:00:00 systemd-logind
4 S   102  1387     1  0  80   0 - 11889 -      ?        00:00:00 systemd-resolve
4 S   999  1565     1  0  80   0 - 15724 ep_pol ?        00:00:00 systemd

Insofar as systemctl and journalctl go, these may not be visible to normal users. You may need fetch administrative privileges:

lubuntu@lubuntu:~$ sudo systemctl list-units -t service --fail
0 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

So, if it matters, try sudo to invoke the command.

I gather that lubuntu/ubuntu has come to systemd pretty recently and one can still get earlier distros either without it or not enabled as a default, using upstart instead. Perhaps also you snagged yourself such a distro and there really is no systemd.
People live hale and hearty lives without it, but if it is on your lubuntu box, it's a recent lubuntu and you plan to run lubuntu in a serious way, the systemd bits are in your kit, albeit hidden away so the unwary won't loose too many fingers inadvertently running it.

Good luck with your project!

1 Like