Difference between revisions of "KERNEL CUSTOM BUILD"
m |
m |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''Major INFO! TAKE ALWAYS the GENERIC FILE of the LAST RELEASE AS Template to copy it to CUSTOM cause much Changes done there!''' | '''Major INFO! TAKE ALWAYS the GENERIC FILE of the LAST RELEASE AS Template to copy it to CUSTOM cause much Changes done there!''' | ||
− | + | FreeBSD 11 (AMD 64bit) Howto: | |
− | 1. Make | + | 1. Make full backup of the System Disk (disk dump) , boot o a FreeBSD Stick and mount a USB Drive, then "dd if=/dev/ad0 of=/dev/sdb bs=10240" |
− | 2. Use a copy of the current updated GENERIC Kernel | + | 2. Use a copy of the current updated "GENERIC" Kernel Config File !! (located /usr/src/sys/amd64/GENERIC) |
− | 3. If you want to upgrade | + | 3. If you want to upgrade use GENERIC-File of FreeBSD 11.0 !!! path /usr/src/sys/amd64/conf/GENERIC make a copy named "CUSTOM" and edit it to modify |
− | 4. Download the current sources of the Base System wget | + | 4. Download the current sources of the Base System wget http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/11.0-RELEASE/src.txz |
5. Extract it to /usr/src with | 5. Extract it to /usr/src with | ||
Line 18: | Line 18: | ||
6. cp GENERIC to custom | 6. cp GENERIC to custom | ||
<pre> | <pre> | ||
− | cp /usr/src/sys/ | + | cp /usr/src/sys/amd64/conf/GENERIC /usr/src/sys/amd64/conf/custom |
</pre> | </pre> | ||
− | 7. Edit custom and change | + | 7. Edit custom and change "Desciption" inside "GENERIC" to "CUSTOM", delete lines of unwanted modules, save and exit CUSTOM file. |
8. Rebuild world with: | 8. Rebuild world with: | ||
Line 31: | Line 31: | ||
make -s buildkernel KERNCONF=custom | make -s buildkernel KERNCONF=custom | ||
</pre> | </pre> | ||
− | 10. Install Custom Kernel | + | 10. Install the Custom Kernel (without the Base System first) |
<pre> | <pre> | ||
make -s installkernel | make -s installkernel | ||
Line 37: | Line 37: | ||
11. Reboot to Single Mode or Remote via SSH disable most uneeded services at /etc/rc.conf with "#", but not SSH !!! | 11. Reboot to Single Mode or Remote via SSH disable most uneeded services at /etc/rc.conf with "#", but not SSH !!! | ||
− | 12. Install World | + | 12. Install "World" Base System, Check first the Changes of Configs, install Base, Re Check the Config Changes! |
<pre> | <pre> | ||
− | mergemaster -p | + | mergemaster -p |
make -s installworld | make -s installworld | ||
− | mergemaster - | + | mergemaster -FiU |
</pre> | </pre> | ||
13. enable services at /etc/rc.conf remove "#" and Reboot the FreeBSD Server | 13. enable services at /etc/rc.conf remove "#" and Reboot the FreeBSD Server | ||
Line 47: | Line 47: | ||
14. TEST THE SYSTEM + DO SECURITY CHECKS! (sockstat -4 / -6 = open Ports) | 14. TEST THE SYSTEM + DO SECURITY CHECKS! (sockstat -4 / -6 = open Ports) | ||
+ | 15. Backup with tar /usr/ports and /usr/src to a tar archive for each folder! Prevents you from broken SVN Tree Updates!! | ||
− | + | Remark: If you have a Multi CORE CPU System you often read Tuning Tips on setting "-j5" after the make Option! Don't use it on Production Systems it can break the Build Process cause the Maintainer / Developers of the Pakets SET the correct Settings for '''successful''' and '''clean''' builds!! Often Users asked me why the "build world" breaks or the "port build" breaks! | |
− | + | Make Process runs safe on normal Mode, cause it prevent the build processes from blocking access each other or on Library Files!!! | |
− | + | Give the System to compile clean and safe.. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 11:34, 11 May 2017
Major INFO! TAKE ALWAYS the GENERIC FILE of the LAST RELEASE AS Template to copy it to CUSTOM cause much Changes done there!
FreeBSD 11 (AMD 64bit) Howto:
1. Make full backup of the System Disk (disk dump) , boot o a FreeBSD Stick and mount a USB Drive, then "dd if=/dev/ad0 of=/dev/sdb bs=10240"
2. Use a copy of the current updated "GENERIC" Kernel Config File !! (located /usr/src/sys/amd64/GENERIC)
3. If you want to upgrade use GENERIC-File of FreeBSD 11.0 !!! path /usr/src/sys/amd64/conf/GENERIC make a copy named "CUSTOM" and edit it to modify
4. Download the current sources of the Base System wget http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/11.0-RELEASE/src.txz
5. Extract it to /usr/src with
tar -C / -xvzf src.txz
6. cp GENERIC to custom
cp /usr/src/sys/amd64/conf/GENERIC /usr/src/sys/amd64/conf/custom
7. Edit custom and change "Desciption" inside "GENERIC" to "CUSTOM", delete lines of unwanted modules, save and exit CUSTOM file.
8. Rebuild world with:
cd /usr/src make -s buildworld
9. Build Custom Kernel
make -s buildkernel KERNCONF=custom
10. Install the Custom Kernel (without the Base System first)
make -s installkernel
11. Reboot to Single Mode or Remote via SSH disable most uneeded services at /etc/rc.conf with "#", but not SSH !!!
12. Install "World" Base System, Check first the Changes of Configs, install Base, Re Check the Config Changes!
mergemaster -p make -s installworld mergemaster -FiU
13. enable services at /etc/rc.conf remove "#" and Reboot the FreeBSD Server
14. TEST THE SYSTEM + DO SECURITY CHECKS! (sockstat -4 / -6 = open Ports)
15. Backup with tar /usr/ports and /usr/src to a tar archive for each folder! Prevents you from broken SVN Tree Updates!!
Remark: If you have a Multi CORE CPU System you often read Tuning Tips on setting "-j5" after the make Option! Don't use it on Production Systems it can break the Build Process cause the Maintainer / Developers of the Pakets SET the correct Settings for successful and clean builds!! Often Users asked me why the "build world" breaks or the "port build" breaks!
Make Process runs safe on normal Mode, cause it prevent the build processes from blocking access each other or on Library Files!!! Give the System to compile clean and safe..