Closed votdev closed 2 years ago
I've contacted @schaefi (a Kiwi deleveloper) and he gave me the following information. The problem is known; it is a Grub thingy. Kiwi uses grub2-mkconfig
to configure grub; grub2-mkconfig
tries to resolve the UUID of the root device; to do so, UDEV is required, but this is not available in a container environment; because of that grub2-mkconfig
uses the device name at the time it is executed which is a loop device.
Kiwi has a post processing to fix that issue. It has been introduced with 9.23.21
commit 791adcfcb76753993b5d2c8b2ee66e9dfd8e9880 (origin/fix_use_of_by_label_with
_grub, fix_use_of_by_label_with_grub)
Author: Marcus Schäfer <ms@suse.de>
Date: Tue Mar 9 12:14:41 2021 +0100
Fix use of by-label device persistency in grub
If devicepersistency="by-label" is set in the KIWI description
it will correctly operate on the fstab values but still uses
the UUID based setting for root= in the grub config. This commit
allows to set root=LABEL=... in the grub config in case the
devicepersistency requested it. In order for this to work this
commit also had to increase the scope of the grub helper
method _fix_grub_root_device_reference which is now called in
any case. This Fixes #1757
I did a new build to check various things. The build/image-root/config.bootoptions
file looks OK to me:
quiet systemd.show_status=yes console=ttyS0,115200 console=tty0 net.ifnames=0 \$ignition_firstboot ignition.platform.id=metal root=UUID=2f9e194d-e8da-4532-a16f-97b34817ec3a rw
The UUID of the partition named ROOT
is the same:
But what makes me wonder is this:
Who is responsible for creating the dracut-state.sh
?
OK, changing the kernel command line to root=/dev/vda3
in the Grub menu after powering the system fixes the issue temporarily.
I'm not able to build a working Vagrant box using the
images/builder/
container. I found a bug which is fixed by #737, but the node does not come up with the image build in the container. Strangely enough, the problem does not occur if the image is built on a desktop system with openSUSE.Build looks successful:
But deploying the nodes will end up with this: