Grub entries for custom compiled kernel

Hello:
I have just compiled a kernel (latest 5.8.4) on my machine for the first time today, so am complete newbie to this. Pl. bear.

I have compiled the kernel, added the modules.
I am at the last step in this tutorial:
https://wiki.archlinux.org/index.php/Kernel/Traditional_compilation#Compilation
where it says to update bootloader configuration.

My question is:
Do I just add the two entries for my custom kernel to /boot/grub/grub.cfg
like so

linux /vmlinuz-linux-jwr
initrd /initramfs-linux-jwr.img

and then do update-grub? Or do I edit something in /etc/default/grub? Or do I edit /etc/grub.d? Or do I follow this advise:

  • The user can create a custom file in which the user can place his own menu entries. This file will not be overwritten. By default, a custom file named 40_custom is available for use in the /etc/grub.d folder.

Thanks in advance
-Vinay

Nevermind, I figured it out based on this convo:

Basically, since I had already moved my kernels and initramfs to /boot, all I needed to do was run update-grub (which I had installed earlier using yay from AUR since it is not packaged along with AL. If you don’t want that, you can just use grub-mkconfig directly.

Thanks all the same folks! Drink a few beers for me.

Glad that you got it figured.

Note that /usr/bin/update-grub is just a wrapper script:

#!/bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"

Thanks HoaSji. Yes, I am used to that wrapper. so I installed it using yay, but prefer to know the underlying executable that you explained and want to do away with the wrapper in the future.

1 Like

Thanks Altman.

No problem @vinay

A simple alias in your shell configuration is enough:

alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
1 Like

do love, Mr. HoaS.

Btw, have you used surfraw? You seem to know your shit, which I always respect.

– “It is not the heathen who were intolerant killers, it is the so-called “monotheists” who spread intolerance and death throughout the world.” (heathen by choice)

Nah, it’s too bloated :stuck_out_tongue:

http://daemonforums.org/showthread.php?t=11538