1

How do you mount a drive in Ubuntu Core? Can you use the fstab? Or is there another way? I don't want to get started an realise you cannot mount an external drive.

When you're in the fstab, it says not to manually write it and to go to /etc/writable but how do you add the fstab? HERE BE DRAGONS I fear

  • 1
    ...fstab should work, as well as the mount command. – mikewhatever Nov 26 '16 at 13:34
  • I am not sure what answer do you expect. Does mikewhatever's reply satisfies you? – Hi-Angel Nov 26 '16 at 15:13
  • I need to know how to edit the fstab as you're warned not to do it – eekfonky Nov 26 '16 at 15:33
  • /etc/writeable does not exist on my 16.04, and fstab contains no such warning. What OS are you running? – ubfan1 Nov 26 '16 at 16:28
  • Ubuntu Core 16. Not standard Ubuntu – eekfonky Nov 26 '16 at 16:28
0

use the systemd to mount a drive on Ubuntu Core 16.04:

Step 1: Identlify your uuid by using

sudo blkid

Step 2: Using "vi" or another editor create a mount unit file for systemd to use. If you want the mount point to be "/media/data" then create the file "/etc/systemd/system/media-data.mount"

sudo vi /etc/systemd/system/media-data.mount

Step 3: Add information about your drive to the mount unit file (media-data.mount)

[Unit]
Description=Mount unit for data

[Mount]
What=/dev/disk/by-uuid/4E1AEA7B1AEA6007
Where=/media/data
Type=ntfs
Options=umask=0000

[Install]
WantedBy=multi-user.target

Step 4: reload systemd

sudo systemctl daemon-reload

Step 5: Start the unit

sudo systemctl start media-data.mount

Step 6: To enable auto mount do:

sudo systemctl enable media-data.mount

Step 7: Have fun.

Information sources:

http://manpages.ubuntu.com/manpages/zesty/man5/systemd.mount.5.html

https://flexion.org/posts/2016-12-raspberry-pi-3-powered-nextcloud-box-on-ubuntu-core/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.