Apt-get update error "Unable to locate package apt-transport-https"

Don’t make things harder than they need to be…

/mnt/Video -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=3.0 ://192.168.1.223/Video
/mnt/Audio -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=3.0 ://192.168.1.223/Audio

And BTW make sure that your Movies and TV shows are in seperate folders where one is not nested inside the other or you will have lots of issues trying to build a library.

Hi darwindesign,

Changed the share name to Videos.

ls -lah /mnt/FBLAPTOP2/Videos
ls: cannot open directory /mnt/FBLAPTOP2/Videos: No such file or directory

Regards,

fbagnato

And if you instead try the entirety of what I posted?

same result

mkdir /mnt/FBLAPTOP2
mkdir: cannot create directory ‘/mnt/FBLAPTOP2’: File exists
osmc@AppleTVBox:~$ mkdir /mnt/FBLAPTOP2/Videos
mkdir: cannot create directory ‘/mnt/FBLAPTOP2/Videos’: Permission denied

Did you make the credentials file?

yes

mkdir /mnt/FBLAPTOP2
mkdir: cannot create directory ‘/mnt/FBLAPTOP2’: File exists
osmc@AppleTVBox:~$ mkdir /mnt/FBLAPTOP2/Videos
mkdir: cannot create directory ‘/mnt/FBLAPTOP2/Videos’: Permission denied

ls /mnt
FBLAPTOP2 Video

This is strange, there are 2 folders in the mnt folder, FBLAPTOP2 and Video

sudo rmdir /mnt/*

sudo rm /mnt/*
rm: cannot remove ‘/mnt/FBLAPTOP2’: Is a directory
rm: cannot remove ‘/mnt/Video’: Is a directory

Its a shamozzle. Don’t know how those entries have been separated

I edited my post to fix the mistakes I made with what I posted for the auto.smb.shares file. Try that one as is again. I also updated the post on how to remove folders with a correct command.

I tested it and it is working for me…

osmc@VeroV:~$ cat /etc/auto.master
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
#/misc  /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
#       "nosuid" and "nodev" options unless the "suid" and "dev"
#       options are explicitly given.
#
#/net   -hosts
#
# Include /etc/auto.master.d/*.autofs
# To add an extra map using this mechanism you will need to add
# two configuration items - one /etc/auto.master.d/extra.autofs file
# (using the same line format as the auto.master file)
# and a separate mount map (e.g. /etc/auto.extra or an auto.extra NIS map)
# that is referred to by the extra.autofs file.
#
+dir:/etc/auto.master.d
#
# If you have fedfs set up and the related binaries, either
# built as part of autofs or installed from another package,
# uncomment this line to use the fedfs program map to access
# your fedfs mounts.
#/nfs4  /usr/sbin/fedfs-map-nfs4 nobind
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
/- /etc/auto.smb.shares --timeout 15 browse
osmc@VeroV:~$ cat /etc/auto.smb.shares
/mnt/Video -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=3.0 ://192.168.254.201/Video
osmc@VeroV:~$ cat /home/osmc/.smbcredentials
username=User Name
password=Password
osmc@VeroV:~$ ls -la /mnt/Video/
total 1284
drwxr-xr-x 2 osmc osmc 262144 Aug  6 18:30  .
drwxr-xr-x 3 root root   4096 Aug  8 12:18  ..
-rwxr-xr-x 1 osmc osmc   8643 Dec  7  2022 'Kodi Utilites V1.6.bat'
drwxr-xr-x 2 osmc osmc      0 Aug  6 23:22  Misc
drwxr-xr-x 2 osmc osmc      0 Jun 14 20:24  Movie
drwxr-xr-x 2 osmc osmc      0 Aug  6 22:25 'Movie 2'
drwxr-xr-x 2 osmc osmc      0 Aug  3 14:54 'Movie 4k'
drwxr-xr-x 2 osmc osmc      0 Aug  7 19:39  MoviesetArtwork
drwxr-xr-x 2 osmc osmc      0 Jan 14  2022 'Music Video'
drwxr-xr-x 2 osmc osmc      0 Aug  3 16:37 'TV 2'
drwxr-xr-x 2 osmc osmc      0 Jun 15 13:23 'TV 4k'
drwxr-xr-x 2 osmc osmc      0 Aug  8 10:32 'TV show'
-rwxr-xr-x 1 osmc osmc 702976 Aug  6 18:30  sync.ffs_db
osmc@VeroV:~$

My /etc/auto.smb.shares

/mnt/Videos/ -fstype=cifs,r,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=3.0 ://192.168.1.223/Videos

My /etc/auto.master (Don’t know why this is formatting large font, just ignore)

> #
> # Sample auto.master file
> # This is an automounter map and it has the following format
> # key [ -mount-options-separated-by-comma ] location
> # For details of the format look at autofs(5).
> #
> #/misc  /etc/auto.misc
> #
> # NOTE: mounts done from a hosts map will be mounted with the
> #       "nosuid" and "nodev" options unless the "suid" and "dev"
> #       options are explicitly given.
> #
> #/net   -hosts
> #
> # Include /etc/auto.master.d/*.autofs
> #
> +dir:/etc/auto.master.d
> #
> # Include central master map if it can be found using
> # nsswitch sources.
> #
> # Note that if there are entries for /net or /misc (as
> # above) in the included master map any keys that are the
> # same will not be seen as the first read key seen takes
> # precedence.
> #
> +auto.master
> /- /etc/auto.smb.shares --timeout 15 browse

My /home/osmc/.smbcredentials

> username=osmc
> password=osmc
ls -la /mnt/Videos/

> ls: cannot access /mnt/Videos/: No such file or directory

But,

ls /mnt/FBLAPTOP2/
> Videos

You had already posted this ^^^ showing you have two shares that are “Video” and “Audio”. Why do you keep trying to mount a share that does not exist?

Again, I updated my post to fix the errors from what I original had. It should be…

/mnt/Video -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=3.0 ://192.168.1.223/Video
/mnt/Audio -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=3.0 ://192.168.1.223/Audio

This should contain credentials from a user account in Windows that has permissions for these shares. Are you saying that you created a User in Windows called “osmc” and set a password for that account to “osmc”?

Hello darwindesign,

Sorry for being such a pain. I did follow the instructions in that webpage.

You had already posted this ^^^ showing you have two shares that are “Video” and “Audio”. Why do you keep trying to mount a share that does not exist?

The name is Videos. I may have changed it. So smbclient -m SMB3 -U=osmc -L 192.168.1.223 outputs the following:

smbclient -m SMB3 -U=osmc -L 192.168.1.223
Enter osmc’s password:
Domain=[FBLAPTOP2] OS= Server=

    Sharename       Type      Comment
    ---------       ----      -------
    ADMIN$          Disk      Remote Admin
    Audio           Disk
    C$              Disk      Default share
    E$              Disk      Default share
    G$              Disk      Default share
    IPC$            IPC       Remote IPC
    Logs            Disk
    Movies & Other Video Disk
    Videos          Disk

Connection to 192.168.1.223 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
NetBIOS over TCP disabled – no workgroup available

Again, I updated my post to fix the errors from what I original had. It should be…

/mnt/Video -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=3.0 ://192.168.1.223/Video

This is what I have except that Video is Videos. All the rest is the same.

This should contain credentials from a user account in Windows that has permissions for these shares. Are you saying that you created a User in Windows called “osmc” and set a password for that account to “osmc”?

Yes for testing I have just made the password osmc to be changed once it is working.

I don’t understand why it isn’t working. Seems simple to do however it is not working.

Very confused.

Regards,

fbagnato

Are you sure because what you posted before last also had an extra forward slash and just “r” instead of “rw”. Mine didn’t work without those changes. It made the mount folder but you couldn’t access it like what your seeing. Since you said it is working in Kodi I think it is safe to assume that it isn’t an issue with the share assuming your using the same network path and credentials in Kodi as you are in the autofs files. You might try stopping the service, remove any folders in /mnt, then run that troubleshooting command listed in the guide to see if it provides any clues.

Yep, Just carefully checked it against your entry and besides Video = Videos it is identical.

Since you said it is working in Kodi I think it is safe to assume that it isn’t an issue with the share assuming your using the same network path and credentials in Kodi as you are in the autofs files.

Samba is working in Kodi, I haven’t done anything with autofs in Kodi.

Is it because it automatically mounts as it gets use? Wouldn’t an ls command “wake up” automount?

You might try stopping the service, remove any folders in /mnt, then run that troubleshooting command listed in the guide to see if it provides any clues.

Did this, the output on the second window where “ls -lah /mnt/Videos” is run states:

ls: cannot open directory /mnt/Videos: No such file or directory

However if I “ls /mnt” the Videos folder is there, doesn’t make sense.

In the first window the doco instructs to stop autofs which I did then run “sudo automount -f -v -d” which I did.

The following is the first output of the command:

$ sudo automount -f -v -d
Starting automounter version 5.0.8, master map /etc/auto.master
using kernel protocol version 5.02
lookup_nss_read_master: reading master file /etc/auto.master
parse_init: parse(sun): init gathered global options: (null)
spawn_mount: mtab link detected, passing -n to mount
spawn_umount: mtab link detected, passing -n to mount
lookup_read_master: lookup(file): read entry +dir:/etc/auto.master.d
lookup_nss_read_master: reading master dir /etc/auto.master.d
lookup(dir): dir map /etc/auto.master.d missing or not readable
lookup(file): failed to read included master map dir:/etc/auto.master.d
lookup_read_master: lookup(file): read entry +auto.master
lookup_nss_read_master: reading master files auto.master
parse_init: parse(sun): init gathered global options: (null)
lookup(file): failed to read included master map auto.master
lookup_read_master: lookup(file): read entry /-
master_do_mount: mounting /-
automount_path_to_fifo: fifo name /var/run/autofs.fifo–
lookup_nss_read_map: reading map file /etc/auto.smb.shares
parse_init: parse(sun): init gathered global options: (null)
spawn_mount: mtab link detected, passing -n to mount
spawn_umount: mtab link detected, passing -n to mount
mounted direct on /mnt/Logs/ with timeout 15, freq 4 seconds
do_mount_autofs_direct: mounted trigger /mnt/Logs/
mounted direct on /mnt/Videos with timeout 15, freq 4 seconds
do_mount_autofs_direct: mounted trigger /mnt/Videos
st_ready: st_ready(): state = 0 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 3063937856 path /-
expire_cleanup: got thid 3063937856 path /- stat 0
expire_cleanup: sigchld: exp 3063937856 finished, switching from 2 to 1

It then repeats endlessly:

st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 3063937856 path /-
expire_cleanup: got thid 3063937856 path /- stat 0
expire_cleanup: sigchld: exp 3063937856 finished, switching from 2 to 1

When I Ctrl-C the following lines are displayed after the above repeating lines:

st_shutdown: state 5 path /-
umount_multi: path /mnt/Logs/ incl 0
umounted direct mount /mnt/Logs/
umount_multi: path /mnt/Videos incl 0
umounted direct mount /mnt/Videos
automount_path_to_fifo: fifo name /var/run/autofs.fifo–
shut down path /-
autofs stopped

The Apple box just rebooted itself so I tried the commands

ls /mnt

Logs Videos

(Logs is a test folder I shared in my Windows Laptop, not the USB Enclosure)

I then tried ls -lah /mnt/Logs

total 8.0K
dr-xr-xr-x 2 root root 4.0K Aug 9 17:29 .
drwxr-xr-x 4 root root 4.0K Aug 9 20:14 …

And ls -lah /mnt/Videos

total 8.0K
dr-xr-xr-x 2 root root 4.0K Aug 9 05:01 .
drwxr-xr-x 4 root root 4.0K Aug 9 20:14 …

It’s not saying they don’t exist but ls thinks those folders are empty which they are not.

This is the result without the autofs service being started.

Regards,

fbagnato

Did you open a second SSH window and run ls /mnt/Videos while you were running sudo automount -f -v -d? Only that would trigger a mounting of the file system.

Hi fzinken,

Did you open a second SSH window and run ls /mnt/Videos while you were running sudo automount -f -v -d?

Yes I did. All I got was

ls: cannot access /mnt/Videos/: No such file or directory

But what did you get in the window where you have automount running?
You would then normally see something like

handle_packet_missing_direct: token 9, name /mnt/Videos, request pid 30352
attempting to mount entry /mnt/Videos