Thread Rating:
  • 0 Vote(s) - 0 Average
Automount media drive on startup

I will start by saying that I am very new to XBMC and Linux but I am happy to get my hands dirty and am generally fairly computer literate.

Having used Windows Media Center for years I recently built a media center using XBMCBuntu (Eden) and absolutely love it. The install and configuration all seemed to go smoothly and everything is working. I'm now building a second one. Everything is installed and, after some tweaking, seems to be working great. However, I have one remaining problem.

The operating system (and I assume the media library) is installed on an SSD, and all the media files are on a separate internal 1TB SATA hard drive. The media library is set up to access these files. When I startup the system or reboot and try to play any file in the library I get a message saying the file is no longer available. When I exit XBMC and go to File Manager in XBMCBuntu it turns out that the 1TB drive has not been mounted. When I mount it and go back into XBMC all the files play fine. The option to "Mount mountable volumes on program startup" is selected in preferences.

So it seems there is an automount issue.

I have tried to follow the instructions to mount the media partition in the following post:

I added the line "/dev/sdb1 /storage ext2 defaults 0 0" to fstab (using ext2 because I don't know what else to use. When I then run the mount command, I get the following error:

"wrong fs type, bad option, bad superblock on /dev/sdb1"

The hard disk was formatted and loaded with files using Windows, does this make a difference? As I say, once I mount it manually everything is fine, but I really don't want to do this every time I turn the computer on!

Can anyone please help me to get this drive to automount when I boot directly into XBMC?

Thanks very much.
Is this a windows formated drive (the 1 TB drive)?

If it is you will need to install ntfs support. You could do this by running the command "sudo apt-get install ntfs-3g" then use ntfs-3g instead of ext2. And then look around for different options that might suit you best on the web. Though defaults should work.

If you formated it in linux try ext3 instead

yeah sounds like it's probably ntfs if it's windows format.
once you've mounted it in filemanager you can also open a terminal and type "df -T", this would show all mounted filesystem with their type. Then add appropriate mount entries in /etc/fstab.
Ok. I had tried ext3 and that came up with the same error but given that it was formatted in windows that now makes sense. waver123 you say add appropriate entries in fstab, but what is an appropriate entry for an ntfs disk? And do i still need to install ntfs-3g as darkjasper suggests? Thanks.

try something like this,

/dev/sdb1 /storage ntfs-3g defaults 0 0

you might need to add umask/dmask/fmask flags to get the permissions you want.
a) ensure that you mount the drive in Ubuntu

b) open a terminal, enter 'mount' ... this'll tell you what format / how you're drive in question is currently mounted ... you should see mountpoint + 'ntfs**' where expected ... make a note of the /dev/xxx location for that drive.

c) in terminal run 'ls -lG /dev/disk/by-uuid/'

xxx:~$ ls -lG /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root 10 2012-06-03 21:02 ssssssss-a01a-45d1-a6c9-158222415287 -> ../../sdh1
lrwxrwxrwx 1 root 10 2012-06-03 21:02 ssssssss-0fd7-40ff-9821-f8160ad8774a -> ../../sdg1
lrwxrwxrwx 1 root 10 2012-06-03 21:02 ssssssss-2ad4-4153-920c-1775dd40dc31 -> ../../sdg5
lrwxrwxrwx 1 root 9 2012-06-03 21:02 ssssssss-6777-4ea1-93b9-ddf265994c1a -> ../../md0

d) copy the 'ssssssss-a01a-45d1-a6c9-158222415287' type string - this is the UUID for the drive you're interested in.

e) open up /etc/fstab with editor you're comfortable with and enter in something like this:

'UUID=ssssssss-a01a-45d1-a6c9-158222415287 /mountpoint ntfs-3g defaults 0 0'

NOTE: this uses the UUID for devices over /dev/sdX since that sdX location can change per boot.

f) unmount the drive through Ubuntu - then run 'sudo mount -a' to try remounting it through fstab. If it works now it'll work every boot the unit is plugged in for.

Deets here:
If I helped out pls give me a +

A bunch of XBMC instances, big-ass screen in the basement + a 20TB FreeBSD, ZFS server.
Ok, thanks everyone. It is now working. Thanks for your help.
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
Automount media drive on startup00