Is possible to chroot FreeBSD from Linux?

I'd like to modify FreeBSD so I downloaded FreeBSD iso and I tried to chroot it from Fedora, but it says ''bin/bash no such file or directory''

So is possible to chroot it on Fedora?
 
DK about to what extent chroot would work cross-distro, but the error you posted has to do with the fact that bash is not included in the FreeBSD base distribution and must be installed extra. Use /bin/sh.
 
I think you can chroot if you change your feodora's user shell to a shell that exists in freebsd's /bin/
But dunno about libs will they work or not

btw, why you need it?
 
Code:
[m@host-xx-xxx-xxx-x ~]$ /bin/sh
sh-4.2$ sudo chroot /home/m/Desktop/freebsd
[sudo] password for m: 
chroot: failed to run command `/bin/bash': No such file or directory

Code:
chsh -s /bin/sh
Changing shell for m.
Password: 
Shell changed.

[m@host-xx-xxx-xxx-x ~]$ su
Password: 
[root@host-xx-xxx-xxx-x m]# chroot /home/m/Desktop/freebsd
chroot: failed to run command `/bin/bash': No such file or directory

btw, why you need it?
I want to have installed KDE and others after install FreeBSD out of the box.
 
Meroque said:
I want to have installed KDE and others after install FreeBSD out of the box.

Installing the KDE FreeBSD package via `pkg_add` is going to be much easier than this.

Also... I doubt this is possible. Surely the running kernel wouldn't know how to run the binaries.
 
You probably want [cmd=]sudo chroot /home/m/Desktop/freebsd /bin/sh[/cmd] or simillar.

And I don't think it'll work anyway, as FreeBSD and Linux are not binary compatible. But who knows -- maybe Linux has a FreeBSD emulation layer?
 
The emulation layer is called "Why use emulation when you can use virtualization?". The only method I know of using FreeBSD on a Linux machine is through virtualization. Pick any of qemu, kvm, xen, vmware, or virtualbox. Not sure which of these work other than qemu.
 
Back
Top