-
Install package
pacman -S bc
- Download kernel source
tar xvf linux-4.3.2.tar.xz -C /usr/src/
cd /usr/src//linux-4.3.2/
make mrproper (Ensures that the kernel tree is absolutely clean.)
- Use system configuration file to compile kernel
zcat /proc/config.gz > .config
- Start to compile
make
make modules_install
This copies the compiled modules into /lib/modules/ARCH-X.X.X/
- Copy the kernel to /boot directory
cp -v arch/x86/boot/bzImage /boot/vmlinuz-ARCH-4.3.2
- Make initial RAM disk
mkinitcpio -k FullKernelName -c /etc/mkinitcpio.conf -g /boot/initramfs-YourKernelName.img
Check out which is FullKernelName under /lib/modules
I have 4.3.2-ARCH-4.3.2 which I create and under my /lib/modules.
Ex:
sudo mkinitcpio -k 4.3.2-ARCH-4.3.2 -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-ARCH-4.3.2
==> Starting build: 4.3.2-ARCH-4.3.2
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-ARCH-4.3.2
==> Image generation successful
- Switch kernel to new one (Quick method)
initramfs-linux-ARCH-4.3.2 (size: 3.6M) (Initial RAM disk)
vmlinuz-ARCH-4.3.2 (size: 4.4M) (Kernel)
cd /boot
Backup the original one
cp vmlinuz-linux{,.ori}
cp initramfs-linux.img{,.ori}
Use new kernel to replace old one
cp vmlinuz-ARCH-4.3.2 vmlinuz-linux
cp initramfs-linux-ARCH-4.3.2 initramfs-linux.img
Reference:
Virtualbox:
0 意見:
張貼留言