[How To] Mount Windows Share on OpenElec Boot

Alan

New member
Feb 2, 2013
43
0
0
Need help! Lol

Got round to trying this today and followed the steps, but me being me manger to screw it up somewhere along the line, now when I boot my Pi getting the following message:

*** Error in mount_storage: mount_common: could not mount /dev/sda2***
[ 16.9892221 system halted.

Any idea how I can fix or even just remove the mount as I don't want to lose everything and like an idiot haven't got a backup!

Running off a USB if that makes a difference.
 

nothere

Banned
Nov 25, 2012
1,036
0
0
Need help! Lol

Got round to trying this today and followed the steps, but me being me manger to screw it up somewhere along the line, now when I boot my Pi getting the following message:

*** Error in mount_storage: mount_common: could not mount /dev/sda2***
[ 16.9892221 system halted.

Any idea how I can fix or even just remove the mount as I don't want to lose everything and like an idiot haven't got a backup!

Running off a USB if that makes a difference.
What USB stuff do you have connected to your pi?
 

nothere

Banned
Nov 25, 2012
1,036
0
0
Have you removed them at all and put them in the opposite ports (if that makes sense) ie swapped the usb sticks around?

Try swapping them and rebooting.
 

Alan

New member
Feb 2, 2013
43
0
0
I haven't to be honest I didn't remove anything just used your guide, I try a few things and report back
 

Alan

New member
Feb 2, 2013
43
0
0
Removed the storage only USB drive and openelec booted straight up. After boot I plugged it in again and xbmc picked it up again, so all good.

For some reason the mount isn't working, I can't see the files that's in the shared folder on the pc but I will look into that some other time, thanks for your help, panic over.
 

ViperNY

New member
Nov 10, 2012
10
0
0
New York
Let me start by saying I am very new to XBMC and really enjoy working on the Pi. I have a Time Capsule with a pw and I am struggling getting this to work. I did try it with a seperate NAS with out a pw and still having issues. Got putty to work and made the "pcdownloads" folder. I am using notepad to create and edit the file making sure I dont save as a .txt file. I put a test folder in the Downloads folder on the TC so I have something to see if I am able to connect, but no matter what configuration I try I cant get it to mount. Any hand holding would be appreicated. BTW, I have searched the Apple fourms and Googled TS user names and there is alot of confusion on this issue. For the record, in Windows with I type the IP of the TS, user = admin

Regards,
Vipz
 

tuxen

Banned
Mar 23, 2012
2,235
0
0
Denmark
Removed the storage only USB drive and openelec booted straight up. After boot I plugged it in again and xbmc picked it up again, so all good.

For some reason the mount isn't working, I can't see the files that's in the shared folder on the pc but I will look into that some other time, thanks for your help, panic over.
It seems like you somehow created 2 storage partitions because if you pulled out the usbstick with storage you won't be able to boot. And get a "could not mount /dev/sda2..." boot error. But if openELEC sees a partition (sda2 - second partition) on the other usbstick it will use that a new storage.

So you probably booted with the wrong storage that would also explain why the windows mount script failed. And why storage got mounted the second time when you inserted the storage usbstick. (Its not the real storage it's currently running on, the names are just the same so XBMC thinks it picked up a normal 3rd partition and because its named the same it led to confusion)

I dunno but somehow your usbsticks partitions got messed up, switched around or something in the process. It could have been like that for some time without you noticing it.
 
Last edited:

ViperNY

New member
Nov 10, 2012
10
0
0
New York
Never mind, I went the smb:\\ route and proved to be much easier to set up and use.
Damn, still can't save anything from Na*i-X, keep getting errors, cannot create the folder. I can play anything saved to the Time Capsule, just cant save via smb:\\. I guess its back to trying to get the drive to mount.

Anyone got any new ideas?
 

tuxen

Banned
Mar 23, 2012
2,235
0
0
Denmark
Nope it's a known issue with XBMC that it can not save to smb:\\ you need to mount it in the root filesystem.
And hence this thread. It's worse for iOS users though since they do not have the capability to mount a share.
 

ViperNY

New member
Nov 10, 2012
10
0
0
New York
Nope it's a known issue with XBMC that it can not save to smb:\\ you need to mount it in the root filesystem.
And hence this thread. It's worse for iOS users though since they do not have the capability to mount a share.
Tuxen, thanks for your reply, yes everything is pointing to "mounting" a NAS drive. I have been playing with all kinds of configurations and keep getting errors, heres an example,

openelec:~ # mount -t cifs -o //192.168.1.2/ /storage/pcdownloads; \
>
mount: can't find /storage/pcdownloads in /etc/fstab
openelec:~ # mount -t cifs -o //192.168.1.2/ /storage/; \
>
mount: can't find /storage/ in /etc/fstab
openelec:~ # mount: can't find /storage/ in /etc/fstab
> mount: can't find /storage/ in /etc/fstab
-sh: mount:: command not found
openelec:~ # mount: can't find /storage/ in /etc/fstab
>
Regards,
Vipz
 

tuxen

Banned
Mar 23, 2012
2,235
0
0
Denmark
You are missing the sharename on the computer/nas (very important), a user with rights to the sharename, that users password if there is one set, and finally that the share should be mounted as read and write able.

I have put the missing options in bold. Also you need to first create the /storage/pcdownloads dir where your share from the computer/nas will be mounted in if you have not done so.
(command: mkdir /storage/pcdownloads)

And yes I tested it before I posted, and it works perfect. :D

Code:
mount -t cifs -o username=[B]userwithrights[/B],password=[B]userpassword[/B],[B]rw[/B] //192.168.1.2/[B]sharename[/B] /storage/pcdownloads
Don't use ; \ at the end its part of the script explained in post #1

To see which share names that you have on your nas (you should know since you must have created them) in windows press leftwin+r and type \\192.168.1.2 into the run field then press ok.

Edit: For reference: http://wiki.openelec.tv/index.php?title=Mounting_network_shares
 
Last edited:

Alan

New member
Feb 2, 2013
43
0
0
Right going to pull my hair out soon. Trying to mount a share from my Nas, but getting the following error on boot, the error flashes for 1/2 second (had to record it on my phone to read it)

/storage/.config/autostart.sh: line 4: syntax error: unexpected end of file

I can access the Nas using samba or nfs and read files fine just cant get it mounted so i can write to it.

Pi = 192.168.0.2
Nas = 192.168.0.9
share on nas = xbmc (shared over samba and nfs)
user = admin (full read write rights)
no password
Directory im trying to mount to = storage/NAS (created and visible)

The following is the contents of the autostart.sh file which i created in configfiles folder.(definatly the right file extension)
Code:
#!/bin/sh
(sleep 30; \
mount -t cifs -o username=admin,rw //192.168.0.9/xbmc /storage/NAS
have tried different user accounts, different shares and lots of other stuff that probably doesn't make sense haha

Probably something stupid I am doing wrong, as to be honest this is all above my head.

Any tips or answers will be greatly appreciated.
 

Alan

New member
Feb 2, 2013
43
0
0
Jackpot!!!!!!

Bloody answer was right infront of me the whole time in tuxens last post

Don't use ; \ at the end its part of the script explained in post #1
feel so stupid now that i spent an hour trying to sort this out, and it turns out i havent copied all the code:mad:

looks so obvious now that i know whats was wrong.

Thanks anyway!
 

Alan

New member
Feb 2, 2013
43
0
0
Thanks Bullsboy, i noticed about 10 seconds after hitting the post button!
 

Alan

New member
Feb 2, 2013
43
0
0
Well i updated to the new openelec today and had no luck with the built in gui, thats what got me back onto doing it this way.

The problem i was having with the built in option was under the field named 'mount' i assumed this was the location i wanted the mount to be, but if i entered a file path i.e. storage/nas it would delete the / and leave storagenas, and tbh thats as far as i went with it.