robert3t

How I run vanilla kernels

Nov 4th, 2019
688
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.69 KB | None | 0 0
  1. cd /usr/src
  2. wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.4-rc2.tar.xz
  3. wget https://git.kernel.org/torvalds/t/linux-5.4-rc2.tar.gz
  4. unxz linux-5.4-rc2.tar.xz
  5. tar -xzvf linux-5.4-rc2.tar.gz
  6. tar -xvf linux-5.4-rc2.tar
  7. cd linux-5.4-rc2
  8. make clean && make mrproper
  9. zcat /proc/config.gz > .config
  10. make olddefconfig
  11. make -j9    # maybe j7 id you're already running a VM
  12. make modules_install
  13. #NOTE DEPMOD  5.4-rc2 - VERY IMPORTANT!
  14.  
  15. cp arch/x86/boot/bzImage /boot/vmlinuz-vanilla-5.4-rc2
  16. cp System.map /boot/System.map-vanilla-5.4-rc2
  17. cp .config /boot/config-vanilla-5.4-rc2
  18. cd /boot
  19. rm System.map
  20. ln -s System.map-vanilla-5.4-rc2 System.map
  21.  
  22. #/usr/share/mkinitrd/mkinitrd_command_generator.sh
  23.  
  24. mkinitrd -c -k 5.4.0-rc2 -f ext4 -r /dev/sda2 -m usb-storage:ehci-hcd:ehci-pci:xhci-pci:ohci-pci:xhci-hcd:uhci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-asus:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:crc32c-intel:ext4 -u -o /boot/initrd-vanilla.gz
  25.  
  26. rm config
  27. ln -s config-vanilla-5.4-rc2 config
  28. rm vmlinuz-vanilla
  29. ln -s vmlinuz-vanilla-5.4-rc2 vmlinuz-vanilla
  30.  
  31.  
  32. #doctor up lilo
  33. cat /etc/lilo.conf
  34.  
  35. ls -l /boot/vmlinuz-vanilla
  36. ls -l /boot/initrd-vanilla.gz
  37.  
  38. # Linux bootable partition config begins
  39. default = Slackware
  40. image = /boot/vmlinuz
  41.   label = Linux
  42.   root = /dev/sda2
  43.   read-only
  44. image = /boot/vmlinuz-vanilla
  45.   label = Vanilla
  46.   initrd = /boot/initrd-vanilla.gz
  47.   root = /dev/sda2
  48.   read-only
  49. image = /boot/vmlinuz-generic
  50.   label = Slackware
  51.   initrd = /boot/initrd.gz
  52.   root = /dev/sda2
  53.   read-only
  54. # Linux bootable partition config ends
  55.  
  56. #Make sure all parts are there
  57.  
  58. #Then re-run lilo
  59.  
  60. lilo -v
Advertisement
Add Comment
Please, Sign In to add comment