Automount media drive on startup

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
stonemikey Offline
Junior Member
Posts: 3
Joined: May 2012
Reputation: 0
Post: #1
Hi,

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:
http://forum.xbmc.org/showthread.php?tid=123230

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.
find quote
Darkjasper Offline
Junior Member
Posts: 25
Joined: Jan 2009
Reputation: 0
Post: #2
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
(This post was last modified: 2012-06-21 15:20 by Darkjasper.)
find quote
waver123 Offline
Senior Member
Posts: 173
Joined: Jun 2011
Reputation: 2
Post: #3
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.
find quote
stonemikey Offline
Junior Member
Posts: 3
Joined: May 2012
Reputation: 0
Post: #4
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.
find quote
waver123 Offline
Senior Member
Posts: 173
Joined: Jun 2011
Reputation: 2
Post: #5
try something like this,

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

you might need to add umask/dmask/fmask flags to get the permissions you want.
find quote
thethirdnut Offline
Donor
Posts: 692
Joined: Jun 2010
Reputation: 23
Location: western Canada
Post: #6
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: https://help.ubuntu.com/community/UsingUUID

If I helped out pls give me a +

XBMC1:
i3-540, GT430, Ubuntu 12.04 min + Frodo
-> HT: 58" plasma, Denon 3808CI, Paradigm Studio 60, CC-590, ADP-470, Seismic 12
XBMC2: Atom330, GT240, Ubuntu 12.04 min + Frodo
-> Main: 50" plasma, Rotel RX-1052, B&W 683
Server: 20TB FreeBSD + ZFS
find quote
stonemikey Offline
Junior Member
Posts: 3
Joined: May 2012
Reputation: 0
Post: #7
Ok, thanks everyone. It is now working. Thanks for your help.
find quote