Build a home media server

Well if all the video-files are just supported by the client/player by default…no transcoding is needed, however i doubt anybody will change their video files each time to a supported codec :joy: :joy: :joy:

IF there are such guys, then the Omnia is more then well suited for it, but i guess you will also agree with me on that. If else, then we indeed are arguing the same sentiment :slight_smile:

What i forgot to mention. If the ARM processor had a GPU then I COULD be well suited, but i did not find anything pointing at that.

Plex is available for slower NAS devices with older ARM architectures.
Transcoding is disabled for such architectures.
Turris Omnia is probably more powerful.

Plex is also available on the new Netgear R9000 router ( quad core ARM at 1.7GHz) with trans-coding.

Everyone has different needs.
And there are multiple options out there.

Hey, I just wanted to say thanks to everyone who’s trying to help me out, it’s very much appreciated.
This week-end I’m going to try to find a shoe that fits my foot (so to speak).

Best

I successfully created the container.

I configured the container in LuCI > LXC Containers: I added what you wrote at the end of the file.

So that would be:

# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template: --server api.turris.cz/lxc --no-validate --dist Debian --release Jessie --arch armv7l
# For additional config options, please look at lxc.container.conf(5)

# Distribution configuration
lxc.arch = armv7l

# Container specific configuration
lxc.tty = 4
lxc.pts = 1024
lxc.rootfs = /srv/lxc/OpenMediaVault/rootfs
lxc.utsname = OpenMediaVault

# Network configuration
lxc.network.type = veth
lxc.network.link = br-lan
lxc.network.flags = up
lxc.network.name = eth0

# Block configuration
lxc.cgroup.devices.allow = b 8:0 rwm # sda
lxc.cgroup.devices.allow = b 8:1 rwm # sda1

# Passthrough Printer and USB devices
lxc.mount.entry=/dev/bus/usb dev/bus/usb none bind,optional,create=dir 0 0
lxc.cgroup.devices.allow = c 180:* r

lxc.mount.entry=/dev/usb dev/usb none bind,optional,create=dir 0 0
lxc.cgroup.devices.allow = c 189:* rw

In the terminal I edited the /etc/rc.local file with what you wrote

question: do I have to keep the line ‘exit 0’?

So that would be:

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

# Code for OpenMediaVault
mknod /dev/sda b 8 0
mknod /dev/sda1 b 8 1
mknod /dev/sda2 b 8 2
mknod /dev/sda3 b 8 3
mknod /dev/sda4 b 8 4

mknod /dev/sdb b 8 16
mknod /dev/sdb1 b 8 17
mknod /dev/sdb2 b 8 18
mknod /dev/sdb3 b 8 19
mknod /dev/sdb4 b 8 20

echo /sys/block/sd? /sys/block/sd?/sd?? | xargs -r -n1 udevadm test

fsck -A
mount -a

# Do I need that line?
exit 0

I don’t know what to do with LXC /etc/apt/sources.list.d/openmediavault.list

question: do I have to create those directories and file (and put the content you wrote in it) or do I have to install a package?

Then the installation itself

question: it doesn’t know the command ‘apt-get’

Thanks for the help

1 Like

You can, but you have to put all of my before the exit 0.

Hm? Are you doing that in container? You have to do it IN CONTAINER!

If you did install Debian Jessie, you will have apt-get.

Ok, I edited my previous comment with more details about what I did but I guess I’m doing it wrong.

How do I get into the container? I can see a link in LuCI: api.turris.cz/lxc is this the way? or do I get in though the Terminal? If so, how?

EDIT: found it: Using your container

lxc-attach -n name-of-container

I managed to get in now but it seems there’s no file editing tool installed so I can’t edit /etc/rc.local or create /etc/apt/sources.list.d/openmediavault.list

I tried ‘apt-get install nano’ and ‘apt-get install vim’ but it looks like there’s no connection allowed. Am I missing something in the configuration of the new container?

It says here:

All newly created containers will have one virtual network card that will be connected to your LAN bridge by default, so it will be just another (this time virtual) computer on your local network and you can treat it as such in regards to IP assignment, port forwarding or firewall setup on your router.

EDIT: I managed to do it without installing anything but using the following commands:

  • cat > name-of-the-file-you-want-to-edit to add content to a file
  • touch name-of-the-file-you-want-to-create to create a new empty file

Not even “ed” installed?

nope, not even ‘ed’ :unamused:

Alright… I won’t give up
As mentioned, I’m unable to run the last command:

apt-get update && apt-get install openmediavault

Reading other posts, I see that @cr0 actually managed to install a Plex Media Server inside a container. Then @radekpribyl said something about using port mapping to redirect port 8022 to port 22 in the LXC container. Could this be my problem?

This is what I’m getting from the Terminal:

root@LXC_NAME:~# apt-get update && apt-get install openmediavault
Err http://packages.openmediavault.org erasmus InRelease
  
Err http://security.debian.org jessie/updates InRelease                    
  
Err http://packages.openmediavault.org erasmus Release.gpg                         
  Temporary failure resolving 'packages.openmediavault.org'
Err http://security.debian.org jessie/updates Release.gpg                          
  Temporary failure resolving 'security.debian.org'
Err http://httpredir.debian.org jessie InRelease
  
Err http://httpredir.debian.org jessie Release.gpg
  Temporary failure resolving 'httpredir.debian.org'
Reading package lists... Done
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/InRelease  

W: Failed to fetch http://security.debian.org/dists/jessie/updates/InRelease  

W: Failed to fetch http://packages.openmediavault.org/public/dists/erasmus/InRelease  

W: Failed to fetch http://packages.openmediavault.org/public/dists/erasmus/Release.gpg  Temporary failure resolving 'packages.openmediavault.org'

W: Failed to fetch http://security.debian.org/dists/jessie/updates/Release.gpg  Temporary failure resolving 'security.debian.org'

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/Release.gpg  Temporary failure resolving 'httpredir.debian.org'

W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package openmediavault

It has been mentioned here: Debian8 (Jessie) on Turris Omnia and here: How to install nextcloud on a turris omnia debian jessie container (using apache2), there is a bug in the ISC DHCP client.

I tried this method and it seems to be working now, OpenMediaVault is being installed:

Another option might be this one:

Unfortunately, I got errors at the end of the installation:

Errors were encountered while processing:
 nfs-common
 nfs-kernel-server
 openmediavault
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any thoughts?

googling a bit i found this

check if it is your case…

Thanks @eugenio, this sequence of commands seems to have solved the issue apparently:

apt-get --purge remove nfs-common
apt-get --purge remove nfs-kernel-server
apt-get autoremove
apt-get --purge remove openmediavault
apt-get clean
apt-get install openmediavault --reinstall

At least I can access OpenMediavault via the web interface

EDIT: it worked for a while and then completely froze. I did the whole thing again but I can’t make it work, those 3 errors keep showing…

Which errors? If it’s dpkg errors is related to a different package then, if it’s the same package as before i must be a different error… dpkg is used only for installation and other operations on packages. It should not affect correctly installed packages… Please provide the errors and other relevant info.

Continuing my (possibly related, but big enough to deserve its own thread) replies here: