Compress FreeBSD kernel-general Linux technology-Linux programming and kernel information. The following is a detailed description. I use both Linux and FreeBSD. The "make zImage" feature of Linux allows me to customize the compressed kernel, which is especially convenient when I create a boot disk and an emergency disk. I have not found similar functions in FreeBSD, And the compiled kernel is much larger. Does FreeBSD support kernel compression?
In fact, FreeBSD's installation disk uses the compressed kernel, which is completed by the kzip tool. The kernel compression method is as follows.
① Log On As root.
② Go To The kzip directory:
# Cd/sys/i386/boot/kzipboot
③ Compile kzip:
# Make all
④ Compress and check the kernel. Generally, the compression ratio can reach 50%.
# Kzip/kernel
# Ls-l/kernel *
⑤ Back up the original kernel, modify the kernel tag, and copy and compress the kernel:
# Cp/kernel. orig
# Mv/kernel. kz/kernel
# Chflags schg/kernel
6. restart the system to make the change take effect:
# Sync; reboot
If everything is normal, when the system starts again, you will see:
Uncompressing kernel... done
Booting the kernel
With the compressed kernel, you can easily customize your boot disk.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.