Minidlna Media Server through Debian Entware

This guide is obsolete now, use this one instead

This is for mipsel devices, like RT-N16, RT-N66U/R, RT-AC66U/R
Advantages: easy to update without waiting for asus, easy to apply patches, very stable with zero crashes at least for me on RT-AC66U, I enabled movie thumbnails with filmstrip (will take a little bit longer to scan db) and bookmarks for resuming videos on samsung E & F series.
Let's start
0 - Install one of Merlin's firmware from here
1 - Turn off Media server from router ui and insert an usb drive in to the router, should be formatted as ext2 or ext3
2 - Setup entware from this guide

3 - Open terminal and input the next command:

cd /opt

4 - Download prepared debian with all necesary libs and decompress

wget -c -O debian-minidlna-1.1.4-2.tgz
tar -xvzf ./debian-minidlna-1.1.4-2.tgz

5 - Download start-stop script, in this script is a path EXT_DIR to your media folder witch will be mounted in debian as /mnt, mine is /mnt/sda1/Media and if your disk has a label change sda1 from CHROOT_DIR with your disk label, modify the script to match your settings with vi or nano editor, use this command nano /opt/etc/init.d/S99debian

wget -c -O /opt/etc/init.d/S99debian
chmod a+rx /opt/etc/init.d/S99debian
opkg install nano

6 - Download services-list that will run in chrooted debian, for now is only minidlna but if you want to install another packages in debian like transmission-daemon, you need to add transmission start-stop script name, ex. S50transmission

wget -c -O /opt/etc/chroot-services.list
chmod a+rx /opt/etc/chroot-services.list

7 - Reboot router


8 - Go to (this is the default router ip, modify to your router ip if you change it previously) and see how minidlna is creating db, press refresh on your browser for progress.
If all numbers are 0 (zero) after some time, you forget to set the right path to your media folder, read again point 5 carefully


9 - If you want to enter chrooted debian to install other packages or to modify some options, use this commands:

mount -o bind /dev/ /opt/debian/dev/
mount -o bind /proc/ /opt/debian/proc/
mount -o bind /sys/ /opt/debian/sys/
chroot /opt/debian /bin/bash

To exit, just type


To update from a previous version follow this steps:

1. Stop minidlna

/opt/etc/init.d/S99debian stop

2. Download latest version:

wget -c -O /opt/debian/var/tmp/minidlna_1.1.4-2_mipsel.deb
wget -c -O /opt/debian/var/tmp/minidlna.conf

3. Enter chrooted debian

mount -o bind /dev/ /opt/debian/dev/
mount -o bind /proc/ /opt/debian/proc/
mount -o bind /sys/ /opt/debian/sys/
chroot /opt/debian /bin/bash

4. Input next commands:

dpkg -r minidlna
rm -r /opt/minidlna
cd /var/tmp
cp -r minidlna.conf /etc
chmod 777 /etc/minidlna.conf
dpkg -i minidlna_1.1.4-2_mipsel.deb

5. Exit debian


6. Start minidlna

/opt/etc/init.d/S99debian start

7. Enjoy your media :)

To completely uninstall chrooted debian:
1. Stop minidlna

/opt/etc/init.d/S99debian stop

2. Verify if external folder is not mounted, output should be empty, if not - stop again.

Very important!!! If continue and external folder is mounted, all media files inside will be deleted.

ls -l /opt/debian/mnt
/opt/etc/init.d/S99debian stop

3. Delete debian folder

rm -r /opt/debian

4. Delete debian startup script

rm /opt/etc/init.d/S99debian

5. Delete chrooted services list

rm /opt/etc/chroot-services.list

This is how it looks like on my Samsung TV



User Review
0 (0 votes)