OSMC + fstab not working

EDIT: SOLVED BY CORRECTING A TYPO IN /etc/fstab

I have Raspberry Pi 3 model B which is connected to my Windows 10 PC via network router. I have used KODI in my PC as a UPnP server to watch movies at my living room from KODI installed to my Raspberry Pi 3 model B. Here is the specifications to my systems:

Raspberry Pi 3 model B
Running: OSMC 18.3
Compiled: 2019-07-04
IP address: 192.168.1.106

Windows 10 Pro PC
Running: Kodi 18.4
Compiled: 2019-09-01
My PC name in Windows Homegroup / file sharing: KADNDESKTOP
KODI UPnP server name: Kadn PC
IP address: 192.168.1.101

SETTING UP UPnP:

I have set my media via

Settings > Media > From ‘Library’ tab ‘Videos…’ > Add videos… > Browse > UPnP devices > Kadn PC > Video Library > ‘Movies’ folder > ‘Titles’ folder > OK

It has come to my knowledge that the Library function in OSMC does not work if one uses UPnP to browse media from PC like I do. Although I am able to see and watch all my shared media from my PC, I would like to see the Library function to work as it should be in way that it would show me all the cover art and other fancy meta data stuff in the menu view. Now do not be confused as I am able to see all the meta data linked to the movie files in

main menu > Movies > ‘Enter files section’ > ‘Movies’

There is all I need for showing some cover art, plot ect. but the ‘Library’ function does not work (seeing this information in the menu).

The way I got it working was to connect my OSMC to my PC via Samba (SMB). This I achieved via

Settings > Media > From ‘Library’ tab ‘Videos…’ > Add videos… > Browse > Windows network (SMB) > WORKGROUP > KADNDESKTOP

From there I will first select folder ‘Movies’ which contains all my movies in

‘Movie name (year) / test_movie.mkv’

folder hierarchy. For ‘Movies’ folder I set it to contain movies. Then I do this again for my PC folder ‘TV_series’, which contains all my TV series in

‘TV serie name / Season XX / test_serie_S01E01.mkv’

folder hierarchy. For this folder I naturally set it to contain ‘TV shows’. All the meta data needed (NFO’s ect) are as they should be. The naming is done just as the instructions tell me to do

Now the Library function works as it should work; all the fancy cover arts are straight in the ‘main menu’ from ‘Movies’ or ‘TV shows’. The problem is when I try to watch videos with high file size (10 GB+), OSMC starts to buffer video and the whole thing is unwatchable as it stops and buffers again every 10-20 seconds. This problem DOES NOT EXIST when I am using UPnP to stream videos to my OSMC from my Windows PC. Then again I lose the Library function with UPnP.

It has come to my knowledge that setting Samba (SMB) via fstab would do the job so that I would get my library working and still get the speed I need to watch videos without annoying buffering or any other disturbance. I have followed these instructions (Configuring fstab based Samba share mounts) to set up Samba (SMB) to works the “fstab way”.

  1. I open ‘Putty’ from my Windows PC to connect to OSMC via SSH. I use IP address 192.168.1.106 and user name osmc and password osmc. It connects (log in is success).

  2. I write

sudo nano /etc/fstab

and press ENTER. fstab opens with following info:

GNU nano 2.7.4 File: /etc/fstab

/dev/mmcblk0p1 /boot vfat defaults,noatime,noauto,x-systemd.automount 0 0
#rootfs is not mounted in fstab as we do it via initramfs. Uncomment for remount (slower boot)
#/dev/mmcblk0p2 / ext4 defaults,noatime 0 0

  1. I go to the bottom line and write

//192.168.1.101/Movies /mnt/Movies cifs x-systemd.automount,noauto,rw,iocharset=utf8,username=John\040Doe,password=test123,uid=osmc,gid=osmc,file_mode=0770,dir_mode=0770, vers=3.0 0 0

all the spaces are made with just one (1) spacebar. My Windows PC username is ‘John Doe’ and I can use John Doe as I name to grant rights concerning file sharing in my Windows PC. I add one empty line with ENTER and press Ctrl + X to exit and (Y) to save the modified buffer. Filename to write is

/etc/fstab

Then I press ENTER.

  1. I am brought back to the osmc@osmc:~$ in which I write

sudo mount -a

Nothing happenesš. The instructions say

You should just get a new prompt back. If you get any errors looks again at your /etc/fstab for the errors

but I have no response ²

sudo_mount_a

I then try

sudo systemctl daemon-reload
sudo systemctl restart remote-fs.target

and have no responseÂł

sudo2

Now, according to the instructions, my shares should just work. I will test it by writing

cd /mnt/Movies

which gives me

sudo3

Now I can not see any shared files in my OSMC KODI, when I try to add source via

Browse > Root filesystem > /mnt

I see the ‘Movies’ there (with some old Movie_files, movie_files ect. tryouts) but I am unable to press it. If I press it, nothing happens. If I try to press one of my older tryouts like ‘Movie_files’, it will open as empty.

  1. I once go to SSH and write

sudo mount /mnt/Movies

there comes

kodi4

I see error(s) and I will do as asked: post my logs to the forum (the link contains my password so I will copy & paste it into new .txt without changing anything else).

MY LOG FILE

Any ideas how to get things going as they should?

¹ Nothing happened anyway. I was using Putty and fstab worked eventhough I didn’t gt any response.

² No response even thoug the instructions worked after all.

Âł Worked anyway even though nothing seemed to happen. Perhaps because of I was using Putty

Well this is correct, but in your fstab you forgot the =
Also did you created the folder /mnt/Movies?

There should not be a space between 0770, and vers=3.0

The most peculiar thing is that after I made the correction to the typo you mentioned and wrote again

sudo systemctl daemon-reload
sudo systemctl restart remote-fs.target

it started to work. The thing is that I copied this “help me” post from my old settings where was no typos so it should have worked earlier today but it didn’t.

Thanks anyway. I guess that the lesson today was that every character matters. Now the problem is (I guess) gone as my librarys work and there was no buffering in large files.

1 Like

I did not create a folder

/mnt/Movies

At least I intended not to create one.

What comes to the space bar between

0770, vers=3.0

as it should be

0770,vers=3.0

There is no space bar in my file functioning, but thanks for taking the to notice it.

Regarding the folder you normally must create one before before fstab can mount something to it. I’m still learning this myself but I think with that particular mount you made systemd.automount it taking care of that for you.

Regarding the space I pointed out, you had that error in your post. What you had in your log did not match your post. I figured that it was worth pointing out in case you or someone else were to try and use that as a reference as that space would cause problems just like the missing = does. Unless your asking why the space is a problem, in which case the answer is because the space tells fstab your done giving it options and the next thing it is looking for is either a 0 or a 1.