Project

General

Profile

Feature #811

Updated by Daniel Curtis almost 8 years ago

This is a guide on how I compiled VIMAGE support into a custom FreeBSD 10.2 kernel.  

 h2. Download the kernel sources 

 * Install subversion: 
 <pre> 
 pkg install subversion 
 </pre> 

 * Download the FreeBSD 10.2 kernel sources 
 <pre> 
 svn checkout http://svn.freebsd.org/base/release/10.2.0/ /usr/src 
 </pre> 

 h2. Create a custom kernel config 

 * Change into the kernel source directory and create a new kernel 
 <pre> 
 cd /usr/src/sys/amd64/conf 
 cp GENERIC NEWKERNEL 
 </pre> 

 * Edit the new kernel config file: 
 <pre> 
 vi NEWKERNEL 
 </pre> 
 #* And add the following: 
 <pre> 
 options           VIMAGE 
 options           RACCT 
 options           RCTL 
 </pre> 

 h2. Build and install the new kernel 

 * Change to the kernel source directory, then build and install the new kernel: 
 <pre> 
 cd /usr/src 
 make buildkernel KERNCONF=NEWKERNEL 
 make installkernel KERNCONF=NEWKERNEL 
 </pre> 
 *NOTE*: This process took about 2 hours on the VM I used. 

 h2. Resources 

 * http://jsherz.com/freebsd/jails/kernel/vnet/2015/11/17/custom-kernel-jails-vnet.html 
 * http://wiki.polymorf.fr/index.php/Howto:FreeBSD_jail_vnet 
 * https://github.com/iocage/iocage/blob/master/README.md

Back