should add -f option to "rm" in kernel update script
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ltsp (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Whenever trying to remove kernels inside the chroot, the postrm script fails:
(LTSP)root@voito:/# aptitude purge linux-image-
Luetaan pakettiluettelo
Muodostetaan riippuvuussuhteiden puu
Reading state information... Valmis
Reading extended state information
Initializing package states... Valmis
Building tag database... Valmis
The following packages will be REMOVED:
linux-
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n/?] y
Writing extended state information... Valmis
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database ... 16999 files and directories currently installed.)
Removing linux-image-
Purging configuration files for linux-image-
Examining /etc/kernel/
run-parts: executing /etc/kernel/
Cannot open ``/boot/
run-parts: /etc/kernel/
Failed to process /etc/kernel/
dpkg: error processing linux-image-
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
linux-
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Luetaan pakettiluettelo
Muodostetaan riippuvuussuhteiden puu
Reading state information... Valmis
Reading extended state information
Initializing package states... Valmis
Building tag database... Valmis
(LTSP)root@voito:/#
The solution seems to be to add -f to the "rm" command and to in fact delete the old file _before_ trying to create a new one, rather than after.
i'd actually prefer a mv to a .bak file but yes, moving the file out of the way completely seems to fix it