Hello everyone,
Here's a tutorial on how to build and install a custom PAE kernel for FreeBSD 9.2.
By default, the i386 processor architecture only recognizes 4 GB or less memory. The FreeBSD kernel supports PAE as a build option. After compiling a PAE enabled kernel, the 4 GB limit will increase to 64 GB.
Recompiling the kernel is best to be done right after the OS has been installed. Nonetheless, a backup of the old kernel doesn't hurt. This will be the “good ol'†boot-able kernel, if the PAE enabled kernel doesn't want to boot.
In case you have other things to backup, now is the time to do it.
Now let's start.
After installing the custom kernel with the PAE feature, the dmesg command shows all the memory installed on the machine:
If something goes wrong and the PAE kernel doesn't want to boot, reboot the machine and at the Boot Menu select option 6, "Escape to loader prompt". At the "Ok" prompt, execute
Here's a tutorial on how to build and install a custom PAE kernel for FreeBSD 9.2.
By default, the i386 processor architecture only recognizes 4 GB or less memory. The FreeBSD kernel supports PAE as a build option. After compiling a PAE enabled kernel, the 4 GB limit will increase to 64 GB.
Recompiling the kernel is best to be done right after the OS has been installed. Nonetheless, a backup of the old kernel doesn't hurt. This will be the “good ol'†boot-able kernel, if the PAE enabled kernel doesn't want to boot.
# cp -r /boot/kernel /boot/kernel.GOOD
In case you have other things to backup, now is the time to do it.
Now let's start.
- Download the src.txz archive which contains the kernel sources:
# cd /tmp; fetch [url=ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/9.2-RELEASE/src.txz]ftp://ftp.freebsd.org/pub/FreeBSD/relea ... SE/src.txz[/url]
- Remove the /usr/src/ directory (if present):
# rm -rf /usr/src/
- Unpack the archive to /usr/src:
# tar -C / -xvzf src.txz
- Rebuild the kernel by creating a file (the custom kernel file) in /usr/src/sys/i386/conf:
# cd /usr/src/sys/i386/conf
# touch KERNEL-PAE
# nano -w KERNEL-PAE
Add the following:
Code:include PAE
Code:# ALTQ options ALTQ options ALTQ_CBQ # Class Bases Queuing (CBQ) options ALTQ_RED # Random Early Detection (RED) options ALTQ_RIO # RED In/Out options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC) options ALTQ_PRIQ # Priority Queuing (PRIQ) options ALTQ_NOPCC # Required for SMP build (SMP support for ALTQ) # ALTQ device pf # enables PF support device pflog # enables the optional pflog pseudo network device device pfsync # enables the optional pfsync pseudo-network device
- Before proceeding into building the custom kernel please take a look at /usr/src/sys/i386/conf/NOTES and /usr/src/sys/i386/conf/PAE for more information.
- Compile and build the custom kernel:
# cd /usr/src; make buildkernel KERNCONF=KERNEL-PAE
- If case of no errors, you can install the custom kernel:
# cd /usr/src; make installkernel KERNCONF=KERNEL-PAE
- Reboot the machine.
Code:
[CMD=#]dmesg[/CMD]
... output ommited ...
real memory = 8589934592 (8192 MB)
avail memory = 3928604672 (3746 MB)
... output omitted ...
Code:
[CMD=#]dmesg[/CMD]
... output omitted ...
real memory = 8589934592 (8192 MB)
avail memory = 8135839744 (7758 MB)
... output omitted ...
boot /boot/kernel.GOOD/kernel
. It should now boot into the GENERIC kernel.