chinkiko / openwrt-lxd Goto Github PK
View Code? Open in Web Editor NEWThis project forked from melato/openwrt-lxd
Scripts for creting OpenWRT images for LXD
License: MIT License
This project forked from melato/openwrt-lxd
Scripts for creting OpenWRT images for LXD
License: MIT License
These scripts create LXD images for OpenWRT. Naturally, you can run them inside an LXD container. I use a privileged Ubuntu 16.04 container, so I can run things like mknod (it is not needed yet). Run as follows: sudo ./build.sh <version> There are three versions: snapshot, chaos_calmer, barrier_breaker. Only chaos_calmer and snapshot are usable, so far. Ths script downloads rootfs tar.gz from openwrt.org, modifies it slightly, and generates LXD metadata. rootfs tarballs are downloaded in ./cache, if they are not already there. If you want to get fresh ones, delete the old ones first. The resulting images are generated in ./target/<version>/image The openwrt container should be privileged: lxc launch openwrt -c security.privileged=true <name> snapshot (designated_driver) and chaos_calmer boot partially. They become usable after running the script /root/init.sh. You can exec init.sh using lxd exec, either directly, or through an interactive shell: lxc exec <container> /root/init.sh or: lxc exec <container> ash sh init.sh init.sh uses mknod to create a few missing devices in /dev. The container should be privileged in order to be able to run mknod. I haven't been able to make init.sh run automatically from inside the container. To stop the container, run "halt" in it. It does not seem to stop from the LXD tools. If you try to run "halt" or "reboot" before completing the boot process, it won't work. In order to get rid of such an unusable container, delete its rootfs from the host (/var/lib/lxd/containers/<container>/rootfs). You will then be able to delete the container after a host reboot. This build script modifies the network configuration so that the container gets its ip address from dhcp. It also removes the wan interface. You can experiment with other network configurations. If you use the original network configuration, which includes a DHCP server, other containers may start getting their ip addresses from the OpenWRT container (which may be useful, if you disable the LXD DHCP server). The resulting container seems functional. You can access the Luci Web Interface. If you try to login to it with ssh, you get an error: PTY allocation request failed on channel 0 shell request failed on channel 0 But you can use scp, rsync, and run non-interactive commands with ssh. barrier_breaker does not boot properly. init.sh does not fix it. This script does not modify rootfs in this case. It just adds metadata.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.