Is it possible to build ‘Linux From Scratch’ (LFS) inside of an LXC container, as opposed to creating a dedicated partition per the LFS instructions?


LFS run it's own kernel. In LXC container or any container based virtualization guest system shares the host's kernel. So LFS can't be run inside a container based VM.

Further in absence of dedicated kernel guest suffers several restrictions inside container. Like guest can't load it's own kernel module (i.e. drivers), can't drop cache etc.

Another plan may be using the host kernel and building other packages of LFS inside the host. But that's not a full featured LFS installation rather something like chroot. Further you can't replace the existing file system as you've no access to the virtual disk while the guest is off. I believe this approach will suffer serious driver issues also, unless the LFS builder has profound experience in virtualization.

However LFS shall work fine in kvm or xen based virtualization as they allow guest machine to run it's own Kernel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.