Posts: 1
Joined: Mon Jun 06, 2016 3:08 pm

miniDLNA on Jessie

Mon Jun 06, 2016 3:17 pm

I am running a Pi 2 with Jessie 4.4.11-v7+ and minidlnad Version 1.1.2. I am having small issue, which I believe to be a bug, that I cannot seem to fix. All the files the minidlna server serves are on a USB HDD that mounts through fstab. The drive is set up for a file system check (pass num 2), which is run during boot up. I believe the issue with minidlna is that it starts before the drive is finished mounting/being checked and so the server does not start properly, i.e., I cannot look at the server stats at ip:8200 and cannot see the server on the network. However, if I log into the Pi and simply run minidlnad, the server comes up instantly. I should also not that I have the Pi set to a static IP through the /etc/dhcpcd.conf file. Wasn't sure exactly where to post this issue, but I hope someone can help.


Posts: 364
Joined: Tue Oct 14, 2014 5:21 pm

Re: miniDLNA on Jessie

Mon Jun 06, 2016 9:01 pm

this is probably a "daemon" or a background service that is started by systemd. you can either have the service depend on another late starting service or use a timer and have it start at some seconds after boot, for example. more in "man systemd.timer" -> OnBootSec= / OnStartupSec=

see this thread also: ... ip-adress/

Posts: 137
Joined: Tue Dec 18, 2012 10:34 am

Re: miniDLNA on Jessie

Wed Jun 08, 2016 8:41 am

You could insert a delay in the minidlna systemd unit file as tpylkko suggests but the solution I adopted in a similar scenario was to mount the USB drive via systemd see (for example) ... partition/.

The minidlna systemd unit file will then need to have a "Requires=" line to wait until the USB drive has mounted. So, for example, my USB drive mounts at /data so its systemd unit file is called data.mount and the minidlna systemd unit file has a line stating "Requires=data.mount".

Have fun


Edit: Oops, you should also have an "After=" directive, so for my example "After=data.mount"

Posts: 1
Joined: Thu Jul 07, 2016 6:59 pm

Re: miniDLNA on Jessie

Thu Jul 07, 2016 7:02 pm


I have the same problem on boot with minidlna and the mounting of the drive the media is on.
However I cannot find the service-file for making the changes in to delay the boot. Can you please give me a pointer of where to add the "requires=" etc?

Thank you!


Posts: 1
Joined: Sat Sep 30, 2017 10:34 am

Re: miniDLNA on Jessie

Sat Sep 30, 2017 11:38 am

Hi, I have the same kind of problem. I have a Rasp PI3, with Jessi installed + minidlna. The USB disk takes time to be mounted at boot. I don't understand how to delay the launch od minidlna at the boot or at least make it restart xx seconds after the boot.

My USB disk is mounted on /dev/sda1

osmc@osmc:/run/systemd/generator.late$ sudo blkid
/dev/mmcblk0p1: UUID="D3CD-FE10" TYPE="vfat" PARTUUID="c27376fa-01"
/dev/mmcblk0p2: UUID="357a118c-07e2-4633-92c5-0580eccbd285" TYPE="ext4" PARTUUID="c27376fa-02"
/dev/sda1: LABEL="My Passport" UUID="8A2CF4F62CF4DE5F" TYPE="ntfs" PARTUUID="00042ada-01"
/dev/mmcblk0: PTUUID="c27376fa" PTTYPE="dos"

I have checked the thread about minidlna.service but there are several minidlna.service : witch one to change, what command to put into the file?

osmc@osmc:/run/systemd/generator.late$ sudo find / -iname minidlna.service

osmc@osmc:/run/systemd/generator.late$osmc@osmc:/run/systemd/generator.late$ cat minidlna.service
# Automatically generated by systemd-sysv-generator

Description=LSB: Start minidlna at boot time

ExecStart=/etc/init.d/minidlna start
ExecStop=/etc/init.d/minidlna stop

can you help me ?

Thks !

Return to “General discussion”