Bug 1213655 - KIWI image: second and following boots fall back to admin console
Summary: KIWI image: second and following boots fall back to admin console
Status: NEW
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Other (show other bugs)
Version: Leap 15.4
Hardware: x86-64 openSUSE Leap 15.4
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Marcus Schaefer
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-25 23:22 UTC by Piotr Sarnacki
Modified: 2023-07-27 06:44 UTC (History)
2 users (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: No
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Sarnacki 2023-07-25 23:22:15 UTC
Hello , we have experiencing some boot  problems with some type of our units .
problems exists with appliance built using KIWI (latest official 15.4)  on leap 15.4 ..
Appliance install correctly, but fallback to emergency shell during every FULL  ( from GRUB, not first boot from kexec) boot after install.

error message lie this one: 
--->
[    8.340113] localhost dracut-pre-mount[666]: enabling systemd-fsck-root.service
[    8.351725] localhost dracut-pre-mount[1021]: Removed /etc/systemd/system/systemd-fsck-root.service.
[    8.355097] localhost systemd[1]: Reloading.
[    8.570164] localhost systemd[1]: Finished dracut pre-mount hook.
[    8.597180] localhost systemd[1]: systemd-fsck-root.service: Bound to unit dev-disk-by\x2duuid-e2ea4757\x2d544f\x2d451f\x2da694\x2dccf91fca1f62.device, but unit isn't active.
[    8.597348] localhost systemd[1]: Dependency failed for File System Check on /dev/disk/by-uuid/e2ea4757-544f-451f-a694-ccf91fca1f62.
[    8.600087] localhost systemd[1]: Dependency failed for /sysroot.
[    8.603109] localhost systemd[1]: Dependency failed for Initrd Root File System.
[    8.605867] localhost systemd[1]: Dependency failed for Reload Configuration from the Real Root.
-->
it fall back to admin console, 

executing systemctl status dracut-pre-mount show that service exit with SUCCESS/0 , 

when type exit , it return to the same state. 
now , when start service manually : systemct start dracut-pre-mount , it success and when we exit console boot process continue perfectly. 
ite happens every time. 

now , looking deeper into dracut KIWI pre-mout hooks , found a some quick fix (works for me 10/10 ) :

rpm : dracut-kiwi-oem-repart.rpm
kiwi rpms soure code: 
kiwi-9.24.43/dracut/modules.d/90kiwi-repart/kiwi-repart-disk.sh

modifications: 
section:
-->
if ! resize_wanted "${root_device}" "${disk}"; then
    return
fi
-->
change to:
-->
if ! resize_wanted "${root_device}" "${disk}"; then
    # JCI - jsarnap: to prevent dracut-pre-mount service and later systemd-fsck-root fail,
    # we need to make sure udev is settled and block devices files are populated.
    udevadm settle
    return
fi
-->
where "udevadm settle" its a bit "harsh" , changing it to 
"
# wait for the root device to appear
wait_for_storage_device "${root_device}"
"
also works perfectly fine , also 10/10 . 

Now , I'm no expert in KIWI code .. I believe  there are possibly better ways to fix it , but i hope it can spare you some time for looking whats going on, especially as it could very difficult to reproduce. 

if you need additional information about hardware, perform some test I am happy to help you.

Best Regard 
piotr.sarnacki@jci.com