[LEDE-DEV] Running init in a chroot LEDE Image

Mirko Parthey mirko.parthey at web.de
Tue Aug 8 17:01:04 PDT 2017


On Tue, Aug 08, 2017 at 11:32:23PM +0300, Nicolas Pace wrote:
> I'm trying to run a rootfs chroot on my desktop computer to easen the
> development of userspace applications, but as I'm using ubus I need a
> complete LEDE environment.
> Using chroot also reduces the turnaround time for code/test cause I can
> just write code and it instantly is loaded on the image.
> 
> I donwloaded the image from here:
> http://ci.libremesh.org/196/x86/generic/Generic/lime_default/lede-17.01
> .2-lime-default-x86-generic-generic-rootfs.tar.gz
> 
> Mounted all devices, did chroot... but I somehow need to call init to
> get ubus running (and all of the other supporting systems).
> 
> Any suggestion on how to manually call init?

init must be started by the Linux kernel as the first userspace process
to ensure it is asssigned pid 1 and gets special privileges for
supervising other processes.

To start another init from a running system, you need some kind of
virtualization.  I am using qemu/kvm here, managed by virt-manager and
libvirtd.  This has the advantage of running the LEDE userspace on top
of the LEDE kernel instead of the host kernel, which may be missing
some LEDE-specific features.

Regards,
Mirko



More information about the Lede-dev mailing list