Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1973515 - Kernel update in virt-customize causes an incorrect disk uuid in initrd (--update results in unbootable image)
Summary: Kernel update in virt-customize causes an incorrect disk uuid in initrd (--up...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: dracut-maint-list
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs
TreeView+ depends on / blocked
 
Reported: 2021-06-18 04:21 UTC by Lukas Doktor
Modified: 2021-06-18 07:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
serial console output of a failed boot on F33 (45.29 KB, application/octet-stream)
2021-06-18 04:21 UTC, Lukas Doktor
no flags Details
Reproducer used to check various Fedoras (1.08 KB, application/x-shellscript)
2021-06-18 04:24 UTC, Lukas Doktor
no flags Details

Description Lukas Doktor 2021-06-18 04:21:21 UTC
Created attachment 1791947 [details]
serial console output of a failed boot on F33

Description of problem:
Hello guys, running "virt-customize --update" on Fedora > 32 results in unbootable image due to kernel initrd containing a non-existing uuid.

Version-Release number of selected component (if applicable):
* Fedora 32 Cloud Image - works well
* Fedora 33 Cloud Image - fails
* Fedora 34 Cloud Image - fails

How reproducible:
* Always

Steps to Reproduce:
1. Fetch the image
2. virt-customize -v -x -a Fedora.qcow2 --root-password password:redhat --update --selinux-relabel
3. boot the image

Actual results:
Fails into maintenance mode, /dev/disk/by-uuid/ contains a different uuid than expected.

Expected results:
Should boot well

Additional info:
I was asked to search for the uuid when in rescue mode:
virt-rescue --ro -a Fedora.qcow2
# searching for the expected UUID
><rescue> findfs UUID=7486a5a4-47b9-478c-ab0c-44438c0b19ea
/dev/sdb
# searching for the UUID the disk has on normal boot
><rescue> findfs 0e28d03c-9307-4c5c-b31e-7b0574239ccf
0e28d03c-9307-4c5c-b31e-7b0574239ccf

Comment 1 Lukas Doktor 2021-06-18 04:24:59 UTC
Created attachment 1791948 [details]
Reproducer used to check various Fedoras

I used this script to find which Fedora version this occurred the first (first with --update, then added custom packages to try to reproduce that with F32 and F33 pkgs but no luck).

Note that RHEL8 images work well.

Comment 2 Richard W.M. Jones 2021-06-18 07:34:29 UTC
> virt-rescue --ro -a Fedora.qcow2
> # searching for the expected UUID
> ><rescue> findfs UUID=7486a5a4-47b9-478c-ab0c-44438c0b19ea
> /dev/sdb

In the virt-rescue appliance (which is the same environment
used by virt-customize), /dev/sdb is the appliance root.
/dev/sda which is the Fedora.qcow2 will have a different UUID.

If dracut is picking this UUID when run inside a chroot then
it's picking the wrong one.  It should notice when it's run
inside a chroot and pick the UUID of the chrooted filesystem instead.


Note You need to log in before you can comment on or make changes to this bug.