Plex Media Server on AsusWRT Arm Routers

Works only on arm routers like RT-AC56U, RT-AC68U, RT-AC87U, RT-AC3200, RT-AC5300...

No transcoding capabilities, just direct play on supported devices, like LG, Samsung TVs, Plex Android App...

Tested on RT-AC68U rev A2, RMerlin firmware v380.57, hdd usb3, Optware-NG & Entware-NG
Latest working version is 0.9.16.6, Plex no longer support ARMv5 used in this tutorial... 

1 - Flash Rmerlin firmware from here

2a - Install Optware-NG from here and choose 2GB swap file

Install necessary packages

ipkg install nano findutils

or

2b - Install Entware-NG from here and choose 2GB swap file

Install necessary packages

opkg install nano findutils

3 - Setup Debian Jessie from here

4 - Enter chrooted debian with:

debian enter

5 - Update Debian

apt update && apt upgrade -y

6 - Install necessary packages

apt install wget zip bzip2 libexpat1 -y

- Download and install Plex Media Server

mkdir -p /apps && cd /apps
wget -c -O PlexMediaServer-0.9.16.6.1993-5089475.tar.bz2 http://goo.gl/ZzmVmO
bzip2 -cd PlexMediaServer-0.9.16.6.1993-5089475.tar.bz2 | tar -xv
mv ./PlexMediaServer-0.9.16.6.1993-5089475 ./plex && rm ./PlexMediaServer-0.9.16.6.1993-5089475.tar.bz2

- Fix library path and start script

sed -i 's|ulimit.*|export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/var/lib/plexmediaserver"\n&|g' /apps/plex/start.sh
sed -i 's|.\/Plex\\ Media\\ Server|\/apps\/plex\/Plex\\ Media\\ Server|g' "/apps/plex/start.sh"

- Fix permissions of lib files

cd /apps/plex
find . -iname "*.so" -exec chmod 644 {} \;
find . -iname "*.so.*" -exec chmod 644 {} \;

10 - Create startup script

cat >> /etc/init.d/plexmediaserver << 'EOF'
#!/bin/sh
### BEGIN INIT INFO
# Provides: plexmediaserver
# Required-Start: $remote_fs $syslog $networking
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Plex Media Server
# Description: Plex Media Server for Linux,
# More information at http://www.plexapp.com
# Many thanks to the great PlexApp team for their wonderfull job !
# Author: Cedric Quillevere / origin@killy.net
# Rewamped Christian Svedin / christian.svedin@gmail.com
# Version: 1.2
### END INIT INFO
test -f "/apps/plex/start.sh" || exit 0
plex_running=`ps ax | grep "Plex Media Server" | awk '{ print $1 }' | wc -l`
case "$1" in
start)
if [ "$plex_running" -gt 1 ]; then
echo "Plex already running..."
exit 0
fi
echo -n "Starting Plex Media Server: "
/apps/plex/start.sh & >/dev/null 2>&1
sleep 1
echo "done"
;;
stop)
if [ "$plex_running" -eq 1 ]; then
echo "Plex Media Server is not running (no process found)..."
exit 0
fi
echo -n "Killing Plex Media Server: "
# Trying to kill the Plex Media Server itself but also the Plug-ins
ps ax | grep "Plex Media Server" | awk '{ print $1 }' | xargs kill >/dev/null 2>&1
ps ax | grep "Plex*" | awk '{ print $1 }' | xargs kill >/dev/null 2>&1
sleep 1
echo "done"
;;
restart)
sh $0 stop
sh $0 start
;;
status)
if [ "$plex_running" -gt 1 ]; then
echo "Plex Media Server process running."
else
echo "It seems that Plex Media Server isn't running (no process found)."
fi
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
exit 0
EOF

Press ENTER

11 - Give right permission

chmod +x /etc/init.d/plexmediaserver

12 - Exit Debian

exit

13 - Add Plex to chrooted services list

echo "" >>/opt/etc/chroot-services.list
echo "plexmediaserver" >>/opt/etc/chroot-services.list
chmod 755 /opt/etc/chroot-services.list

14 - Start Plex from outside debian together with mounted external folder

debian restart

15 - Wait about 30 seconds then go to default router ip address and port :32400/web, like 192.168.1.1:32400/web or www.asusrouter.com:32400/web

plex-1

16 - Create a new library and point to /mnt as path, if you want to mount a samba share use this guide
plex-path
Enjoy...

To be continued with the rest of setup if requested by user...

 

How to Install the Plex Unsupported App Store

Enter chrooted debian

debian enter

Download and unzip unsupported app store

cd /apps/plex/Resources/Plug-ins*
wget http://dl.dropbox.com/u/15227710/UnSupportedAppstore.bundle.zip
unzip UnSupportedAppstore.bundle.zip && rm UnSupportedAppstore.bundle.zip
chown -R plex UnSupportedAppstore.bundle

Go to Plex webpage, click on Channels and install apps...

plex-unsupported-app-store
Sources: htpcguides.com, linksysinfo.org

  • Ky

    I followed the tutorial step by step 3 times (wiped the external drive after each try), but still no luck.

    Upon launching Plex, Settings -> Web shows Version 2.6.1. What am I doing wrong? I can access my other Plex server from http://192.168.29.1:32400/web/ but my router is not acting as a server. It seems like following the above steps resulted in installing version 2.6.1 Plex instead of the installing the last useable version 0.9.16.6. I am using RT-AC68U on Merlin 380.64_2 and Entware-NG with a 2GB Linux Swap Partition.

    Please help. Thank you kindly.

    • v0.9.16.6 is PlexMediaServer but 2.6.1 is web version
      You server was running before you restart it, if you can access it from http://192.168.29.1:32400/web/ it's ok, do you want access from wan or?

      • Ky

        Not sure what happened but after 6 hours, I tried login in again and the server tab became available. Thanks for your help.

        At lease the WAN server works. Still can't get remote (WAN) access working yet. Any tips on the WAN access problem?

      • You have to open port in /jffs/scripts/firewall-start script
        cat >> /jffs/scripts/firewall-start << 'EOF'
        #!/bin/sh
        iptables -I INPUT -p tcp --destination-port 32400 -j ACCEPT
        EOF

        Apply rule
        sh /jffs/scripts/firewall-start
        Go to plex settings / server /remote access and press Enable Remote Access, check "Manually specify public port" 32400 and press Apply

  • NoLifer

    Why I getting this error: "There was a problem playing this item" I can't play any movie from my library

  • NoLifer

    Now I have another question. How to add movies to library from sdb1?
    /dev/sda1 on /tmp/mnt/sda1 type ext4
    /dev/sdb1 on /tmp/mnt/sdb1 type tntfs
    On /opt/etc/init.d/S99debian I put EXT_DIR=/tmp/mnt/sdb1/Media/
    In Plex: Add folders to your library I choosed /tmp/mnt/sdb1, but library still empty

    • You can't mount ntfs partition but if ext2/3/4, inside debian will be /mnt not /tmp/mnt/sdb1

      • NoLifer

        Now I have:
        /dev/sda1 on /tmp/mnt/sda1 type ext4
        /dev/sdb1 on /tmp/mnt/sdb1 type ext4
        In debian EXT_DIR=/mnt/sdb1/Media/

        But library still empty, what I'm doing wrong?

    • cfjohnsn56

      I have a similar question. I have followed the instructions and have Plex up and running. All of my movies are on my laptop though so my library is completely empty.

      Is there a way of mapping the share that I created during the setup process on my local laptop to copy everything over (or vice versa)?

  • NoLifer

    Can you help me please. What I did wrong?

    admin@RT-AC87U-20D8:/tmp/mnt/sda1/entware-ng.arm# debian restart
    Chroot'ed services seems to be already stopped
    Starting chroot'ed Debian services...
    mount: mounting /dev on /tmp/mnt/sda1/optware-ng.arm/debian/dev failed: No such file or directory
    mount: mounting /proc on /tmp/mnt/sda1/optware-ng.arm/debian/proc failed: No such file or directory
    mount: mounting /sys on /tmp/mnt/sda1/optware-ng.arm/debian/sys failed: No such file or directory
    chroot: can't change root directory to /tmp/mnt/sda1/optware-ng.arm/debian: No such file or directory
    Done.

    • Post output from
      cat /opt/etc/init.
      d/S99debian | grep CHROOT_DIR=

      • NoLifer

        is it this one? CHROOT_DIR=/tmp/mnt/sda1/optware-ng.arm/debian Sorry, I'm new on this

      • 👌, I found your mistake, modify S99debian script from optware-ng.arm/debian to entware-ng.arm/debian :)

      • NoLifer

        I found my mistake, path should be entware.ng/ but I put optware/ Thank you for help

  • Eduardo

    In first place, thank you very much for this quality work. It's awesome.
    I've followed your guide twice but I'm unable to get plex media server autostart when the router boots.
    >/opt/etc/chroot-services.list present with only "plexmediaserver" inside
    >/opt/etc/chroot-services.list with 755 permissions
    >Entering "debian enter" and "/etc/init.d/plexmediaserver status" shows plex media server is stopped
    >Inside debian, using "/etc/init.d/plexmediaserver start" works perfect

    Any idea why this might be happening?

    Thanks in advance

    • You probably skip some step, did you created a 2GB swap file?

      • Eduardo

        I think I did, as installing optware-ng does itself. I remember clearly having selected the "2GB" option. How can I check for this? Thank you very much in advance

      • Type free in terminal

      • Eduardo

        It seems like yes, there's swap:

        administrator@ASUS-RT:/tmp/home/root# free
        total used free shared buffers
        Mem: 255700 200328 55372 0 2612
        -/+ buffers: 197716 57984
        Swap: 2097148 71972 2025176

      • Can I assist you through team viewer?
        Use chat or contact form https://www.hqt.ro/contact/

      • Eduardo

        Contact sent

  • runcajsz

    Plex server's General admin page inform me about a new version is available. Message says to upgrade it manually, but I don't know which versions should I use for my Asus RT-AC56U router. Plex official download page offers various install-able packages for linux and different router types. I guess what we downloaded from HQT site is a different one. Thanks for help!

    • TeHashX

      Latest working version is 0.9.16.6, Plex no longer support ARMv5 used in this tutorial...

  • Jose

    debian start shows:
    Starting chroot'ed Debian services...
    chroot: can't execute '/etc/init.d/plexmediaserver': No such file or directory
    Done.

    i dont know why :(

  • Toufiq Ibna Mustafiz

    help me to mount SMB [samba drive //192.168.1.73/pi/Movies ] into the debian. thanks

    • TeHashX

      I found a way to mount shares inside debian without modifying S99debian script, but I need some more time to test

      • Toufiq Ibna Mustafiz

        Super!!! Wait for your confirmation :)

      • TeHashX

        The simplest way is:

        1 - Enter debian
        debian enter
        2 - Install cifs-utils
        apt install cifs-utils
        3 - Make some mount directory (in your case is Movies)
        mkdir -p /mnt/Movies
        4 - Add to etc/fstab:
        //192.168.1.73/pi/Movies /mnt/Movies cifs user=shareusername,password=sharepassword,uid=1000,umask=000 0 0
        5 - Create /etc/init.d/cifs-mount with following content
        #! /bin/sh
        ### BEGIN INIT INFO
        # Provides: mount shares
        # Required-Start:
        # Required-Stop:
        # Default-Start:
        # Default-Stop: 6
        # Short-Description: Mount cifs shares.
        # Description:
        ### END INIT INFO

        PATH=/sbin:/usr/sbin:/bin:/usr/bin

        . /lib/lsb/init-functions

        do_stop () {
        log_action_msg "Umounting shares"
        umount -a
        }

        case "$1" in
        start)
        log_action_msg "Mounting shares"
        mount -a
        ;;
        restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
        stop)
        do_stop
        ;;
        status)
        exit 0
        ;;
        *)
        echo "Usage: $0 start|stop" >&2
        exit 3
        ;;
        esac

        6 - Set permission
        chmod +x /etc/init.d/cifs-mount
        7 - Verify mount
        /etc/init.d/cifs-mount start
        8 - Now should see you movies inside Movies folder
        ls /mnt/Movies
        9 - Exit debian
        Add cifs-mount to /opt/etc/chroot-services.list
        cifs-mount
        plexmediaserver
        10 - Restart debian
        debian restart

        I will make a real guide but no free time right now

      • Toufiq Ibna Mustafiz

        Will check and let you know for sure

      • Toufiq Ibna Mustafiz

        hands down!!!!! it works man. you are a genious !!!! i can see i dont need a X10 after all. using a samsung SMART tv with this router [no trans-coding] again hats off

  • Jon

    Great guide for setting up Plex. Thanks you. The instructions are great. But now, I am struggling to add my content to Plex. The content resides on a Windows Server. So I am hoping someone can guide me on how to "Mount Windows Shares" so I can access the content on Plex. I have searched the Plex forum and have not walked away with any real definitive answers. Likewise, I have done the same with Google as my friend. The closest I have come is this page: http://midactstech.blogspot.com/2013/09/how-to-mount-windows-cifs-share-on_18.html . I am on the right direction? Can someone guide me the rest of the way. I am a real newbie, but I am totally willing to learn. Thank you in advance.

    • TeHashX

      Chrooted debian script is made to mount an external directory from a router attached hdd inside debian. But if you want to mount a samba share, this script must be heavy modified.
      As alternative, you could try to use fstab inside debian to mount share. Link you provided should be ok.

      • Jon

        Thanks for the reassurance that the link I provide makes sense and it *should* work. With that said, I still can't get it to work. What is strange to me is that once in about 25 tries, I can get the "Music" folder so work and show up in Plex. What is strange is that when it does work, in the same session, I have exactly the same code in place in the "nano /etc/fstab" file for "Movies" and "TV shows" - with the exception of the changing the directly names.This is the code I am using:

        //192.168.11.2/Movies/ /mnt/share cifs uid=0,guid=0,rw,credentials=/etc/cifspasswd 0 0
        //192.168.11.2/TV Shows/ /mnt/share cifs uid=0,guid=0,rw,credentials=/etc/cifspasswd 0 0
        //192.168.11.2/Music/ /mnt/share cifs uid=0,guid=0,rw,credentials=/etc/cifspasswd 0 0

        Does this code look correct?

        As I said, the "music" folder works 1 in 25 times and when I go back to the "/etc/fstab" files check to see if I messed something up with the "Movies" and the "TV Shows" code, I go back to Plex and then none of it work. And then I am that way for the next 24 attempts to get it work until I stumble upon the one time it wants to work again. It is frustrating because I can not find a pattern of why it works or why it doesn't.

        Is there any output command I can pull up to see and show what is going on? Again, remember I am pretty new at Linux and don't have a great working knowledge of all the ins and outs.

        Thanks!

  • travis68

    I have installed plex on a RT-AC87U. Im trying to add media from a second harddrive but i cant add media in plex. I can se the harddrive in the network and in plex the name of harddrive (sda2) but no mnt2.

    • TeHashX

      Post "mount" output

      • travis68

        EXT_DIR=/tmp/mnt/sda5/Media/
        EXT_DIR2=/tmp/mnt/sda2/Media2/
        EXT_DIR3=/jffs/

      • TeHashX

        Type mount in terminal and post here the output
        Also output from
        cat /opt/etc/init.d/S99debian

      • travis68

        There is something wierd. I see this "/dev/sdb1 on /tmp/mnt/sda2 type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)"

        ASUSWRT-Merlin RT-AC87U 380.62-1 Thu Sep 29 00:19:02 UTC 2016
        *******@RT-AC87U-4818:/tmp/home/root# mount
        rootfs on / type rootfs (rw)
        /dev/root on / type squashfs (ro,relatime)
        devtmpfs on /dev type devtmpfs (rw,relatime,size=127740k,nr_inodes=31935,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/mtdblock4 on /jffs type jffs2 (rw,noatime)
        usbfs on /proc/bus/usb type usbfs (rw,relatime)
        /dev/sdb1 on /tmp/mnt/sda2 type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)
        /dev/sda5 on /tmp/mnt/sda5 type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)
        devtmpfs on /tmp/mnt/sda5/optware-ng.arm/debian/dev type devtmpfs (rw,relatime,size=127740k,nr_inodes=31935,mode=755)
        proc on /tmp/mnt/sda5/optware-ng.arm/debian/proc type proc (rw,relatime)
        sysfs on /tmp/mnt/sda5/optware-ng.arm/debian/sys type sysfs (rw,relatime)
        /dev/sda5 on /tmp/mnt/sda5/optware-ng.arm/debian/mnt type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)

        #!/bin/sh
        PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin
        # Folder with Chrooted Debian
        CHROOT_DIR=/tmp/mnt/sda5/optware-ng.arm/debian
        # Some folder/folders outside of sandbox,
        # will be mounted to /mnt, /mnt2... folders inside Debian
        # Uncommented next 1-3 lines starting with "EXT_DIR" if you need
        # to mount a folder or more inside chrooted debian
        EXT_DIR=/tmp/mnt/sda5/Media/
        EXT_DIR2=/tmp/mnt2/sda2/Media2/
        EXT_DIR3=/jffs/
        CHROOT_SERVICES_LIST=/opt/etc/chroot-services.list
        if [ ! -e "$CHROOT_SERVICES_LIST" ]; then
        echo "Please, define Debian services to start in
        $CHROOT_SERVICES_LIST first!"
        echo "One service per line. Hint: this is a script names from
        Debian's /etc/init.d/"
        exit 1
        fi
        MountedDirCount="$(mount | grep $CHROOT_DIR | wc -l)"
        start() {
        if [ $MountedDirCount -gt 0 ]; then
        echo "Chroot'ed services seems to be already started,
        exiting..."
        exit 1
        fi
        echo "Starting chroot'ed Debian services..."
        for dir in dev proc sys; do
        mount -o bind /$dir $CHROOT_DIR/$dir
        done
        [ -z "$EXT_DIR" ] || mount -o bind $EXT_DIR $CHROOT_DIR/mnt
        [ -z "$EXT_DIR2" ] || mkdir -p $CHROOT_DIR/mnt2 && mount -o bind $EXT_DIR2
        $CHROOT_DIR/mnt2
        [ -z "$EXT_DIR3" ] || mkdir -p $CHROOT_DIR/jffs && mount -o bind $EXT_DIR3
        $CHROOT_DIR/jffs
        for item in $(cat $CHROOT_SERVICES_LIST); do
        chroot $CHROOT_DIR /etc/init.d/$item start
        done
        }
        stop() {
        if [ $MountedDirCount -eq 0 ]; then
        echo "Chroot'ed services seems to be already stopped,
        exiting..."
        exit 1
        fi
        echo "Stopping chroot'ed Debian services..."
        for item in $(cat $CHROOT_SERVICES_LIST); do
        chroot $CHROOT_DIR /etc/init.d/$item stop
        sleep 2
        done
        mount | grep $CHROOT_DIR | awk '{print $3}' | xargs umount -l
        }
        restart() {
        if [ $MountedDirCount -eq 0 ]; then
        echo "Chroot'ed services seems to be already stopped"
        start
        else
        # echo "Stopping chroot'ed Debian services..."
        for item in $(cat $CHROOT_SERVICES_LIST); do
        chroot $CHROOT_DIR /etc/init.d/$item stop
        sleep 2
        done
        mount | grep $CHROOT_DIR | awk '{print $3}' | xargs umount -l
        echo "Restarting chroot'ed Debian services..."
        for dir in dev proc sys; do
        mount -o bind /$dir $CHROOT_DIR/$dir
        done
        [ -z "$EXT_DIR" ] || mount -o bind $EXT_DIR $CHROOT_DIR/mnt
        [ -z "$EXT_DIR2" ] || mkdir -p $CHROOT_DIR/mnt2 && mount -o bind $EXT_DIR2
        $CHROOT_DIR/mnt2
        [ -z "$EXT_DIR3" ] || mkdir -p $CHROOT_DIR/jffs && mount -o bind $EXT_DIR3
        $CHROOT_DIR/jffs
        for item in $(cat $CHROOT_SERVICES_LIST); do
        chroot $CHROOT_DIR /etc/init.d/$item start
        done
        fi
        }
        enter() {
        [ -z "$EXT_DIR" ] || mount -o bind $EXT_DIR $CHROOT_DIR/mnt
        mount -o bind /dev/ /opt/debian/dev/
        mount -o bind /dev/pts /opt/debian/dev/pts
        mount -o bind /proc/ /opt/debian/proc/
        mount -o bind /sys/ /opt/debian/sys/
        chroot /opt/debian /bin/bash
        }
        status() {
        if [ $MountedDirCount -gt 0 ]; then
        echo "Chroot'ed services running..."
        else
        echo "Chroot'ed services not running!"
        fi
        }
        case "$1" in
        start)
        start
        ;;
        stop)
        stop
        ;;
        restart)
        restart
        ;;
        enter)
        enter
        ;;
        status) status
        ;;
        *)
        echo "Usage: (start|stop|restart|enter|status)"
        exit 1
        ;;
        esac
        echo Done.
        exit 0

      • Toufiq Ibna Mustafiz

        how you add files in HDD as after installing debian it seems the router's samba share is not working anymore ?

      • travis68

        Im in a state to give it all up. I think the problem is hardwareissue. I think the router have problems to handle two USB-disks at the same time in particular then one of them is usb 3. Im going back to just one and combining it with plex on one PC where I put small mediafiles because there I on wifi. Thanks for the replay and also to tehashx

      • Toufiq Ibna Mustafiz

        the router could not handle samba share and optware at the same time. its strange

      • TeHashX

        I already provided you the solution some comments ago:
        add to /jffs/scripts/init-start
        #!/bin/sh

        sleep 30
        service start_samba

        chmod +x /jffs/scripts/init-start
        reboot

      • travis68

        I see something wierd here "/dev/sdb1 on /tmp/mnt/sda2 type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)"

        ASUSWRT-Merlin RT-AC87U 380.62-1 Thu Sep 29 00:19:02 UTC 2016
        ********@RT-AC87U-4818:/tmp/home/root# mount
        rootfs on / type rootfs (rw)
        /dev/root on / type squashfs (ro,relatime)
        devtmpfs on /dev type devtmpfs (rw,relatime,size=127740k,nr_inodes=31935,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/mtdblock4 on /jffs type jffs2 (rw,noatime)
        usbfs on /proc/bus/usb type usbfs (rw,relatime)
        /dev/sdb1 on /tmp/mnt/sda2 type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)
        /dev/sda5 on /tmp/mnt/sda5 type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)
        devtmpfs on /tmp/mnt/sda5/optware-ng.arm/debian/dev type devtmpfs (rw,relatime,size=127740k,nr_inodes=31935,mode=755)
        proc on /tmp/mnt/sda5/optware-ng.arm/debian/proc type proc (rw,relatime)
        sysfs on /tmp/mnt/sda5/optware-ng.arm/debian/sys type sysfs (rw,relatime)
        /dev/sda5 on /tmp/mnt/sda5/optware-ng.arm/debian/mnt type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)

        #!/bin/sh
        PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin
        # Folder with Chrooted Debian
        CHROOT_DIR=/tmp/mnt/sda5/optware-ng.arm/debian
        # Some folder/folders outside of sandbox,
        # will be mounted to /mnt, /mnt2... folders inside Debian
        # Uncommented next 1-3 lines starting with "EXT_DIR" if you need
        # to mount a folder or more inside chrooted debian
        EXT_DIR=/tmp/mnt/sda5/Media/
        EXT_DIR2=/tmp/mnt2/sda2/Media2/
        EXT_DIR3=/jffs/
        CHROOT_SERVICES_LIST=/opt/etc/chroot-services.list
        if [ ! -e "$CHROOT_SERVICES_LIST" ]; then
        echo "Please, define Debian services to start in
        $CHROOT_SERVICES_LIST first!"
        echo "One service per line. Hint: this is a script names from
        Debian's /etc/init.d/"
        exit 1
        fi
        MountedDirCount="$(mount | grep $CHROOT_DIR | wc -l)"
        start() {
        if [ $MountedDirCount -gt 0 ]; then
        echo "Chroot'ed services seems to be already started,
        exiting..."
        exit 1
        fi
        echo "Starting chroot'ed Debian services..."
        for dir in dev proc sys; do
        mount -o bind /$dir $CHROOT_DIR/$dir
        done
        [ -z "$EXT_DIR" ] || mount -o bind $EXT_DIR $CHROOT_DIR/mnt
        [ -z "$EXT_DIR2" ] || mkdir -p $CHROOT_DIR/mnt2 && mount -o bind $EXT_DIR2
        $CHROOT_DIR/mnt2
        [ -z "$EXT_DIR3" ] || mkdir -p $CHROOT_DIR/jffs && mount -o bind $EXT_DIR3
        $CHROOT_DIR/jffs
        for item in $(cat $CHROOT_SERVICES_LIST); do
        chroot $CHROOT_DIR /etc/init.d/$item start
        done
        }
        stop() {
        if [ $MountedDirCount -eq 0 ]; then
        echo "Chroot'ed services seems to be already stopped,
        exiting..."
        exit 1
        fi
        echo "Stopping chroot'ed Debian services..."
        for item in $(cat $CHROOT_SERVICES_LIST); do
        chroot $CHROOT_DIR /etc/init.d/$item stop
        sleep 2
        done
        mount | grep $CHROOT_DIR | awk '{print $3}' | xargs umount -l
        }
        restart() {
        if [ $MountedDirCount -eq 0 ]; then
        echo "Chroot'ed services seems to be already stopped"
        start
        else
        # echo "Stopping chroot'ed Debian services..."
        for item in $(cat $CHROOT_SERVICES_LIST); do
        chroot $CHROOT_DIR /etc/init.d/$item stop
        sleep 2
        done
        mount | grep $CHROOT_DIR | awk '{print $3}' | xargs umount -l
        echo "Restarting chroot'ed Debian services..."
        for dir in dev proc sys; do
        mount -o bind /$dir $CHROOT_DIR/$dir
        done
        [ -z "$EXT_DIR" ] || mount -o bind $EXT_DIR $CHROOT_DIR/mnt
        [ -z "$EXT_DIR2" ] || mkdir -p $CHROOT_DIR/mnt2 && mount -o bind $EXT_DIR2
        $CHROOT_DIR/mnt2
        [ -z "$EXT_DIR3" ] || mkdir -p $CHROOT_DIR/jffs && mount -o bind $EXT_DIR3
        $CHROOT_DIR/jffs
        for item in $(cat $CHROOT_SERVICES_LIST); do
        chroot $CHROOT_DIR /etc/init.d/$item start
        done
        fi
        }
        enter() {
        [ -z "$EXT_DIR" ] || mount -o bind $EXT_DIR $CHROOT_DIR/mnt
        mount -o bind /dev/ /opt/debian/dev/
        mount -o bind /dev/pts /opt/debian/dev/pts
        mount -o bind /proc/ /opt/debian/proc/
        mount -o bind /sys/ /opt/debian/sys/
        chroot /opt/debian /bin/bash
        }
        status() {
        if [ $MountedDirCount -gt 0 ]; then
        echo "Chroot'ed services running..."
        else
        echo "Chroot'ed services not running!"
        fi
        }
        case "$1" in
        start)
        start
        ;;
        stop)
        stop
        ;;
        restart)
        restart
        ;;
        enter)
        enter
        ;;
        status) status
        ;;
        *)
        echo "Usage: (start|stop|restart|enter|status)"
        exit 1
        ;;
        esac
        echo Done.
        exit 0

      • TeHashX

        Sorry for late reply,
        External dirs in your S99debian script should be
        EXT_DIR=/tmp/mnt/sda5/Media/
        EXT_DIR2=/tmp/mnt/sda2/Media2/ or EXT_DIR2=/tmp/mnt/sda2/Any_dir/

      • travis68

        Thanks. Im still trying. Then Im finish I give you all the info.

  • LukeH

    Sorry for posting this again. The instructions are great, the installation went fine, usually clips work.
    But, was anyone able to play mkws with ac3 audio using from the router? I wasn't able to play those on either the web, android, Webos 2 client on LGTV. I tryed all those client side settings about direct play and ac3 related on all those platforms with no luck

    • Toufiq Ibna Mustafiz

      usuallt smart TV can play all direclty. for browser based client has trans-coding issue.

  • Toufiq Ibna Mustafiz

    admin@RT-AC87U-37F8:/tmp/home/root# unzip UnSupportedAppstore.bundle.zip && rm U
    nSupportedAppstore.bundle.zip
    Archive: UnSupportedAppstore.bundle.zip
    creating: UnSupportedAppstore.bundle/
    unzip: zip flags 1 and 8 are not supported
    admin@RT-AC87U-37F8:/tmp/home/root# chown -R plex UnSupportedAppstore.bundle
    chown: unknown user plex

    • apt install zip

      • Toufiq Ibna Mustafiz

        works like a charm. you are the best

      • Toufiq Ibna Mustafiz

        :)

  • Toufiq Ibna Mustafiz

    the server seems to unreachable from the network [outside] any way to make it reachable to share ?

  • LukeH

    I installed everything again with 2G swap. It plays my mp4 files
    Questions:
    First of all, my goal is to play files stored on the router to my LG TV with WebOS2.0 in the PLEX app it has available and I want to be able to play mkvs too.
    1. You say newer versions are not available for ARMv5. But my AC56U is ARMv7, right? Is there newer version for it?
    2. Any way to play mkv on the fly without crating a mp4 file or something and play that one? As far as I remember I had BubbleUPNP and it could do that from the router, also PLEX server on my PC plays mkvs.
    3. If answer to #2 is no. What app you recommend to convert mkv to something playable that would run on the router...time is not the concern here, I'd let it do it over night or something.
    Thanks

    • 1 - There is no new version, AC56U is armel not armhf
      2 - I don't think so
      3 - No idea, sorry

      Do you try to play files with subtitles? Try without them.

      • LukeH

        I tried without subtitles, as I read a lot about the issue today, but no luck. I believe the issue is the ac3 audio format, not the mkv container itself...any ideas in this case as I couldn't make it work with what I found around.

      • A cheap solution could be an Odroid or RPI

  • Toufiq Ibna Mustafiz

    HI its running the plex greatly. but could not mount the external HDD into it. can some1 help me out.
    let me know which file i need to change the drive name. many thanks

    Screenshot: https://www.dropbox.com/s/kx30p8nfxxaivo4/mount.png?dl=0

    • Toufiq Ibna Mustafiz

      hi just managed to do that by my self, THANKS, no need to reply :)

  • LukeH

    Hi,
    I installed the server on the router and started it. All seems fine...when I access the router IP it asks my plex user/pass. I had already an account which I used and it just trys to reconnect to my old server (on a win10 machine behind that router). I see no option to add a new server.
    I removed the old server and now nothing...it finds no server while I expected it to add one.
    I tried plex wizard url manually: http://192.168.1.1:32400/manage/index.html#!/setup but it says I have no server:
    "Nu ai niciun server media încă.
    Descarcă și instalează unul și încearcă din nou."

    Any ideas?
    Thanks

    • TeHashX

      You have to chose different port if 32400 is used on win pc

      • LukeH

        Thanks but how would I do that? I see "32400" appears in a lot of .py files. Also, this happens while my win pc is powered off (not only the server there stopped)

      • TeHashX

        From Plex network settings and from router port forwarding

      • LukeH

        Can you please be more specific? I can't find Plex network settings as according to https://support.plex.tv/hc/en-us/articles/201105343-Advanced-Server-Settings

        :/apps/plex# find | grep Pref
        ./Resources/Plug-ins-5089475/LocalMedia.bundle/Contents/DefaultPrefs.json
        ./Resources/Plug-ins-5089475/Framework.bundle/Contents/Resources/Versions/1/Python/PMS/Prefs.py
        ./Resources/Plug-ins-5089475/Framework.bundle/Contents/Resources/Versions/0/Python/PMS/Prefs.py
        ./Resources/Plug-ins-5089475/Framework.bundle/Contents/Resources/Versions/2/Resources/Prefs.png
        ./Resources/Plug-ins-5089475/Fanart-TV.bundle/Contents/DefaultPrefs.json
        ./Resources/Plug-ins-5089475/PlexMovie.bundle/Contents/DefaultPrefs.json
        ./Resources/Plug-ins-5089475/PlexMusic.bundle/Contents/DefaultPrefs.json
        ./Resources/Plug-ins-5089475/TheMovieDB.bundle/Contents/DefaultPrefs.json
        ./Resources/Plug-ins-5089475/LastFM.bundle/Contents/DefaultPrefs.json
        ./Resources/Plug-ins-5089475/PlexVevo.bundle/Contents/DefaultPrefs.json
        ./Resources/Plug-ins-5089475/OpenSubtitles.bundle/Contents/DefaultPrefs.json
        ./Resources/Plug-ins-5089475/Services.bundle/Contents/Service Sets/com.plexapp.plugins.youtube/URL/YouTube/ServicePrefs.json
        ./Resources/Plug-ins-5089475/Services.bundle/Contents/Service Sets/com.plexapp.plugins.vimeo/URL/Vimeo/ServicePrefs.json
        ./Resources/Plug-ins-5089475/Services.bundle/Contents/Service Sets/com.plexapp.plugins.tv4play/URL/TV4 Play/ServicePrefs.json
        ./Resources/Plug-ins-5089475/System.bundle/Contents/DefaultPrefs.json

        It feels like I can only access the page but the server is not acctually running

      • LukeH

        Actually I found it "nano var/lib/plexmediaserver/Plex\ Media\ Server/Preferences.xml" but seems not to work. And also that file gets reseted and my changes removed each time I restart the server

      • TeHashX

        Did you set a 2GB swap file?
        Setting are in plex ui under server remote access

      • LukeH

        I have a 1G swap but I see no errors regarding that.
        Anyway, I read some stuff here https://support.plex.tv/hc/en-us/articles/204604227 and it may be because I'm on a VPN. Right now OpenVPN runs on my home router (where I install this) and I connect to it from work.
        I was able to connect to custom port configured in that file but the UI still doens't show anything. Will try to work it out a bit further.

      • TeHashX

        2GB swap is 100% required, believe me, you should do all steps exactly.

      • LukeH

        I'll do that once I get a new disk setup on my router (as I mentioned on jesse comments). Right now I use a swap partition of 1G and I don't know how to extend that.

      • LukeH

        It was the VPN...as soon as I got home it worked from the first attempt.

        I know I don't have 2G swap but can you/someone please tell me if the following DEBUG lines appear in var/lib/plexmediaserver/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log when attempting to play a movie:

        Sep 13, 2016 08:31:03 [0x4889a400] DEBUG - [FFMPEG] Exec of /apps/plex/Resources/Plex New Transcoder failed.
        Sep 13, 2016 08:31:03 [0x4889a400] DEBUG - Read line, and done: 0
        Sep 13, 2016 08:31:03 [0x4889a400] ERROR - Failed to start session successfully.
        Sep 13, 2016 08:31:03 [0x4889a400] DEBUG - Cleaning directory for session gglkhkwtlehoan3efhcxwp14i (/var/lib/plexmediaserver/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-gglkhkwtlehoan3efhcxwp14i-1d595db2-86e9-42c6-a1ea-3db
        4db8c6eca)

        To me it looks like it attempts to transcode which it shouldn't. Yes, I have ffmpeg on the router.

  • LukeH

    Can it handle channels to be played on an LG TV or that requires transcoding or something?

    • TeHashX

      No transcoding on armel cpu

  • Ken

    Hey TeHashX!

    I'm trying to play videos in a channel from the UnsupportedApp, but I keep getting the error "There was a problem playing this item."

    Do you have an idea how I can fix this?

    Thanks!!

  • David

    Hi TeHashX,

    I installed Plex but when I play to my Chromecast, it quits after about 20 to 30 minutes. It will freeze and then go back to the Chrome main screen after some time. Is there anything I help prevent that?

    This is on a Netgear R6300V2 and DD-wrt.

    Thank you!

    • TeHashX

      Can you test on other player beside chromecast?
      Do you have 2gb swap?

  • diggity801

    TeHashX,

    Do you have any idea how I can get rtorrent to work on startup? I created an init.d script for it and added it to the chroot-services.list. I'm not able to start the program outside of Debian for some reason. If I specifically type chroot /opt/debian /apps/rtorrent/start.sh I can run it but that same command doesn't work when added to any script that runs on startup.

    Thanks again!!

  • diggity801

    Netgear 6400 does work and it works much faster than my Asus RT-AC68U for some reason. The Netgear does has working metadata agents. I'm wondering if there might be a problem with the previous flash drive I used on the Asus.

    • TeHashX

      Try with different usb disk drive, flash disks are kind of slow.

      • David

        You were right. In fact, I would say a USB flash disk will not work on a Plex setup like this. There is too much reading and writing and it ends up crashing both of my router when Plex tries to catalog my 1+ drive when running off of the USB stick. I moved Entware and the swap file to same hard drive as the data and now it loads many times faster and actually is usable.

  • diggity801

    Thanks again for all of your help TeHashX and the great guides.

    Can this work on other routers other than Asus? I have a Netgear 6400 with similar specs - 1 Ghz processor, 256 ram, 128 flash ARM processor. Is it possible that would work?

  • diggity801

    Hello,

    TeHashX, can you help me out? I have a RT-AC68U and I am unable to get Plex running on it. I have followed the instructions twice. The first time I was able to launch Plex after installation but after reboot it stated start.sh had an error and was unable to find Plex Media Server. I tried to run it manually inside of Debian and it said that it could not access a bunch of shared library files.

    Can you please take a look at the terminal output below and let me know what you think?

    admin@RT-AC68U-C460:/tmp/mnt/sda1/entware-ng.arm# free
    total used free shared buffers
    Mem: 255700 52104 203596 0 492
    -/+ buffers: 51612 204088
    Swap: 4718584 0 4718584
    admin@RT-AC68U-C460:/tmp/mnt/sda1/entware-ng.arm# debian restart
    Stopping chroot'ed Debian services...
    Plex Media Server is not running (no process found)...
    umount: can't forcibly umount /tmp/mnt/sda1/entware-ng.arm/debian/dev/pts: No such file or directory
    Restarting chroot'ed Debian services...
    Starting Plex Media Server: /apps/plex/start.sh: 12: /apps/plex/start.sh: ./Plex Media Server: not found
    done
    Done.
    admin@RT-AC68U-C460:/tmp/mnt/sda1/entware-ng.arm# reboot

    • TeHashX

      I modified tutorial yesterday, you should install it from scratch.
      Don't try to start plex inside debian because I modified script to start only from outside.
      Very important, need 2GB swap file!!!

    • diggity801

      I erased everything and did it a third time. This time it worked. Not sure what was done differently. I backed up the Debian directory immediately after installing Plex in it. Wouldn't it be easier to just distribute the Debian backup with Plex already installed? Then people would just need to install Entware and then restore the directory.I feel like that would be easier unless I'm missing something.

      Anyways, thank you for the nicely made guide.

      • TeHashX

        Trying to keep tutorial simple as possible and steps are very clearly and I always try 2-3 times before posting a new guide, I don't want to fill server with debian distributions...
        Please leave a feedback if I should change something on tutorials, to be more simple for beginners, from my point of view are simple enough but who knows?

      • diggity801

        Hey thanks for replying,

        I was trying to get Plex fully working today but there seems to be some issues with it. It seems to run fine but the metadata agents don't work. It looks like it is a permission issue judging by the scrolling wall of input/output errors in the command line, but I'm not very savvy with Linux. Could you please take a look at these screenshots?

        https://i.imgur.com/sTcabnv.png
        https://i.imgur.com/jSbncrc.png
        https://i.imgur.com/pMCM9v6.png

        So the movies so up but they all are blank because the metadata agents are not working. I tried to download some different ones from the Plex Unsupported App store but those don't seem to work either.

      • TeHashX

        I think your files are corrupted, recreate library.
        debian stop
        rm - r /opt/debian/var/lib/plexmediaserver
        debian restart

      • diggity801

        Hi TeHahX,

        I accidentally responded to myself, could you please take a look at the pictures in the other post I just made? Having problems with the Plex metadata agents.

        Thank you!

  • TeHashX

    Added - How to Install the Plex Unsupported App Store

    • diggity801

      Hi TeHashX,

      I installed the Plex Unsupported App store and it seems to work but none of the metadata agents that are offered work and neither do the metadata agents that come with Plex. It looks like the folders that the metadata agents use to read and write are not able to be written to. Could you offer any advice on how I can get the metadata agents working so that the posters automatically download?

  • DietCokeOfEvil

    TeHashX,

    First off, great guide. After carefully following the directions, I was able to get Plex to run.

    Two questions:

    1) I see the next version is already out. Are you going to post an updated version? I see a SPK for Arm7, but I'm not yet ready to go down that hole.
    2) I'm able to add media folders via command path in the interface, but cannot browse to the mounted folders. But that's not the issue. I'm using a LG Plex client on a WebOS3 TV. I can browse to the movies, but when I try to play them it just "sticks" in loading and eventually gives a time-out message. Any ideas? I've verified the media is "good" by streaming it direct from Plex from on a Mac as well as loading the files raw onto the TV with a USB drive.

    Thanks,

    Diet Coke of Evil

    • TeHashX

      1) http://goo.gl/ZzmVmO v0.9.16.6
      2) Disable subtitles

      • DietCokeOfEvil

        I have "Automatically select audio and subtitle tracks" unchecked and have selected "None" for a few movies. Same result... they do not play in LG or using Plex web client.

      • TeHashX

        For web client is simple, go to settings / player / local, remote, online should be all Original

      • DietCokeOfEvil

        I confirmed that everything is set to Original. The web and LG client still fail. I'm on an Asus 5300AC.

        Whether Direct Play is enabled or not, the logs (http://bit.ly/28M5Dv5) indicate it's trying to use Direct Play.

      • TeHashX

        Under settings / player / Burn Subtitles choose Only Image formats.
        Tested with Google Chrome and Mozilla Firefox, on your logs I see your browser is Safari.

      • DietCokeOfEvil

        I tried those settings. No change... verified in Chrome too. Doh, think I'll have to run Plex from a HTPC.

        Lemme know if you think of anything else, I can try it to add to the knowledge base here.

      • TeHashX

        Reboot router
        Stop plex
        Remove configuration folder, inside debian is "/root/Library" outside is "/opt/debian/root/Library"
        Start Plex
        Run wizard again and create a new library but wait until scan is over.

  • Fearz

    Hi,

    Using AC5300 latest Merlin there is no way i can start Plex, using optware, swap 2GB, debian fully updated:

    root@RT-AC5300-81F0:/# /etc/init.d/plexmediaserver status
    It seems that Plex Media Server isn't running (no process found).
    root@RT-AC5300-81F0:/# /etc/init.d/plexmediaserver start
    Starting Plex Media Server: ^[[Adone
    root@RT-AC5300-81F0:/# /etc/init.d/plexmediaserver status
    It seems that Plex Media Server isn't running (no process found).

    fearz@RT-AC5300-81F0:/tmp/mnt/New_Volume# debian restart
    Stopping chroot'ed Debian services...
    Plex Media Server is not running (no process found)...
    umount: can't forcibly umount /tmp/mnt/New_Volume/optware-ng.arm/debian/dev/pts: No such file or directory
    Restarting chroot'ed Debian services...
    Starting Plex Media Server: done
    Done.
    fearz@RT-AC5300-81F0:/tmp/mnt/New_Volume# Segmentation fault

    • TeHashX

      You should start plex always outside debian because start script is modified, now you are out of memory, reboot router and should start automatically.

      • Fearz

        Ok, I managed to start it, it would scan for files and i would see them but can't play neither movies nor music...just loading

      • TeHashX

        :) It's just a home router not a NAS.
        Where do you try to play files, on webpage or another player?

      • Fearz

        webpage

      • TeHashX

        Yes, ntfs could be the problem, try to create a new library that point to a directory on a ext2/3/4 formatted disk

      • Fearz

        Is it supposed to be painfully slow? even debian setup and update/upgrade took like an 45 min. on the AC5300

      • Fearz

        Also, my HDD is NTFS formatted, would that be a problem?

      • EDS

        How do I start or restart plex outside debian manually without rebooting router? ThankYou

      • TeHashX

        services restart
        Or
        /opt/etc/init.d/S99debian restart

  • Csaba Benesch

    Ok, after some weeks I try to install it, media directory is there, Plex see my movies but in the scanning process, the router is randomly rebooted.

    • TeHashX

      Which router, firmware? Another installed services? Swap enabled? Do you have a large media library?

      • Csaba Benesch

        ac87u with the latest hgg firmware. For swap I have 3GB space and it is enabled.In the media folder I have 76 HD movies.

      • TeHashX

        I made tests with about 50 movies running RMErlin firmware v380.57 and was ok, maybe your firmware has something.
        Try an older version http://goo.gl/HhxeME

  • Edward

    Could you tell me how I delete the Plex?
    I want to make more free ram by deleting Plex.

    • TeHashX

      debian stop
      rm -r /opt/debian/apps/plex
      rm -r /opt/debian/root/Library
      rm /opt/debian/etc/init.d/plexmediaserver
      Then open /opt/etc/chroot-services.list with nano and delete plexmediaserver
      nano /opt/etc/chroot-services.list

      • Edward

        Thank you for your support!! I really appreciate your support!

  • Jimmy

    Can you tell me if this will work on the RT88u? I cant find clear docs as to whether this is an arm router or not.

    • TeHashX

      If is RT-AC88U, yes

  • Edward

    Hi~ I've had some problem of plex.

    My conditions are AC-56(latest version, entware-ng, debian-jessie, transmission.

    When I try first, Plex is not working properly, and then I try again your guide.

    And I see a error message as follow picture.

    Please help me~

    • Edward
      • Edward

        I can't upload error snap shot, so I write the error message as follow.

        kims602@RT-AC56U-B440:/tmp/home/root# debian restart
        Stopping chroot'ed Debian services...
        Stopping bittorrent client transmission-daemon...
        Stopping bittorrent client transmission-daemon succeeded
        Stopping bittorrent client transmission-daemon...
        Stopping bittorrent client transmission-daemon succeeded
        Plex Media Server is not running (no process found)...
        Plex Media Server is not running (no process found)...
        Plex Media Server is not running (no process found)...
        Plex Media Server is not running (no process found)...
        umount: can't forcibly umount /tmp/mnt/sda1/entware-ng.arm/debian/dev/pts: No such file or directory
        Restarting chroot'ed Debian services...
        Starting bittorrent client transmission-daemon...
        Starting bittorrent client transmission-daemon succeeded
        Starting bittorrent client transmission-daemon...
        Starting bittorrent client transmission-daemon succeeded
        Starting Plex Media Server: /apps/plex/start.sh: 11: /apps/plex/start.sh: /apps/ple/apps/ple/apps/plex/Plex Media Server: not found
        done
        Starting Plex Media Server: /apps/plex/start.sh: 11: /apps/plex/start.sh: /apps/ple/apps/ple/apps/plex/Plex Media Server: not found
        done
        Starting Plex Media Server: /apps/plex/start.sh: 11: /apps/plex/start.sh: /apps/ple/apps/ple/apps/plex/Plex Media Server: not found
        done
        Starting Plex Media Server: /apps/plex/start.sh: 11: /apps/plex/start.sh: /apps/ple/apps/ple/apps/plex/Plex Media Server: not found
        done
        Done.

      • TeHashX
      • Edward

        Thanks your comment.

        The plex is running now.

        But the plex doesn't find the media file.

        I add the /mnt folder. But I can't watch media files.

        And I see a error message through putty as follow.

        ------------------------------------------------------------------------------

        kims602@RT-AC56U-B440:/tmp/home/root# /apps/plex/Plex Media Server: error while loading shared libraries: libavcodec.so.56: cannot map zero-fill pages: Cannot allocate memory
        terminate called after throwing an instance of 'St9bad_alloc'
        what(): std::bad_alloc
        terminate called after throwing an instance of 'terminate called after throwing an instance of 'St9bad_allocSt9bad_alloc'
        '
        what(): what(): std::bad_allocstd::bad_alloc

        Aborted
        Aborted
        Aborted
        terminate called after throwing an instance of 'std::bad_alloc'
        what(): std::bad_alloc
        Aborted

      • TeHashX

        Reboot router but you need a swap first

      • Edward

        First of all, Thank you for your support.

        But I don't know whether my router have a swap file.

        I just follow your directions(entware, debian, transmission, plex,)

        Anyway, I reboot my router, and plex server is scanning.

        However, there is a problem as follow from putty during scanning.

        After the error msg, the plex server stops.

        ----------------------------------------------------------------------------
        kims602@RT-AC56U-B440:/tmp/home/root# Traceback (most recent call last):
        File "/apps/plex/Resources/Plug-ins-7be11e1/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py", line 168, in
        run()
        File "/apps/plex/Resources/Plug-ins-7be11e1/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py", line 148, in run
        core = Framework.core.FrameworkCore(bundle_path, FRAMEWORK_DIR, config)
        File "/apps/plex/Resources/Plug-ins-7be11e1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/core.py", line 135, in __init__
        self._setup_code()
        File "/apps/plex/Resources/Plug-ins-7be11e1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/core.py", line 421, in _setup_code
        self.sandbox = Framework.code.Sandbox(self, self.code_path, self.policy, self.flags)
        File "/apps/plex/Resources/Plug-ins-7be11e1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 145, in __init__
        self.publish_api(Framework.api.DevKit)
        File "/apps/plex/Resources/Plug-ins-7be11e1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 208, in publish_api
        self.publish_api(cls)
        File "/apps/plex/Resources/Plug-ins-7be11e1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 205, in publish_api
        g = g(self)
        File "/apps/plex/Resources/Plug-ins-7be11e1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/base.py", line 21, in __init__
        self._init()
        File "/apps/plex/Resources/Plug-ins-7be11e1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/runtimekit.py", line 525, in _init
        self._publish(self._core.runtime.generate_callback_path, 'Callback')
        AttributeError: 'FrameworkCore' object has no attribute 'runtime'

        kims602@RT-AC56U-B440:/tmp/home/root# Segmentation fault
        kims602@RT-AC56U-B440:/tmp/home/root# Trac
        eback (most recent call last):
        -sh: syntax error: unexpected "("
        kims602@RT-AC56U-B440:/tmp/home/root# File "/apps/plex/Resources/Plug-ins-7be1
        1e1/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py", line 16
        8, in
        -sh: syntax error: unexpected newline
        kims602@RT-AC56U-B440:/tmp/home/root# run()
        > File "/apps/plex/Resources/Plug-ins-7be11e1/Framework.bundle/Contents/Resour
        ces/Versions/2/Python/bootstrap.py", line 148, in run
        kims602@RT-AC56U-B440:/tmp/home/root# core = Framework.core.FrameworkCore(bu
        ndle_path, FRAMEWORK_DIR, config)
        -sh: syntax error: unexpected "("
        kims602@RT-AC56U-B440:/tmp/home/root# File "/apps/plex/Resources/Plug-ins-7be1
        1e1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/core.py", li
        ne 135, in __init__
        -sh: File: not found
        kims602@RT-AC56U-B440:/tmp/home/root# self._setup_code()
        -sh: syntax error: bad function name
        kims602@RT-AC56U-B440:/tmp/home/root# File "/apps/plex/Resources/Plug-ins-7be1
        1e1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/core.py", li
        ne 421, in _setup_code
        -sh: File: not found
        kims602@RT-AC56U-B440:/tmp/home/root# self.sandbox = Framework.code.Sandbox(
        self, self.code_path, self.policy, self.flags)
        -sh: syntax error: unexpected "("
        kims602@RT-AC56U-B440:/tmp/home/root# File "/apps/plex/Resources/Plug-ins-7be1
        1e1/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox
        .py", line 145, in __init__
        -sh: File: not found

      • TeHashX

        Post output from "free" command
        free

      • Edward

        I reboot my router and then check the free command.

        The result is as follow.

        --------------
        kims602@RT-AC56U-B440:/tmp/home/root# free
        total used free shared buffers
        Mem: 255708 242656 13052 0 2128
        -/+ buffers: 240528 15180
        Swap: 517880 5052 512828

      • TeHashX

        Swap is enabled and working

  • TeHashX

    Updated to v0.9.16.4
    New
    Update Plex/Web to 2.6.0
    Fixes
    (Media Optimizer) Episodes from shows whose titles have trailing periods might be repeatedly reprocessed (on Windows).
    (Media Optimizer) Transcoded special episodes weren't following the naming convention.
    (Media Optimizer) Optimized versions could be automatically deleted while being watched.
    (Transcoder) Transcoder process crashes weren't being reliably detected on non-Windows platforms.
    (Transcoder) Issues transcoding music files with high sampling rates.
    (Transcoder) The highest quality audio encoder wasn't always selected with Direct Streaming disabled.
    (DLNA) Crashes entering movie sections with Samsung Smart TV DLNA client.
    (Windows) Show tray icon on recent Windows Insider Preview builds.
    (Windows) Overwrite older files more reliably during setup.
    (Metadata) Download higher quality artist posters from last.fm.
    (Metadata) Fix top tracks for music libraries.
    (Metadata) Missing Rotten Tomatoes metadata when movie has no trailers and language is not set to English
    (PS4) Certain images weren't being cached while browsing.
    (Web) Plex Pass privileges weren't being recognized on first sign-in.
    Issues with .plexignore files.
    Issues with playback from some unofficial Plex Channels.

  • Ronald

    I have managed to get the plex server running, but i cannot add media to the library.

    I have stored my media on HD connected to the USB3.0 port of the Asus.
    How can i mount this drive to the plex server.

    This is my network path: \\RT-AC68U\Data (at PORT-HD-002)\Video

    I hope somebody can help, i have spent several hours to get this fixed with no luck.

    • TeHashX

      Create a new library in plex and set /mnt as path

      • Ronald

        /mnt doesn't work.

        when i add a library, and i add media i can see my HD on the left site "PORT-HD-002"
        When i click on it i cannot to the media maps.

        when i choose only the PORT-HD-002, then i see this path in the window /tmp/mnt/PORT-HD-002
        When i click "Add" then i get the message: cannot be saved

        Isn't there something wrong with the mounting of the drives?

      • TeHashX

        Do as I say
        Exit debian
        debian restart
        And try again with /mnt

      • Ronald

        I did as you sad.

        But again, i didn't add any media to the library.
        It is scanning sometime, when the scan is finished there is no media.

        When i look in the map: \\RT-AC68U\entware-ng.arm (at entware)\debian\mnt
        It is empty, no mounts

        Is this correct?

      • TeHashX

        Once again:
        put some media files in /tmp/mnt/PORT-HD-002/Media/
        in S99debian
        EXT_DIR=/tmp/mnt/PORT-HD-002/Media/
        CHROOT_DIR=/tmp/mnt/entware/entware-ng.arm/debian
        start debian with external mounted folder
        debian restart
        Create a new plex video library and set path as /mnt
        wait until scan finished (will take some time especially if the usb is a flash not usb hdd)

        When i look in the map: \\RT-AC68U\entware-ng.arm (at entware)\debian\mnt
        It is empty, no mounts
        Is this correct?

        You should see media files in /tmp/mnt/entware/entware-ng.arm/debian/mnt

      • Ronald

        I have installed entware, debian jessie and Plex now 3 times from scratch, and everytime i have troubles to install the media maps.
        The last install i had bigger probles, because core 1 and core 2 are both 100%, and the usb stick was getting hot.

        I have installed the media maps exactly you have noticed, and stil no media.
        I have waited till the scanning was over, and i have added severall different media *.avi, *.mvk *.mp3

        I don't know what the problem is.

      • TeHashX

        Do you have a swap file mounted?
        You scripts are right configured?
        Did you reboot the router?

        Post here output from:
        ls /mnt
        mount
        df
        free
        cat /opt/etc/init.d/S99debian | grep CHROOT_DIR=
        cat /opt/etc/init.d/S99debian | grep EXT_DIR=

      • Ronald

        Do you have a swap file mounted?

        Yes i think so, i have followed exactly the tutorial on this link : https://www.hqt.ro/how-to-install-new-generation-entware/
        After this tutorial i have followed this one: https://www.hqt.ro/how-to-install-debian-jessie-arm/
        en after that this one: https://www.hqt.ro/plex-media-server-through-debian-arm/

        You scripts are right configured?
        Yes i did exactly what is in the tutorial.

        Did you reboot the router?
        Yes i did a reboot of the router.

        ls /mnt:
        PORT-HD-002 sdb1
        (The usb stick i didn't label it anymore, it is now called sdb1)

        mount:
        rootfs on / type rootfs (rw)
        /dev/root on / type squashfs (ro,relatime)
        devtmpfs on /dev type devtmpfs (rw,relatime,size=127752k,nr_inodes=31938,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/mtdblock4 on /jffs type jffs2 (rw,noatime)
        usbfs on /proc/bus/usb type usbfs (rw,relatime)
        /dev/sdb1 on /tmp/mnt/sdb1 type ext2 (rw,nodev,relatime,errors=continue,user_xattr)
        devtmpfs on /tmp/mnt/sdb1/entware-ng.arm/debian/dev type devtmpfs (rw,relatime,size=127752k,nr_inodes=31938,mode=755)
        proc on /tmp/mnt/sdb1/entware-ng.arm/debian/proc type proc (rw,relatime)
        sysfs on /tmp/mnt/sdb1/entware-ng.arm/debian/sys type sysfs (rw,relatime)
        /dev/sda1 on /tmp/mnt/PORT-HD-002 type tntfs (rw,nodev,relatime,uid=0,gid=0,umask=00,nls=utf8,min_prealloc_size=64k,max_prealloc_size=976762548,readahead=1M,user_xattr,case_sensitive,fail_safe,hidden=show,dotfile=show,errors=continue,mft_zone_multiplier=1)

        df:
        Filesystem 1K-blocks Used Available Use% Mounted on
        /dev/root 28928 28928 0 100% /
        devtmpfs 127752 4 127748 0% /dev
        tmpfs 127856 1112 126744 1% /tmp
        /dev/mtdblock4 64256 5232 59024 8% /jffs
        /dev/sdb1 30776324 1238620 27974312 4% /tmp/mnt/sdb1
        devtmpfs 127752 4 127748 0% /tmp/mnt/sdb1/entware-ng.arm/debian/dev
        /dev/sda1 976762548 189485064 787277484 19% /tmp/mnt/PORT-HD-002

        free:
        total used free shared buffers
        Mem: 255716 213320 42396 0 5060
        -/+ buffers: 208260 47456
        Swap: 524284 0 524284

        cat /opt/etc/init.d/S99debian | grep CHROOT_DIR=:
        CHROOT_DIR=/tmp/mnt/sdb1/entware-ng.arm/debian

        cat /opt/etc/init.d/S99debian | grep EXT_DIR=:
        # EXT_DIR=/tmp/mnt/sda1/Media/
        EXT_DIR=/tmp/mnt/PORT-HD-002/Media/

        This are the listings. I hope you can see something wrong.

      • TeHashX

        Your HDD /tmp/mnt/PORT-HD-002 is NTFS formatted which I think is the culprit, try to format as ext4 or try with another disk

      • Ronald

        Oke,

        I try to find another HD which i can format as ext4, The one i use now i can not fromat, because of the media on it.
        I will let you know if i succeed.

      • TeHashX

        Post one more output
        debian restart
        ls /opt/debian/mnt

      • Ronald

        Sorry it takes some time to give an answer on your latest question.

        I decided to make a fresh install from scratch.
        but now i get a different error, which i didn't the first 3 times i installed plex.

        I have installed entware, debian, and the plex.
        When i enter the next commands:

        sed -i ‘s|.\/Plex\\ Media\\ Server|\/apps\/plex\/.\/Plex\\ Media\\ Server|g’ “/apps/plex/start.sh”

        I get these errors:

        bash: ./Plex\: No such file or directory
        bash: /apps/plex/./Plex\: No such file or directory
        bash: g’: command not found
        sed: -e expression #1, char 1: unknown command: `▒'

        How is this possible?
        And i did the install over, and get exact the same errors.

      • TeHashX

        You are right, I disabled a plugin on my site and quotmarks was replaced with some bad ones, now are ok, refresh web page and continue from step 8...

      • Ronald

        Plex is running now, thanks, that was the solution.

        Then i have entered your latest question.
        debian restart
        ls /opt/debian/mnt

        I do get an empty rule.
        I think there is nothing mounted.

      • TeHashX

        Plex is running but /opt/debian/mnt is empty? So no files in library?

      • Ronald

        Oke,
        Then i have probely the media in the wrong folder.

        I have copied some media in /opt/debian/media
        do i have to put the media in /opt/debian/mnt

      • Ronald

        Even with media in /opt/debian/mnt plex can not find anything

        I don't understand what i am doing wrong

      • TeHashX

        Exit debian
        debian stop
        rm - r /opt/debian/root/Library
        debian start
        Create a new library

      • Ronald

        Thanks,
        Finaly i succeeded to add media.

        The next thing is how to make a link to another drive or NAS with media

      • TeHashX

        You added mounted folder from another usb drive or files copied directly to /mnt/media?
        It's not very hard to modify S99debian script to automatically mount a nfs or cifs share.

      • Ronald

        No i have not mounted a folder to /mnt/media

        I copied some *.mp3 files directly into /opt/debian/mnt
        Then plex saw the mp3 files.

        But i have all my other media on a NAS, so i have to find a way that plex also see these files.

        Can you tell me how to modify the S99debian script so i can see a ntfs or cifs share?

      • Ronald

        It's not very hard to modify S99debian script to automatically mount a nfs or cifs share.

        Can you telle me how i can do this?

      • TeHashX

        First you need to mount an EXT_DIR then mount nfs share to EXT_DIR
        mount -t cifs //192.168.1.2/nfs-share -o username=nfs_username,password=pass /mnt/Media

  • Ronald

    I see that the text is hard to read, i try to get it better.

    Hello,

    I have tried to install Plex server, but something goes wrong.
    I hope someone can help me.

    I have a Asus RC-AC68u with Asuswrt-merlin firmware (the latest)
    Installed NG-entware.

    I have a USB HD installed on the usb3 port, and a 32gb usb stick on the usb2 port, i have installed entware on the usb stick, and i called the usb stick "entware" instead of "sda1"
    i wanted to store my media on the usb3 drive, The name of the USB3 HD is "PORT-HD-002" i have made a mape Media on the harddrive.

    When i have installed everything and want to start debian i get the following errors:

    admin@RT-AC68U:/tmp/mnt/entware/entware-ng.arm# debian start
    Starting chroot'ed Debian services...
    mount: mounting /dev on /tmp/mnt/entware/optware-ng.arm/debian/dev failed: No such file or directory
    mount: mounting /proc on /tmp/mnt/entware/optware-ng.arm/debian/proc failed: No such file or directory
    mount: mounting /sys on /tmp/mnt/entware/optware-ng.arm/debian/sys failed: No such file or directory
    mount: mounting /tmp/mnt/PORT-HD-002/Media/ on /tmp/mnt/entware/optware-ng.arm/debian/mnt failed: No such file or directory
    chroot: can't change root directory to /tmp/mnt/entware/optware-ng.arm/debian: No such file or directory
    chroot: can't change root directory to /tmp/mnt/entware/optware-ng.arm/debian: No such file or directory
    chroot: can't change root directory to /tmp/mnt/entware/optware-ng.arm/debian: No such file or directory
    Done.

    this is what i have placed in the S99debian file

    #!/bin/sh
    PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin
    # Folder with Debian Jessie
    CHROOT_DIR=/tmp/mnt/entware/optware-ng.arm/debian
    # Some folder outside of sandbox,
    # will be mounted to /mnt folder in Debian
    # Uncommented next line if you need to mount a folder inside debian
    EXT_DIR=/tmp/mnt/PORT-HD-002/Media/
    CHROOT_SERVICES_LIST=/opt/etc/chroot-services.list
    if [ ! -e "$CHROOT_SERVICES_LIST" ]; then
    echo "Please, define Debian services to start in
    $CHROOT_SERVICES_LIST first!"
    echo "One service per line. Hint: this is a script names from
    Debian's /etc/init.d/"

    I think that the /tmp/ in front of the path's is not good, i have removed the/tmp , but the i get the same error's

    Does somebody know what i am doing wrong?

    • TeHashX

      I spotted the mistake:
      In S99debian script you should set CHROOT_DIR to /mnt/entware/entware.ng/debian not optware.ng :)

      • Ronald

        Thanks,

        That was the error, stupid i didn't see it
        Plex is now running. :-)

  • Ronald

    Hello,

    I have tried to install Plex server, but something goes wrong.
    I hope someone can help me.

    I have a Asus RC-AC68u with Asuswrt-merlin firmware (the latest)
    Installed NG-entware.

    I have a USB HD installed on the usb3 port, and a 32gb usb stick on the usb2 port, i have installed entware on the usb stick, and i called the usb stick "entware" instead of "sda1"
    i wanted to store my media on the usb3 drive, The name of the USB3 HD is "PORT-HD-002" i have made a mape Media on the harddrive.

    When i have installed everything and want to start debian i get the following errors:

    admin@RT-AC68U:/tmp/mnt/entware/entware-ng.arm# debian start
    Starting chroot'ed Debian services...
    mount: mounting /dev on /tmp/mnt/entware/optware-ng.arm/debian/dev failed: No such file or directory
    mount: mounting /proc on /tmp/mnt/entware/optware-ng.arm/debian/proc failed: No such file or directory
    mount: mounting /sys on /tmp/mnt/entware/optware-ng.arm/debian/sys failed: No such file or directory
    mount: mounting /tmp/mnt/PORT-HD-002/Media/ on /tmp/mnt/entware/optware-ng.arm/debian/mnt failed: No such file or directory
    chroot: can't change root directory to /tmp/mnt/entware/optware-ng.arm/debian: No such file or directory
    chroot: can't change root directory to /tmp/mnt/entware/optware-ng.arm/debian: No such file or directory
    chroot: can't change root directory to /tmp/mnt/entware/optware-ng.arm/debian: No such file or directory
    Done.

    this is what i have placed in the S99debian file

    #!/bin/sh
    PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin
    # Folder with Debian Jessie
    CHROOT_DIR=/tmp/mnt/entware/optware-ng.arm/debian
    # Some folder outside of sandbox,
    # will be mounted to /mnt folder in Debian
    # Uncommented next line if you need to mount a folder inside debian
    EXT_DIR=/tmp/mnt/PORT-HD-002/Media/
    CHROOT_SERVICES_LIST=/opt/etc/chroot-services.list
    if [ ! -e "$CHROOT_SERVICES_LIST" ]; then
    echo "Please, define Debian services to start in
    $CHROOT_SERVICES_LIST first!"
    echo "One service per line. Hint: this is a script names from
    Debian's /etc/init.d/"

    I think that the /tmp/ in front of the path's is not good, i have removed the/tmp , but the i get the same error's

    Does somebody know what i am doing wrong?

  • TeHashX

    Updated to v0.9.16.3

    • Jainit

      Thanks for the great job!
      btw. Is there any easy way to upgrade existing installation? Should be p.7 with debian stoped enough?

      • TeHashX

        Not sure but steps 7,8 & 9 should be enough

  • Marcel

    Thank you for the step by step tutorial. I did everything as indicated, I'm starting the debian (and the plex server) but I don't think it's really starting because I cannot access it trough the web interface. Connection refused !

    • TeHashX

      Check with "top"
      top

      • Marcel

        Sorry, I don't get it.

      • TeHashX

        Start pms then type top in terminal

  • TeHashX

    Updated to v0.9.16.2 :)

  • Ion Armasu

    @TeHashX thank you for your great tutorials , i have installed, its running all ok, but the problem is that is not saving the way to the folders. and is searching in continue and is not founding nothing .

    here is the screenshoot http://storage7.static.itmages.com/i/16/0312/h_1457814654_6502220_7cf1d0dbda.png
    installed on Asus RT-AC87U (usb 3.0)

    • TeHashX

      Your path is wrong, should be /mnt/somefolder

      • Ion Armasu

        Thanks you @TeHashX, after on day , plex is running perfect !!!

      • TeHashX

        I'm glad you made it!

      • twizt3dkitty

        I am having the exact same issue, but I have double checked the path. And that the test file is in this directory /sda1/Media in fact if i re-enable the built in dlna server on the router, I can watch it from there. but plex just does not find any files. I have tried /tmp/mnt/sda1/Media, /mnt/sda1/Media, /sda1/Media, and /Media, Plex never finds any files in any of these folders. I verified it is there using the ftp browser, and also again it plays from the built in DLNA. Plex just refuses to find it.

      • TeHashX

        How to explain better?
        Create a folder with media files on /mnt/sda1/Media/mediafolder
        In S99debian script EXT_DIR should be /mnt/sda1/Media/
        Inside debian mounted folder will be /mnt/mediafolder
        When create new library in plex, cd /mnt/mediafolder
        Outside debian you should start plex and mount ext-dir with debian start, restart not debian enter :)
        I will update guide later...

      • twizt3dkitty

        got it to work by adding the trailing "/" in the debian script after Media, then changing the plex library path to "/mnt/" so I am assuming my mistake was I needed to create another folder inside the "Media" directory. but I corrected it by just pointing plex to the directory "mnt" not sure If i needed to make the debian change or not. but it works.

      • TeHashX

        Thanks

  • Cory

    this is great @TeHashX. Took me a few times to get it right but I think I'm running fine on an AC68. This is a great argument for more ram and cpu power.
    I run plex on a dedicated i7 based xpenology NAS so this isn't going to replace that for sure.

    I've always thought that the plex team or community should build a transcode offloader of some sort. The front end could be handled by a simple router, and the back end could have distributed computing apps across the internal network. Install the transcode client on a bunch of desktops and they could deliver huge compute power for transcoding.

    Found a typo in your guide. No biggie but

    Step 15: Go to default router ip address and port 3200/web
    should read: Go to default router ip address and port 32400/web

    • TeHashX

      Thanks for feedback, typo fixed :)

  • Csaba Benesch

    installed and running, but it says, media directory is empty..... but it is not empty....

    • TeHashX

      Will take some time until scan ends

      • Csaba Benesch

        thank you, working, but on ac87u with hgg firmware the router get +15°C on CPU. So I will go back to minidlna.

      • TeHashX

        Temperature rising when media is scanning for the first time then will decrease again to normal.

      • Csaba Benesch

        Ok, I have added a new folder with 35 movies, Plex is scanning and the router randomly rebooted.....

  • elradix

    followed the manual above successfully.
    I get segmentation fault error when running plex, using an R7000 chroot debian
    any solution

    • TeHashX

      Thanks for feedback...
      Optware or Entware?
      Firmware is based on RMerlin? Which version?
      Usb HDD or Usb Flash?
      Did you reboot the router to free some ram?
      Do you have any other packages installed?
      Any particular jffs scripts?

      • elradix

        Optware or Entware?
        Optware

        Firmware is based on RMerlin? Which version?
        Yes, 378.55_hotfix1 running Netgear R7000 supported by RMerlin
        http://xvtx.ru/xwrt/download.htm

        Usb HDD or Usb Flash?
        USB Flash

        Did you reboot the router to free some ram?
        enough free ram 150Mb

        Do you have any other packages installed?
        not many, nano,mc etc

        Any particular jffs scripts?
        the usual, ddns, dnsmasq.postconf

      • TeHashX

        I don't have a Netgear R7000 to test but you can backup all your jffs scripts and other installations, then reboot and install from scratch optware-ng + debian jessie + plex media server , just to eliminate any other possible issues.

      • Jainit

        Had same segmentation fault error . Added swap file and now Plex runs fine.

      • TeHashX

        Yes, swap is very important

      • elradix

        how to add a swap file ?

      • elradix

        found a way to create the swap inside debian, but still i get an error

        root@router:/var# dd if=/dev/zero of=/var/swap.img bs=512k count=1000
        1000+0 records in
        1000+0 records out
        524288000 bytes (524 MB) copied, 122.913 s, 4.3 MB/s

        root@router:/var# mkswap /var/swap.img
        Setting up swapspace version 1, size = 511996 KiB
        no label, UUID=eb0e1e72-7789-4f79-ba54-ad21817294ab
        root@router:/var# swapon /var/swap.img

        root@router:/var# service plexmediaserver start
        /etc/init.d/plexmediaserver: 1: /etc/init.d/plexmediaserver: ps: not found
        Starting Plex Media Server: done
        root@router:/var# Segmentation fault

      • TeHashX

        Reboot router

      • TeHashX

        Use the steps after point 10 to create swap, should be outside debian https://www.hqt.ro/how-to-install-debian-jessie-arm/

      • elradix

        nothing swap related, my swap was okay.
        there is something wrong with the startup script which cause a segmentation fault error

        running the startup command manually works starting plex without error
        /apps/plex/start.sh & >/dev/null 2>&1

      • TeHashX

        Your firmware is somehow different from RMerlin version, try to modify /etc/init.d/plexmediaserver script inside debian

SUBSCRIBE

To be notified by email when a new tutorial is posted :)