From 101096c0f21975124c3d75f5b09ee3ea1e6d55e7 Mon Sep 17 00:00:00 2001 From: Brandon Nielsen Date: Fri, 3 Dec 2021 10:37:42 -0600 Subject: [PATCH] Update a couple of commands for cleanup. Fedora doesn't seem to use "initrd" anymore, so show removing "initramfs" instead. Fedora uses the Boot Loader Specification[0] for defining boot entries, the grub config should rarely need to be edited by hand. Show removing the drop in entries made by installing the custom kernel, and rebuilding the grub config. [0] - https://systemd.io/BOOT_LOADER_SPECIFICATION/ --- .../pages/kernel/build-custom-kernel.adoc | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/modules/ROOT/pages/kernel/build-custom-kernel.adoc b/modules/ROOT/pages/kernel/build-custom-kernel.adoc index a5f6ffe..07699d2 100644 --- a/modules/ROOT/pages/kernel/build-custom-kernel.adoc +++ b/modules/ROOT/pages/kernel/build-custom-kernel.adoc @@ -330,19 +330,16 @@ below (just replace 'dave' with whatever tag you chose): [source,bash] ---- -rm -f /boot/config-2.6.*dave* /boot/initrd-2.6.*dave* /boot/vmlinuz-*dave* /boot/System.map-*dave* -rm -rf /lib/modules/2.6*dave* +rm -f /boot/config-*dave* /boot/initramfs-*dave* /boot/vmlinuz-*dave* /boot/System.map-*dave* +rm -rf /lib/modules/*dave* ---- -Finally, you will need to remove the kernel as an option to your bootloader. -This will change from architecture to architecture. For x86, (as root), edit -`/boot/grub2/grub.cfg` or `/boot/efi/EFI/fedora/grub.cfg` if you have EFI enabled -and delete the four lines relating to your kernel (They should be easy to spot, -they'll be the ones with your tag). They'll look something like: +Finally, you will need to remove the kernel as an option in your bootloader. +Assuming your system is running grub2, this can be done by removing the +bootloader specification entries and rebuilding the grub config: +[source,bash] ---- -title Fedora Core (2.6.22-rc3-dave) -root (hd0,0) -kernel /vmlinuz-2.6.22-rc3-dave ro root=/dev/md0 -initrd /initrd-2.6.22-rc3-dave.img +rm -f /boot/loader/entries/*dave* +grub2-mkconfig -o /boot/grub2/grub.cfg ----