Build Custom Kernel: Difference between revisions

From wiki
Jump to navigation Jump to search
imported>Jacob
No edit summary
imported>Jacob
No edit summary
Line 4: Line 4:
<hr>
<hr>


### Build Custom kernel with ALTQ for firewalls
=== Build Custom kernel with ALTQ for firewalls ===


First ensure the custom kernel configuration files are downloaded in the ~/conf/kernels directory.
We use the methode of having a source file with the specifics only, which includes the GENERIC file.
In the firewall case we used GENERIC_STRIPPED which is the GENERIC file with unused options and hardware commented out to reduce Kernel compilation time.
Then make a folder in the boot directory where we will store the configuration files for the host specific kernel.
>$ ~/conf/kernels
>$ su
  ># mkdir /boot/kernels
  ># mkdir /boot/kernels
># cp FIRE_V040 /boot/kernels/
># cp GENERIC_STRIPPED /boot/kernels/
Make a copy of the current generic kernel, if this is the first build.
Make now links from the kernel source directory to the kernel configuration files in the /boot/kernels directory.
># cd /usr/src/sys/amd64/conf
># ln -s /boot/kernels/GENERIC_STRIPPED ./GENERIC_STRIPPED
># ln -s /boot/kernels/FIRE_V040 ./FIRE_V040
Go to the root of the src directory and switch to screen so you can detach it to let it run from a ssh session.
># cd /usr/src/
># screen





Revision as of 12:24, 12 January 2020


Previous post install actions Return ssh configuration


Build Custom kernel with ALTQ for firewalls

First ensure the custom kernel configuration files are downloaded in the ~/conf/kernels directory. We use the methode of having a source file with the specifics only, which includes the GENERIC file. In the firewall case we used GENERIC_STRIPPED which is the GENERIC file with unused options and hardware commented out to reduce Kernel compilation time. Then make a folder in the boot directory where we will store the configuration files for the host specific kernel.

>$ ~/conf/kernels
>$ su
># mkdir /boot/kernels
># cp FIRE_V040 /boot/kernels/
># cp GENERIC_STRIPPED /boot/kernels/

Make a copy of the current generic kernel, if this is the first build.

Make now links from the kernel source directory to the kernel configuration files in the /boot/kernels directory.

># cd /usr/src/sys/amd64/conf
># ln -s /boot/kernels/GENERIC_STRIPPED ./GENERIC_STRIPPED
># ln -s /boot/kernels/FIRE_V040 ./FIRE_V040

Go to the root of the src directory and switch to screen so you can detach it to let it run from a ssh session.

># cd /usr/src/
># screen



Previous post install actions Return ssh configuration

Up Freebsd Knowledge Base