luckily this system was not important - as I am unable to boot after doing so
Q1: What is the recommended / OpenSuSE-way to do this?
Q2: is there a way to recover the system after my attempt to do the house keeping? It’s a virtual host (KVM)
Hi
Sure your in the right forum since you have fedora kernels?
On openSUSE 13.1 there is a configuration change you can make to the zypper config to only keep the latest kernel. In saying that the systemd service purge-kernels.service should clean it up, else run this manually…
With a default openSUSE install if you opt for a separate boot partition you need to allow space for 3 kernels, this is about 400- 500 meg. You can adjust the zypper configuration so that old kernels are not kept. Basically when a new kernel is installed therr can be as many as 3 kernels once the newest successfully boots the oldest is removed.
printf '%s
' 'g/^multiversion/s/^/# /' w | ed -s /etc/zypp/zypp.conf
check what is in there.
grep '^^#]' /etc/zypp/zypp.conf
Remove the other kernels that you do not use and you should only have one kernel installed at a time. The question is can you live with just one kernel installed? I can ;).
Hi - yeah, I realised that some time ago, but I forgot to change the boot partition size for this (and frankly, a couple of other) system. So rather than making a fresh install I tried to get around with some cleaning.
Seemed quite reasonable … at least before I tried to do it
Thanks, I’ll try this ASAP on another system.
In fact, I don’t mind allocating 500 MB boot (or 1G) - on the other hand I’m pretty sure I’ll never use other kernels.
What bothers me is wheter updating would also fill the 1G eventually
Shouldn’t happen.
By default only the two most recent kernels are kept.
Older ones should be removed automatically by that purge-kernels.service.
Check that this is enabled:
systemctl status purge-kernels.service
(or YaST->System->Services Manager)
Btw, what you wrote in your first post would work on openSUSE as well, i.e. “rpm -qa|grep ^kernel” to get a list of the installed kernels, then run “rpm -e kernel-desktop-3.11.10-10” f.e. to remove a specific one.
Or use YaST->Software Management, if you click on the “Versions” tab below the package list, you can install/remove specific versions.
Of course you have to keep at least one kernel to be able to boot.
The easiest way to recover the system would be to boot from an installation CD/DVD and select “Upgrade an existing installation”. You might even de-select all packages to be installed (click on “Software” on the overview screen) except for the kernel.
> Hi - yeah, I realised that some time ago, but I forgot to change the
> boot partition size for this (and frankly, a couple of other) system. So
> rather than making a fresh install I tried to get around with some
> cleaning.
> Seemed quite reasonable … at least before I tried to do it
My boot partition is just 190 MB, and I have the default two kernels
(which is three during a kernel update; on the next boot, the older
kernel of the three gets purged and we are back to two). The small
partition suffices because I removed plymouth from the installation.
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)
Each initrd has 24MB, all the other kernel files (that are in /boot) are about 15 MB per kernel.
So with 190 MB there would be more than enough space for a fourth kernel, too.
On 2014-07-03 13:56, wolfi323 wrote:
>
> robin_listas;2652207 Wrote:
> Each initrd has 24MB, all the other kernel files (that are in /boot) are
> about 15 MB per kernel.
> So with 190 MB there would be more than enough space for a fourth
> kernel, too.
My initrd, without plymouth, are 18 MiB each. With plymouth, they were
about double. And I also have a locally compiled kernel, and some margin:
Telcontar:~ # df -h /boot/
Filesystem Size Used Avail Use% Mounted on
/dev/sdc2 190M 91M 87M 52% /boot
Telcontar:~ #
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)
As I said, they are 24 MB here each (with plymouth, on 13.1). And I didn’t tweak anything.
I think on 12.3 they were bigger though.
Btw, on my Factory installation they are only 16MB now…
But the actual size also depends on your system of course, i.e. what stuff exactly has to be put into the initrd.
The nvidia kernel module is somewhat bigger than my radeon f.e.
With the size you mentioned (36 MB per initrd), one would get about 50 MB per kernel, so 190 MB would still be plenty for 3 kernels.
And I also have a locally compiled kernel, and some margin:
Telcontar:~ # df -h /boot/
Filesystem Size Used Avail Use% Mounted on
/dev/sdc2 190M 91M 87M 52% /boot
Telcontar:~ #
But still you should have enough space even with plymouth. According to your numbers that would be 36MB more, which would still leave 50M free.
That doesn’t mean that you should install it again, though. I’m just saying that 190MB should be enough even if you don’t remove plymouth…
For the default 2 (+1) kernels, that is.
Always thought 200 meg was enough but when I last posted that several people said 200 was not enough. I don’t use a separate boot so I have never had to personally worry about it. Also it is a good idea to always allow a bit of elbow room so 500 meg is not unreasonable.