pavement

Linux, configuration

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(fstab: Linux filesystems)
Line 1: Line 1:
 +
==Loading Linux modules==
 
First add to ''/etc/rc.conf'', to enable Linux/ELF binary emulation:
 
First add to ''/etc/rc.conf'', to enable Linux/ELF binary emulation:
 
  linux_enable="YES"
 
  linux_enable="YES"
Line 8: Line 9:
 
  lindev_load="YES"
 
  lindev_load="YES"
  
 +
To load the module without rebooting type:
 +
kldload linux
 +
 +
==Compiling modules directly into kernel==
 
Or compile directly into the kernel by adding these options to your custom KERNCONF file in ''/usr/src/sys/*/conf/'' :
 
Or compile directly into the kernel by adding these options to your custom KERNCONF file in ''/usr/src/sys/*/conf/'' :
 
  options        COMPAT_LINUX32    # This is used for 64bit processors
 
  options        COMPAT_LINUX32    # This is used for 64bit processors
Line 14: Line 19:
 
  options        LINSYSFS
 
  options        LINSYSFS
 
  device          lindev
 
  device          lindev
 +
If this is done, comment out linux related lines in both ''rc.conf'' and ''loader.conf'' as mentioned in the previous section.
  
 +
==Linux filesystems==
 
Linux filesystems then need to be mounted via adding the following to ''/etc/fstab'' :
 
Linux filesystems then need to be mounted via adding the following to ''/etc/fstab'' :
 
  linproc        /compat/linux/proc      linprocfs    rw  0  0
 
  linproc        /compat/linux/proc      linprocfs    rw  0  0
Line 21: Line 28:
 
==References==
 
==References==
 
* Related manpages; and filesystem documentation
 
* Related manpages; and filesystem documentation
 +
* [https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linuxemu-lbc-install.html FreeBSD Handbook: Linux® Binary Compatibility]

Revision as of 15:11, 6 March 2015

Contents

Loading Linux modules

First add to /etc/rc.conf, to enable Linux/ELF binary emulation:

linux_enable="YES"

Then either edit /boot/loader.conf to include:

linprocfs_load="YES"
linsysfs="YES"
linux_load="YES"
lindev_load="YES"

To load the module without rebooting type:

kldload linux

Compiling modules directly into kernel

Or compile directly into the kernel by adding these options to your custom KERNCONF file in /usr/src/sys/*/conf/ :

options         COMPAT_LINUX32    # This is used for 64bit processors
#options        COMPAT_LINUX      # This is used for 32bit processors; this option won't work on 64bit processors
options         LINPROCFS
options         LINSYSFS
device          lindev

If this is done, comment out linux related lines in both rc.conf and loader.conf as mentioned in the previous section.

Linux filesystems

Linux filesystems then need to be mounted via adding the following to /etc/fstab :

linproc         /compat/linux/proc      linprocfs    rw  0  0
linsys          /compat/linux/sys       linsysfs     rw  0  0

References

Personal tools