What's new

[TUTORIAL] Minidlna Media Server through debian-optware-mipsel

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

How this works for you?

  • Not working

    Votes: 0 0.0%

  • Total voters
    4

TeHashX

Very Senior Member
New site with updated guide



v1.1.4 here

ENTWARE version here http://forums.smallnetbuilder.com/showthread.php?t=14573
OPTWARE ARM version here http://forums.smallnetbuilder.com/showthread.php?t=16147

I setup chrooted debian from here, thanks @ryzhov_al and @RMerlin for all the work.
It's only 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 series.

Let's start

1 - Turn off Media server from router ui, insert an usb drive in to the router, should be formatted as ext2 or ext3, if your drive has a label, you have to replace sda1 with your label in all instances in this guide

2 - Install Asus Download Master to activate optware environment, uninstall or disable after if you don't need it, if you need a better download manager use transmission instead

3 - Enable jffs partition (skip to point 5 if was previously enabled)

4 - Reboot router

5 - Open terminal and input the next commands:
Code:
ipkg update
ipkg upgrade
ipkg install findutils nano wget-ssl
Code:
cd /mnt/[COLOR="Red"][B]sda1[/B][/COLOR]/
6 - Download prepared debian with all necesary libs and decompress
Code:
/opt/bin/wget -c -O debian-minidlna-1.1.3-2.tgz http://goo.gl/RM1YaV --no-check-certificate
tar -xvzf ./debian-minidlna-1.1.3-2.tgz
7 - 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
Code:
/opt/bin/wget -c -O /opt/etc/init.d/S99debian http://goo.gl/F4OqIq --no-check-certificate
chmod a+rx /opt/etc/init.d/S99debian
8 - 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
Code:
/opt/bin/wget -c -O /opt/etc/chroot-services.list http://goo.gl/oaH4ev --no-check-certificate
chmod a+rx /opt/etc/chroot-services.list
9 - Now create this two scripts to start-stop debian together with all other services
Code:
echo "#!/bin/sh" > /jffs/scripts/services-start
echo ""  >> /jffs/scripts/services-start
echo "sleep 10"  >> /jffs/scripts/services-start
echo "/opt/etc/init.d/S99debian start" >> /jffs/scripts/services-start
chmod a+rx /jffs/scripts/services-start
Code:
echo "#!/bin/sh" > /jffs/scripts/services-stop
echo ""  >> /jffs/scripts/services-stop
echo "/opt/etc/init.d/S99debian stop" >> /jffs/scripts/services-stop
chmod a+rx /jffs/scripts/services-stop
10 - Reboot router
Code:
reboot
11 - Go to 192.168.1.1:8200 (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 7 carefully

6f8nlh.png


If you want to enter chrooted debian to install other packages or to modify some options, use this commands:
Code:
mount -o bind /dev/ /mnt/[COLOR="Red"]sda1[/COLOR]/debian/dev/
mount -o bind /proc/ /mnt/[COLOR="red"]sda1[/COLOR]/debian/proc/
mount -o bind /sys/ /mnt/[COLOR="red"]sda1[/COLOR]/debian/sys/
chroot /mnt/[COLOR="red"]sda1[/COLOR]/debian /bin/bash
To exit, just type
Code:
exit
 
Last edited:
Example of thumbnails on my tv

wvwyg5.jpg


If you just want to update from v.1.1.2 follow this instructions http://forums.smallnetbuilder.com/showpost.php?p=109613&postcount=29

1.1.3 - Released 05-June-2014
--------------------------------
- Enhance log level settings.
- Fix Samsung browsing when root_container is set.
- Add Clang compiling support.
- Fix compiling on systems without iconv.
- Add merge_media_dirs option, to revert to the old behavior.
- Add Asus O!Play client support.
- Fix Broken SSDP multicast membership addition.
- Fix crash bug with an emtpy filter argument.
- Accept SMI subtitles in addition to SRT.
- Add BubbleUPnP detection and enable subtitle support.
- Allow the user to specify an arbitrary root container.
- Add libavcodec > 54 / libav 10 compatibility.
- Get embedded cover art from video files with recent libavformat versions.
- Disable Samsung DCM10 capability, as it breaks compatibility with new models.
- Add subtitle support for NetFront™ Living Connect middleware-based clients.

1.1.2 - Released 06-Mar-2014
--------------------------------
- Show client status on our basic presentation page.
- Add a new force_sort_criteria option, to globally override the SortCriteria value sent by the client.
- Fix a couple resource leaks.
- Add configuration include file support.
- Support DLNA/UPnP-AV searches issued by clients using the Grilo framework.
- Fix some clients playing artwork instead of movie.
- Fix bookmarks on Samsung Series E clients.
- Add an extra folder level if there are multiple media locations.
- Fix some multicast membership issues with changing network settings.
- Make max number of children (connections) configurable.
- Fix choppy playback with some file types on Panasonic clients by increasing the max connection limit.
 
Last edited:
It's up to you, I recommend entware because it's more up to date, @ryzhov_al is doing a great job there.
 
ENTWARE version here http://forums.smallnetbuilder.com/showthread.php?t=14573

I setup chrooted debian from here, thanks @ryzhov_al and @RMerlin for all the work.
It's only 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 series. [...]


Hello,TeHashX
Thank you very much for this optware version!
I'll test it on my RT-N16 as soon as I get a moment and then will report
Joao
 
Last edited:
When i'm trying to use:
Code:
chroot /mnt/sda1/debian /bin/bash

I get this:
Code:
chroot: can't execute '/bin/bash': Exec format error

i used the mount commands etc. changed to my label
 
When i'm trying to use:
Code:
chroot /mnt/sda1/debian /bin/bash

I get this:
Code:
chroot: can't execute '/bin/bash': Exec format error

i used the mount commands etc. changed to my label

Post here output from:
uname -a
mount
 
lol.. probably not possible on rt-ac68u ?XD

uname -a:
Code:
Linux RT-AC68U 2.6.36.4brcmarm #1 SMP PREEMPT Fri Jan 31 00:26:57 EST 2014 armv7l GNU/Linux
mount:
Code:
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=127720k,nr_inodes=31930,mode=755)
proc on /proc type proc (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mtdblock5 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda5 on /tmp/mnt/sda5 type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)
devtmpfs on /tmp/mnt/sda5/debian/dev type devtmpfs (rw,relatime,size=127720k,nr_inodes=31930,mode=755)
proc on /tmp/mnt/sda5/debian/proc type proc (rw,relatime)
sysfs on /tmp/mnt/sda5/debian/sys type sysfs (rw,relatime)
devtmpfs on /tmp/mnt/sda5/debian/dev type devtmpfs (rw,relatime,size=127720k,nr_inodes=31930,mode=755)
proc on /tmp/mnt/sda5/debian/proc type proc (rw,relatime)
sysfs on /tmp/mnt/sda5/debian/sys type sysfs (rw,relatime)
devtmpfs on /tmp/mnt/sda5/debian/dev type devtmpfs (rw,relatime,size=127720k,nr_inodes=31930,mode=755)
 
Last edited:
v1.1.3

Hi, I just updated to v1.1.3, enjoy

1.1.3 - Released 05-June-2014
--------------------------------
- Enhance log level settings.
- Fix Samsung browsing when root_container is set.
- Add Clang compiling support.
- Fix compiling on systems without iconv.
- Add merge_media_dirs option, to revert to the old behavior.
- Add Asus O!Play client support.
- Fix Broken SSDP multicast membership addition.
- Fix crash bug with an emtpy filter argument.
- Accept SMI subtitles in addition to SRT.
- Add BubbleUPnP detection and enable subtitle support.
- Allow the user to specify an arbitrary root container.
- Add libavcodec > 54 / libav 10 compatibility.
- Get embedded cover art from video files with recent libavformat versions.
- Disable Samsung DCM10 capability, as it breaks compatibility with new models.
- Add subtitle support for NetFront™ Living Connect middleware-based clients.
 
I believe there is a problem with the links to the start-stop script and the service-list.
 
Last edited:

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top