Updating grub config in ubuntu

After the kernel compilation, the “make install” step in Fedora/RedHat/CenOS will prepare the initrd image and update the grub.conf automatically. But it’s little different in Ubuntu. It doesn’t create any initrd or doesn’t update the grub configuration. Moreover, Ubuntu does not have the gurb.conf file, but instead it has a grub.cfg file which is automatically generated by a command called “grub-mkconfig”. It has a lot of syntax difference than the regular grub.conf. Anyways, once the new kernel is configured, compiled and modules are copied to /lib/modules/ directory, do execute “make install” even though it doesn’t prepare initramfs or update grub.cfg, because it will copy the kernel into /boot directory Smile with tongue out Anyways, next steps would be:

sudo update-initramfs -k –c
#Here will be the kernel version (including whatever local name is appended by user)
sudo grub-mkconfig –o /boot/grub/grub.cfg
#Here –o option will specify where the updated grub.cfg should reside. By default its on stdout

Done, life is good.


One thought on “Updating grub config in ubuntu

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s