编译FreeBSD内核
1,首先/boot应当最少保留1G左右的空间.
2,在当前内核位置复制一个复本.当前内核位置是/usr/src/sys/i386(amd64)/conf.
3,对内核进行适当的修改,以适合当前使用环境为宜.
4,然后按如下步骤进行编译.
cd /usr/src #(or to the directory containing your source tree). make buildworld make buildkernel KERNCONF=YOUR_KERNEL_HERE #(default is GENERIC). make installkernel KERNCONF=YOUR_KERNEL_HERE #(default is GENERIC). #[steps 3. & 4. can be combined by using the "kernel" target] reboot #(in single user mode: boot -s from the loader prompt). fsck -p mount -u / mount -a -t ufs swapon -a mergemaster -p cd /usr/src make installworld make delete-old mergemaster #(you may wish to use -U or -ai). reboot make delete-old-libs #(in case no 3rd party program uses them anymore)