I was wondering if you could do a chroot from Freebsd to GNU/Linux, because I know that Freebsd also has a compatibility layer for executable GNU/Linux?

Of course provided that there is support to the filesystem and shell.

up vote 4 down vote accepted

If you install linux ABI support on FreeBSD, you can simply execute a Linux binary and it looks like a Linux environment for this application, with the exception that user homes are still available.

You can try it yourself and look at the system by simply executing:

/compat/linux/bin/bash

Type for example uname -a and you'll get Linux version information.

I've also heard about people having Linux running in a FreeBSD jail, but I don't know if this really works well. It may come closer to a chroot environment. And there is also bhyve that does real virtualization.

  • 2
    Linux running in a FreeBSD jail is the point of this question. Is the FreeBSD emulation good enough to run not only run-of-the-mill applications, but system binaries such as systemd? – Gilles Sep 25 '16 at 22:49
  • 2
    The ABI layer is very powerful and give full compatibility. But do not confuse it with a hypervisor. A jail is a different beast entirely and not related to the ABI. You can run ABI in a Jail - but it is not a VM. A nice explanation of the ABI here: freebsd.org/doc/en_US.ISO8859-1/articles/linux-emulation/… – Claus Andersen Sep 26 '16 at 9:05
  • 1
    @oscarandrea The FreeBSD livefs CD does not have the Linux base packages that are needed, if I remember correctly. You should install FreeBSD and follow the manual that I referenced above. – Martin Sugioarto Sep 26 '16 at 9:08
  • 1
    @Gilles No, you cannot run very low-level software. This is an ABI emulation and not full system emulation. The system is already started and does not need init/systemd. bhyve or VirtualBox might be interesting for you. – Martin Sugioarto Sep 26 '16 at 9:08
  • 1
    guys have got it wrong, I do not want to emulate throughout the system (init etc) but I just want to do the chroot bash :) – oscarandrea Sep 26 '16 at 14:39

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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