[opensuse] 13.1 multiversion of kernels installed from KOTD - how to remove latest?
All, Troubleshooting xorg issues on my laptop, installing the kernel of the day (KOTD) was recommended. I know have 2 KOTD kernels installed on my box. I have zypper configured to allow multiversions of the kernel. I want to remove the latest KOTD kernel WITHOUT killing my system. Can I simply rpm -e the unwanted kernel to have it completely removed while preserving the remaining installed kernels and bootloader, etc.. My thought was to use: rpm -e kernel-default-devel-3.16.1-7.1.g90bc0f1.x86_64 \ kernel-desktop-3.16.1-7.1.g90bc0f1.x86_64 \ kernel-devel-3.16.1-7.1.g90bc0f1.noarch \ kernel-source-3.16.1-7.1.g90bc0f1.noarch \ kernel-syms-3.16.1-7.1.g90bc0f1.x86_64 \ kernel-xen-devel-3.16.1-7.1.g90bc0f1.x86_64 but want to make sure there are no "gotchas". I looked at yast-software management and was not comfortable at all with the level of control that provided for this removal, so rpm seems like the best option. When I remove the unwanted kernel, will that also removed the unwanted grub entry? I boot and use the normal 13.1 kernel from the oss/update repo, and test with the 3.15 KOTD kernel occasionally. The details of the kernel I want to remove, along with those that remain on the system are shown below: The kernel to remove is: kernel-desktop-3.16.1-7.1.g90bc0f1.x86_64 Source Timestamp: 2015-03-05 17:24:00 +0100 GIT Revision: 338c5133d4d302d15140c0a27d51e6d1c1b9ed3a GIT Branch: openSUSE-13.1 (along with the -devel, -source, -syms, etc...) The rpms installed are: kernel-default-devel-3.15.6-2.1.gedc5ddf.x86_64 kernel-default-devel-3.16.1-7.1.g90bc0f1.x86_64 kernel-desktop-3.11.10-17.2.x86_64 kernel-desktop-3.11.10-21.1.x86_64 kernel-desktop-3.15.6-2.1.gedc5ddf.x86_64 kernel-desktop-3.16.1-7.1.g90bc0f1.x86_64 kernel-desktop-devel-3.11.10-17.2.x86_64 kernel-desktop-devel-3.15.6-2.1.gedc5ddf.x86_64 kernel-desktop-devel-3.16.1-7.1.g90bc0f1.x86_64 kernel-devel-3.11.10-17.2.noarch kernel-devel-3.15.6-2.1.gedc5ddf.noarch kernel-devel-3.16.1-7.1.g90bc0f1.noarch kernel-firmware-20140624git-35.2.noarch kernel-source-3.11.10-17.2.noarch kernel-source-3.15.6-2.1.gedc5ddf.noarch kernel-source-3.16.1-7.1.g90bc0f1.noarch kernel-syms-3.15.6-2.1.gedc5ddf.x86_64 kernel-syms-3.16.1-7.1.g90bc0f1.x86_64 kernel-xen-devel-3.15.6-2.1.gedc5ddf.x86_64 kernel-xen-devel-3.16.1-7.1.g90bc0f1.x86_64 Thanks for any warnings/gotchas/experience you can provide. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/22/2015 12:27 PM, David C. Rankin wrote:
Thanks for any warnings/gotchas/experience you can provide.
Yea, BTDT for other reasons. Boot from rescue DVD. Mount you hard drive ROOTFS Do the bind stuff for dev. proc and other stuff chroot to the mounted ROOTFS You are not in the 'environment' of your system so you can do things like use rpm to remove what you want cos you're not actually running it. You can then do a mkinitrd etc etc etc so you can have a proper grub/grub2/lilo config file. There are HOW-TO descriptions of the process of getting to chroot out there :-) We've also discussed the process here a few time and argued over where/when to use "bind" -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
David C. Rankin composed on 2015-07-22 11:27 (UTC-0500):
Troubleshooting xorg issues on my laptop, installing the kernel of the day (KOTD) was recommended. I know have 2 KOTD kernels installed on my box. I have zypper configured to allow multiversions of the kernel. I want to remove the latest KOTD kernel WITHOUT killing my system. Can I simply rpm -e the unwanted kernel to have it completely removed while preserving the remaining installed kernels and bootloader, etc.. My thought was to use:
rpm -e kernel-default-devel-3.16.1-7.1.g90bc0f1.x86_64 \ kernel-desktop-3.16.1-7.1.g90bc0f1.x86_64 \ kernel-devel-3.16.1-7.1.g90bc0f1.noarch \ kernel-source-3.16.1-7.1.g90bc0f1.noarch \ kernel-syms-3.16.1-7.1.g90bc0f1.x86_64 \ kernel-xen-devel-3.16.1-7.1.g90bc0f1.x86_64
but want to make sure there are no "gotchas"...
I have multiple 13.1 installations that I have switched between oss kernels and those from http://download.opensuse.org/repositories/home:/mkubecek:/evergreen-13.1/ope... . Removing non-running kernels has been a simple process in every case, with no observable gotcha of any consequence. I have had 13.1 subsequently refuse to reboot normally either at all or within a reasonable time, but this has only been a one time thing each time on the boot on which the removals were made. The shutdown process seems to proceed normally, but simply stops without either a shutdown or a restart, necessitating a reset button or power switch to finish the process. IIRC, I've only used zypper -v rm, but it's possible I may have used YaST2 or rpm -e once or twice. If you want to remove the most recently installed, simply boot into any of the installed older kernels, then remove the latest. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/22/2015 12:29 PM, Felix Miata wrote:
If you want to remove the most recently installed, simply boot into any of the installed older kernels, then remove the latest.
That's what I thought. I have been using the grub advanced options menu to get to the normal desktop kernel to boot (pain in the a$$ since you cannot choose and set a default kernel to boot in grub2). I have installed all the KOTD kernels with rpm -UVH, so I wouldn't think I would need to boot the rescue CD to remove them as long as I wasn't booted into the kernel I was trying to remove. For the install, the post_install scripts handled the mkinitrd calls, so I suspect the post_remove scripts should trigger a initrd rebuild just the same. I've never had an issues in the past with the SysVinit releases, but I haven't done any kernel removals on 13.1 with systemd. (I've done it with Arch, but that's all manual to begin with) Does anyone have a kernel.spec handy or a link to one so I can check what post_remove actions are done? -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Thu, 23 Jul 2015 13:41:08 -0500 "David C. Rankin" <drankinatty@suddenlinkmail.com> пишет:
On 07/22/2015 12:29 PM, Felix Miata wrote:
If you want to remove the most recently installed, simply boot into any of the installed older kernels, then remove the latest.
That's what I thought. I have been using the grub advanced options menu to get to the normal desktop kernel to boot (pain in the a$$ since you cannot choose and set a default kernel to boot in grub2).
Actually you can. Each menu entry generated by grub-mkconfig has unique ID which is built predictably and should remain constant across different grub-mkconfig invocations. It is preferred way to set default boot entry because it does not depend on relative order. menuentry 'openSUSE 13.2, with Linux 3.16.7-7-desktop' ... $menuentry_id_option 'gnulinux-3.16.7-7-desktop-advanced-bf08b064-2753-45b5-9af1-4fab01c9cca5' Here ID is gnulinux-3.16.7-7-desktop-advanced-bf08b064-2753-45b5-9af1-4fab01c9cca5 It becomes a bit more complicated with submenus, where default boot entry should be full "path" from the top. So for submenu 'Advanced options for openSUSE 13.2' $menuentry_id_option 'gnulinux-advanced-bf08b064-2753-45b5-9af1-4fab01c9cca5' { menuentry 'openSUSE 13.2, with Linux 3.16.7-21-desktop' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.7- 21-desktop-advanced-bf08b064-2753-45b5-9af1-4fab01c9cca5' { Default boot entry would be gnulinux-advanced-bf08b064-2753-45b5-9af1-4fab01c9cca5>gnulinux-3.16.7- 21-desktop-advanced-bf08b064-2753-45b5-9af1-4fab01c9cca5 (one line of course). List of IDs separated by '>'. It is highly recommended for any third-party program that creates grub menu to generate unique stable IDs as well. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/23/2015 02:04 PM, Andrei Borzenkov wrote:
Actually you can. Each menu entry generated by grub-mkconfig has unique ID which is built predictably and should remain constant across different grub-mkconfig invocations. It is preferred way to set default boot entry because it does not depend on relative order.
Andrei, You da man... You've just made my day. Thanks! -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Andrei Borzenkov
-
Anton Aylward
-
David C. Rankin
-
Felix Miata