Bug 2050212

Summary: Cannot embed an update image in a repacked DVD: /dev/root is never found
Product: Red Hat Enterprise Linux 8 Reporter: Renaud Métrich <rmetrich>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED WORKSFORME QA Contact: Release Test Team <release-test-team>
Severity: low Docs Contact:
Priority: low    
Version: 8.5CC: jkonecny
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-13 11:38:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Renaud Métrich 2022-02-03 13:01:37 UTC
Description of problem:

In order to install air-gapped systems, it may be required to embed some update images in the RHEL DVD, which can theorically be done through repacking the DVD (see procedure  in KCS https://access.redhat.com/solutions/60959 for kickstarts). Here I would expect to specify the update image as inst.updates=cdrom:/path/to/update.img in isolinux.cfg/grub.cfg

Unfortunately this doesn't work, doing so leads to dracut to find find the /dev/root device because dracut-initqueue loops on waiting for updates to finish:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[   10.506363] dracut-pre-trigger[714]: //lib/anaconda-lib.sh@364(wait_for_updates): echo '[ -e /tmp/liveupdates.done ]'
[   13.253862] dracut-initqueue[902]: //lib/dracut/hooks/initqueue/finished/updates.sh@1(source): '[' -e /tmp/liveupdates.done ']'
[   13.301070] dracut-initqueue[902]: //lib/dracut/hooks/initqueue/finished/updates.sh@1(source): '[' -e /tmp/liveupdates.done ']'
 :
[  225.761803] dracut-initqueue[902]: //lib/dracut/hooks/initqueue/finished/updates.sh@1(source): '[' -e /tmp/liveupdates.done ']'
[  225.766925] dracut-initqueue[902]: //lib/dracut/hooks/initqueue/finished/updates.sh@1(source): '[' -e /tmp/liveupdates.done ']'
[  225.770937] dracut-initqueue[902]: //lib/dracut/hooks/initqueue/finished/updates.sh@1(source): '[' -e /tmp/liveupdates.done ']'
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

It's unclear to me why this doesn't work, it seems like the service/script applying the update image never executes.


Version-Release number of selected component (if applicable):

All anaconda releases I could try (RHEL7, RHEL8.5).


How reproducible:

Always


Steps to Reproduce:
1. Repack a DVD using procedure in https://access.redhat.com/solutions/60959 but with adding an update image instead of kickstart

2. Boot the DVD

Actual results:

No switch root to stage2
dracut emergency prompt shown

Expected results:

Boots fine

Comment 3 Jiri Konecny 2023-07-13 09:08:13 UTC
Hi Renaud,

I looked on the code and it seems that we don't accept `inst.updates=cdrom:<path>` format for updates images but only `inst.updates=cdrom:<dev>:<path>`.

https://github.com/rhinstaller/anaconda/blob/rhel-9/dracut/updates-genrules.sh#L17


Not sure if this is a bug or on purpose, however, could you please test that format if it helps?

Comment 4 Renaud Métrich 2023-07-13 11:38:16 UTC
Hi Jiri,

Thanks for checking, it appears you are totally right.
Actually either one of these can be used:

- inst.updates=cdrom:/dev/sr0:/path.img
- inst.updates=hd:LABEL=<DVD-LABEL>:/path.img

I think we can hence close this as WORKSFORME, sorry for disturbing.