User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:public:openmediavault_lxc [2017/10/08 20:48] (current)
pepe Copy&pasted from: https://forum.turris.cz/t/build-a-home-media-server/477/19?u=pepe
Line 1: Line 1:
 +===== OpenMediaVault running inside Jessie LXC container =====
  
 +Steps:
 +
 +1. Install Debian Jessie LXC container
 +
 +2. Install OpenMediaVault
 +<​code>​
 +apt-get update && apt-get install openmediavault
 +</​code>​
 +
 +=== LXC config ===
 +<​code>​
 +# 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
 +</​code>​
 +
 +=== LXC /​etc/​rc.local ===
 +<​code>​
 +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
 +</​code>​
 +
 +=== LXC /​etc/​apt.sources.list.d/​openmediavault.list ===
 +
 +<​code>​
 +deb http://​packages.openmediavault.org/​public erasmus main
 +# deb http://​downloads.sourceforge.net/​project/​openmediavault/​packages erasmus main
 +
 +## Uncomment the following line to add software from the proposed repository.
 +# deb http://​packages.openmediavault.org/​public erasmus-proposed main
 +# deb http://​downloads.sourceforge.net/​project/​openmediavault/​packages erasmus-proposed main
 +</​code>​
 +
 +It will be accessible under: http://​LXC_IP/​