0

After a reboot OSMC has mounted my External HD with 2 versions. The original has become externalHD_ from externalHD and I can no longer access it. Why are there 2 and how do I prevent this?

osmc@osmc:/media$ ls
externalHD  externalHD_
osmc@osmc:/media$ cd externalHD
-bash: cd: externalHD: Permission denied

Here is what happens when I list it:

osmc@osmc:/media$ ls
externalHD  externalHD_
osmc@osmc:/media$ ls -la
total 16
drwxr-xr-x  4 root root 4096 Jan  1  1970 .
drwxr-xr-x 23 root root 4096 Jan  1  1970 ..
drwx------  3 root root 4096 Jan  1  1970 externalHD
drwxrwxrwx  6  999  999 4096 Feb 28 06:46 externalHD_

I can unmount it. go root, delete the externalHD unplug the HD, reboot then reattach it. However I don't want to have to do this everytime.

When I enter the command mount

osmc@osmc:~$ mount
/dev/mmcblk0p2 on / type ext4 (rw,noatime,stripe=1024,data=ordered)
devtmpfs on /dev type devtmpfs     (rw,relatime,size=376916k,nr_inodes=94229,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts     (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup     (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-    agent,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup     (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup     (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup     (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup     (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup     (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs     (rw,relatime,fd=21,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mmcblk0p1 on /boot type vfat     (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,err    ors=remount-ro)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
/dev/sda1 on /media/externalHD_ type ext4     (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks)
tmpfs on /run/user/1000 type tmpfs     (rw,nosuid,nodev,relatime,size=76244k,mode=700,uid=1000,gid=1000)


GNU nano 2.2.6             File: /etc/fstab                                
/dev/mmcblk0p1  /boot    vfat     defaults,noatime    0   0
/dev/mmcblk0p2  /    ext4      defaults,noatime    0   0
UUID=1ed5602e-40c5-482f-a3c0-e97c0fd12b20  /media/externalHD    defaults     0     2

Now the Pi won't boot after a restart. What's the fault and can I amend it?

  • 1
    Edit in the output from mount (with no options, etc.). – goldilocks Mar 4 '15 at 21:15
  • Sorry, how do I do that? – eekfonky Mar 4 '15 at 21:19
  • type mount at the command prompt then edit your question and copy and paste. – Steve Robillard Mar 5 '15 at 0:24
1

mount only shows /dev/sda1 mounted on /media/externalHD_ The /media directory has 2 sub-directories externalHD and externalHD_ which could be used as mount points.

How are you mounting the drive? The GUI mounts in /media, and creates mount points, so it may have created a few.

Unless you want transient mounts (in the GUI) you may be better to create an entry in /etc/fstab. If so list this, and we can help.

| improve this answer | |
  • It mounts in the OSMC GUI. I would like it to always mount at the same point as that's where I point the torrents and nzb files as well as OSMC to update the library. I'd like it to be /media/externalHD and NOT /media/externalHD_ – eekfonky Mar 5 '15 at 7:01
  • I do not use OSMC and have no knowledge of it, or how it mounts media. Regardless it is possible to create an entry in /etc/fstab which would mount it in /media/externalHD. This could be at boot or when manually set. You could just eject the disk, and delete the unwanted mount point. – Milliways Mar 5 '15 at 7:28
  • It's based on Debian Jessie. It's the Open Source Media Centre that's taken over from Raspbmc – eekfonky Mar 5 '15 at 7:58
  • Millways is correct -- it's not mounted twice, there are just two directories in /media. You could try unmounting it and removing the drive, then delete both directories and plug it back in and see what happens (maybe you have to reboot). If it doesn't automount, as root create /etc/externalHD and chmod 777 /etc/externalHD and try again. – goldilocks Mar 5 '15 at 13:50
0

Change fstab entries to:

/dev/mmcblk0p1  /boot    vfat     defaults,noatime    0   0
/dev/mmcblk0p2  /    ext4      defaults,noatime    0   0
UUID=15c34a6b-f0af-4d24-b546-0eaeaec9ee33  /media/externalHD    ext4      nofail,defaults    0  0

This did the trick!

| improve this answer | |
  • Please note that the mounting of removable drives that might be not present during boot time with fstab is an issue. If the drive it missing the boot process might stop during the attempted mounting. The use of the nofail option could help around this. See: askubuntu.com/questions/14365/… – Ghanima Mar 6 '15 at 8:51

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.