Am 20.09.2011 10:53, schrieb Michal Marek:
I submitted it to Factory, please try once a new mkinitrd package is published.
Michal
I didn't want to wait until this package shows up in factory, so I decided to do some preliminary testing on my own. I downloaded it from here https://build.opensuse.org/package/files?package=mkinitrd&project=openSUSE%3AFactory and extracted and put only the purge-kernels script of this package into /sbin of two different installations. I took a look into the purge-kernels.init script (which seems to equal the purge-kernel shell script on my systems in /etc/init.d/). It says that the file /boot/do_purge_kernels hast to be present to execute the /sbin/purge-kernels script after a new kernel has been installed. I assume, that this do_purge-kernels file will be created during or after installation of a new kernel but I don't have a clue what creates or should create it. So I took care of if this file will be created after a kernel installation. The setup Both are 12.1 MS 5 installations. - Installation #1 has the remnants (kernel-source and kernel-devel) of a deleted kernel left on the disk. I wanted to test if these get removed by the script. - Installation #2 has no remnants, I removed them manually after the last deletion of an older kernel. On this installation I installed an older kernel to see if it will be removed on the next reboot. Testing 1.) I started testing with installation #2: Kernel 2.6.37 was installed with sources from the openSUSE updates repo which was enabled for this test. a) After the installation finished I checked if the file /boot/do_purge_kernels was present and it was not. As expected in this case on the next reboot no old kernel was deleted. b) I then created the /boot/do_purge_kernels files (an empty file) manually and rebooted. During the boot process the purge-kernels script was executed and deleted the oldest kernel, including -source and -devel packages. c) I did the test installation of a new kernel twice: One with zypper, the other one with yast2. This didn't make any difference concerning the presence of /boot/do_purge_kernels after a kernel installation. In both cases the results were the same as described in a) and b): No /boot/do_purge_kernels file present and I had to create it manually to have the purge-kernels script executed on reboot. 2.) In installation #1 I wanted to test if the leftover -source and -devel packages would be identified as "to be deleted". Since no kernel installation took place I just executed the purge-kernels script in a terminal with the "--test" switch. The script recognized the -source and -devel packages. After that I executed the script without the "--test" switch and both packages were removed. Results The purge-kernels script is working as expected and is removing older kernels as configured in zypp.conf, including -source and -devel packages. But for whatever reason the /boot/do_purge_kernels file is not created after the installation of a new kernel so that, as a result of this, the purge-kernels script will not be executed on the next reboot. This is something I don't understand since it has been working in the past and the only change I did to the two systems was to use the purge-kernels script of the new mkinitrd package. Andreas -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org