I know I have a wiki to finish, but this is more fun
.
This isn't complete yet, I'm working on it since I recently got myself a Synology NAS. A 1513+ to be exact. It has an Atom D2700 dual core.
My idea is to install Debian Wheezy 32-bit in a chroot environment, install the required dependencies (xorg, alsa, etc) and run MC inside that. The reason for this approach is because MC is known to run stable on Debian 32-bit. Secondly, I coudn't find the required dependencies natively for whatever distro runs on the NAS. I installed ipkg and it lists some X11 packages, some ALSA libs but even then, I would have to copy the MC binaries natively and who knows what else I run into. The chroot environment seemed the better approach at this point. Nonetheless, running it directly might even be an option too who knows.
Several things I need to figure out still;
- how to access the media volume from within the chroot environment; it might be simple I just haven't looked into it yet;
- how to configure MC; I tried to configure X11 forwarding and launch MC but the chroot environment is complicating things. I copied my local .jriver profile and tried to launch mediacenter19 /mediaserver but it segfaults.
- how to make it actually work
Here's what I've done so far. Note, this is NOT a how-to! It's not working (yet). It's not a step-by-step guide so do NOT follow these steps unless you know what you're doing and like to break things and fix them again. There might be typo's and there missing steps like, obvious things
.
On a Debian machine (VM will do):
apt-get install debootstrap
mkdir @chroot
(in a suitable location obvioiusly)
debootstrap --foreign --arch i386 wheezy @chroot
tar -cvzf chroot.tar.gz @chroot
Copy the tarball to your NAS and ssh to the NAS as root. mv or cp the tarball to the root of volume1 (or whatever volume you wish to create the chroot environment). Unpack it:
tar -xvzf chroot.tar.gz
run:
hostname > /volume1/@chroot/etc/hostname
Assuming the NAS is configured properly with DNS etc:
cp /etc/resolv.conf /volume1/@chroot/etc/
Finish the environment:
chroot /volume1/@chroot /debootstrap/debootstrap --second-stage
create the following file:
/usr/syno/etc/rc.d/S91chroot.sh
case $1 in
start)
/bin/mount -o bind /dev /volume1/@chroot/dev
/bin/mount -o bind /proc /volume1/@chroot/proc
/bin/mount -o bind /dev/pts /volume1/@chroot/dev/pts
/bin/mount -o bind /sys /volume1/@chroot/sys
;;
stop)
/bin/umount /volume1/@chroot/proc
/bin/umount /volume1/@chroot/dev/pts
/bin/umount /volume1/@chroot/dev
/bin/umount /volume1/@chroot/sys
;;
*)
echo "Usage: $0 [start|stop]"
;;
esac
chmod 755 /usr/syno/etc/rc.d/S91chroot.sh
sh /usr/syno/etc/rc.d/S91chroot.sh start
chroot /volume1/@chroot /bin/bash
edit /etc/apt/sources.list. Change the mirror to one near you.
deb http://mirror.1000mbps.com/debian/ wheezy main contrib non-free
#deb-src http://mirror.1000mbps.com/debian/ wheezy main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free
#deb-src http://security.debian.org/ wheezy/updates main contrib non-free
deb http://mirror.1000mbps.com/debian/ wheezy-updates main contrib non-free
#deb-src http://mirror.1000mpbs.com/debian/ wheezy-updates main contrib non-free
apt-get update
Exit chroot environment, stop it and back it up:
exit
/usr/syno/etc/rc.d/S91chroot.sh stop
tar -cvzf chroot.tar.gz @chroot
Start it again:
/usr/syno/etc/rc.d/S91chroot.sh start
chroot /volume1/@chroot /bin/bash
apt-get install xserver-xorg-video-dummy
Follow the 'run MC without GUI' sticky thread.
wget http://files.jriver.com/mediacenter/channels/v19/latest/MediaCenter-19.0.144.deb
dpkg -i MediaCenter-19.0.144.deb
apt-get install -f
At this point I couldn't get MC to start because forwarding X11 session from a chroot environment is .. tricky. I don't even know if its possible. I copied my local .jriver, but running mediacenter19 /mediaserver doesn't run.