Error: The operation would result in removing the booted kernel

Bug #1623409 reported by Lucas Alvares Gomes
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
diskimage-builder
Fix Released
High
Harald Jensås

Bug Description

Creating a Fedora 24 [0] image on a Fedora 24 kernel booted with the same kernel version that the image has available will result in:

tune2fs 1.42.13 (17-May-2015)
dib-run-parts Wed Sep 14 09:31:19 UTC 2016 Running /tmp/in_target.d/finalise.d/01-clean-old-kernels
Dependencies resolved.
Error: The operation would result in removing the booted kernel: kernel-core-4.5.5-300.fc24.x86_64.
Unmount /tmp/dib_build.ZyqK86y3/mnt/tmp/in_target.d
Unmount /tmp/dib_build.ZyqK86y3/mnt/sys
Unmount /tmp/dib_build.ZyqK86y3/mnt/proc
Unmount /tmp/dib_build.ZyqK86y3/mnt/dev/pts
Unmount /tmp/dib_build.ZyqK86y3/mnt/dev
Unmount /tmp/dib_build.ZyqK86y3/mnt
/dev/loop0: [0043]:152168 (/tmp/dib_image.esOAEfg5/image.raw)

[0] Possibly affects other versions of Fedora or/and distros as well

Workaround: Boot the host with a different kernel version

Changed in diskimage-builder:
status: New → Confirmed
Changed in diskimage-builder:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/713988

Changed in diskimage-builder:
assignee: nobody → Harald Jensås (harald-jensas)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to diskimage-builder (master)

Reviewed: https://review.opendev.org/713988
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=1ac31afd6297c2a9a0673b0cde17e18230c3b977
Submitter: Zuul
Branch: master

commit 1ac31afd6297c2a9a0673b0cde17e18230c3b977
Author: Harald Jensås <email address hidden>
Date: Thu Mar 19 22:27:51 2020 +0100

    Use rpm -e instead of dnf for cleaning old kernels

    If the running kernel of the system building the image
    matches the kernel that is to be removed dnf will fail.

    Repalce use use of dnf with rpm -e.

    Closes-Bug: #1623409
    Change-Id: Ie2481ea8a02b7b0720e46fa179f24badf4aa25c5

Changed in diskimage-builder:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.