The latest kernel update brought some questions to my mind. I spent some amount of time trying to find some documentation on this, but couldn’t. I would be just as happy with a link to docs as a direct answer, or at least search parameters.
After the installation of the new kernel, (yast2->online updates) I am presented with two new boot options. One for the new kernel, and another for the new kernel in failsafe mode. The same options are available for the old kernel.
Remembering something about there being a limited amount of space for booting, I went looking at the fat partition. Turns out there’s no more space taken than before. The new stuff is placed in /boot
bart@Asus-990FX:/boot> ls -Ag --group-directories-first -h
total 90M
drwxrwxr-x 3 root 16K Dec 31 1969 efi
drwxr-xr-x 2 root 4.0K Apr 30 09:43 grub
drwxr-xr-x 7 root 4.0K May 5 20:16 grub2
lrwxrwxrwx 1 root 1 Apr 30 09:43 boot -> .
-rw-r--r-- 1 root 1.5K Feb 26 07:34 boot.readme
-rw-r--r-- 1 root 133K Mar 1 04:40 config-3.7.10-1.1-desktop
-rw-r--r-- 1 root 133K Apr 19 07:43 config-3.7.10-1.4-desktop
lrwxrwxrwx 1 root 5 Mar 6 04:41 grub2-efi -> grub2
lrwxrwxrwx 1 root 25 May 5 17:43 initrd -> initrd-3.7.10-1.4-desktop
-rw-r--r-- 1 root 32M May 2 19:01 initrd-3.7.10-1.1-desktop
-rw-r--r-- 1 root 32M May 5 17:43 initrd-3.7.10-1.4-desktop
-rw-r--r-- 1 root 607K May 1 00:52 message
-rw-r--r-- 1 root 236K Mar 1 06:00 symvers-3.7.10-1.1-desktop.gz
-rw-r--r-- 1 root 236K Apr 19 08:32 symvers-3.7.10-1.4-desktop.gz
-rw-r--r-- 1 root 516 Mar 1 06:00 sysctl.conf-3.7.10-1.1-desktop
-rw-r--r-- 1 root 516 Apr 19 08:32 sysctl.conf-3.7.10-1.4-desktop
-rw-r--r-- 1 root 2.5M Mar 1 05:48 System.map-3.7.10-1.1-desktop
-rw-r--r-- 1 root 2.5M Apr 19 08:25 System.map-3.7.10-1.4-desktop
-rw-r--r-- 1 root 5.6M Mar 1 06:00 vmlinux-3.7.10-1.1-desktop.gz
-rw-r--r-- 1 root 5.6M Apr 19 08:32 vmlinux-3.7.10-1.4-desktop.gz
lrwxrwxrwx 1 root 26 May 5 17:43 vmlinuz -> vmlinuz-3.7.10-1.4-desktop
-rw-r--r-- 1 root 4.8M Mar 1 08:05 vmlinuz-3.7.10-1.1-desktop
-rw-r--r-- 1 root 4.8M Apr 19 09:41 vmlinuz-3.7.10-1.4-desktop
There are over 40 Megs of space taken up that may or may not be needed.
Other than keeping the old kernel available for a few days in case of problems, or if I were doing system development, is there a reason to keep it?
As additional releases of the kernel are made available, I can see the menu becoming a mess.
If/when I decide to “clean up”, I would think I could simply remove all the files with the old version number but, does grub2 recognize the absence?
Is there a recommended process for doing this?
Is there a good reason for not doing this?
Bart
no need to keep it if the new one is working OK
don’t confuse the boot directory (which may or may not be on a separate partition) and the new efi boot partition which is mounted at /boot/efi and formatted as fat. Two different animal with the same name. Like root the partition root the base of the file system and root the admin user. I mean there is nothing confusing about that LOL
rotfl!
Thanks! I wasn’t sure.
don’t confuse the boot directory (which may or may not be on a separate partition) and the new efi boot partition which is mounted at /boot/efi and formatted as fat. Two different animal with the same name. Like root the partition root the base of the file system and root the admin user. I mean there is nothing confusing about that LOL
rotfl!
It seems it’s harder to have to unlearn and relearn than to learn from scratch. I had, or at least thought I had, the FAT system down pretty good. I could get around a 360k floppy quite comfortably. But now… let’s just say it’s a little humbling. And frustrating!
Bart
Yes, the content of the EFI partition (“/boot/efi”) will be about the same. The new kernels and the “initrd” files are in “/boot”.
On some of my systems, “/boot” is a separate partition and space is limited there.
No. If you are satisfied with the new kernel, then you can remove the old one.
I think it is supposed to only keep the most recent two or three. However, there are four kernels on a box I have with Tumbleweed.
Yes, there is a better way. Fire up Yast Software Management.
Enter “kernel” in the search box, and click “search”.
Select your kernel version (for me that is “kernel-desktop”. It’s probably the same for you.
Click the “versions” tab near the bottom.
That should show two kernels checked. Click the one that you don’t want. The check mark will change to an up-arrow (for reinstall). Click again, and the check mark will change to X for delete.
Maybe do the same for “kernel-devel”, “kernel-desktop-devel”, “kernel-default-devel”, “kernel-zen-devel”, “kernel-syms” if you have those.
Then click “Accept”. Yast will remove the unwanted kernel and a lot of associated stuff. It will also rebuild the grub menu for you.
That’s a lot easier that the way I did it.
Although I did learn something in the process!
I renamed all the old files in /boot to the same names as they were but added .backup to the end. I then ran grub-mkconfig and to my surprise, it still found the old files and added them to the menu along with the .backup extension! I was surprised by that. So, I re-renamed them again, appending "Backup of " to the beginning of the file names. This worked as I expected.
I’m guessing grub-mkconfig is only looking at the beginning of a file name to decide whether or not to include it.
Thanks for your response. I’ll print it and file it in my Cheat Sheet notebook.
Bart