From 7bc03c67b4d0b30f0d68cca159585da4d56d47af Mon Sep 17 00:00:00 2001 From: bnewbold Date: Tue, 13 Nov 2012 23:27:53 +0100 Subject: hanging openwrt thread --- openwrt.page | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/openwrt.page b/openwrt.page index 7d4848d..aa835b4 100644 --- a/openwrt.page +++ b/openwrt.page @@ -1,4 +1,12 @@ +### TODO + +On reboot, need to: + + /etc/init.d/network restart + mount /cgroup/ + lxc-start -n wheezy -f /data/wheezy/config -d + ### Recompiling Generic OpenWRT Attitude Adjustment from upstream Note: can skip the patching below if you just use @@ -226,6 +234,8 @@ more, but shows up as a requirement in lxc-checkconfig. LXC works regardless, may be some security issues though? See also: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/827798 +## LXC Configuration notes + Ok, once all the above is compiled and loaded up, ready to configure the OpenWRT host. @@ -263,8 +273,13 @@ sure /data is mounted, then run the rooter-optimized version of lxc-wheezy: Edit /data/wheezy/config and add (or edit) two lines: lxc.utsname = wheezy - lxc.rootfs.mount = /data/wheezy/mnt + lxc.mount.entry=/data/pub /data/wheezy/rootfs/pub none bind 0 0 + +Might need to change SSH listen port: + vi /data/wheezy/rootfs/etc/ssh/sshd_config + # edit "Port" line + Try starting lxc-start: lxc-start -n wheezy -f /data/wheezy/config @@ -276,6 +291,12 @@ to do: Horray! +## Blueprints + +git clone /data/blueprints/ /data/social/rootfs/root/.blueprint --bare -b rooter-wheezy + + + ## TODOs create a set of rooter-x86-net6501 images with: @@ -302,3 +323,34 @@ NOTE: dd if=openwrt-x86-net6501-rootfs-squashfs.img of=/dev/sda2 bs=1M TODO: zgrep, IKCONFIG_PROC TODO: mtr broken? + +### CONFIG BACKUP + +/data/wheezy/conf: + +lxc.utsname = ttt.rooter.is +lxc.tty = 4 +lxc.pts = 1024 +lxc.rootfs = /data/wheezy/rootfs +lxc.rootfs.mount = /data/wheezy/mnt +lxc.cgroup.devices.deny = a +# /dev/null and zero +lxc.cgroup.devices.allow = c 1:3 rwm +lxc.cgroup.devices.allow = c 1:5 rwm +# consoles +lxc.cgroup.devices.allow = c 5:1 rwm +lxc.cgroup.devices.allow = c 5:0 rwm +lxc.cgroup.devices.allow = c 4:0 rwm +lxc.cgroup.devices.allow = c 4:1 rwm +# /dev/{,u}random +lxc.cgroup.devices.allow = c 1:9 rwm +lxc.cgroup.devices.allow = c 1:8 rwm +lxc.cgroup.devices.allow = c 136:* rwm +lxc.cgroup.devices.allow = c 5:2 rwm +# rtc +lxc.cgroup.devices.allow = c 254:0 rwm + +# mounts point +lxc.mount.entry=proc /data/wheezy/rootfs/proc proc nodev,noexec,nosuid 0 0 +lxc.mount.entry=sysfs /data/wheezy/rootfs/sys sysfs defaults 0 0 +lxc.mount.entry=/data/pub /data/wheezy/rootfs/pub none bind 0 0 -- cgit v1.2.3