Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix fetching kickstarts from OEMDRV #6222

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bam80
Copy link
Contributor

@bam80 bam80 commented Mar 1, 2025

See dracut/kickstart-genrules.sh for fetching kickstarts broken functionality:

        if [ -z "$kickstart" ] && [ -z "$(getarg inst.ks=)" ]; then
            when_diskdev_appears "$(disk_to_dev_path LABEL=OEMDRV)" \
                fetch-kickstart-disk "\$env{DEVNAME}" "/ks.cfg"
            wait_for_disks
        fi

The OEMDRV partition couldn't be mounted because the whole installation media disk is always mounted before as iso9660 first, blocking all the other mounts.

This patch allows workaround the problem by unambiguously specifying cmdline ISO partition by file directly, e.g.:
inst.stage2=hd:/dev/disk/by-partlabel/ISO9660
instead of default specifying by LABEL, e.g.:
inst.stage2=hd:LABEL=Fedora-SB-ostree-x86_64-41
See 301a09d for details.

Fixes Bug 2346192.

Related Lorax issue:
weldr/lorax#1451

@poncovka @bcl

See dracut/kickstart-genrules.sh for fetching kickstarts
broken functionality.

fix Bug 2346192
@bam80
Copy link
Contributor Author

bam80 commented Mar 1, 2025

How to update test ISO with these changes, without regenerating the whole image?
Found this:
https://github.com/rhinstaller/anaconda/blob/main/dracut/README-testing-changes.rst

@jkonecny12
Copy link
Member

OEMDRV is expected to be on different device than what is used for installation. I think this change is more RFE than a fix.

@jkonecny12
Copy link
Member

I have a bad feeling about this change. You are basically returning this regression back
#2863

Even when it's on limited cases but still. Also the change will result in more fragile code as we need to keep an eye how is the root specified everywhere else where we may mount the partition.

@bam80
Copy link
Contributor Author

bam80 commented Mar 7, 2025

OEMDRV is expected to be on different device than what is used for installation. I think this change is more RFE than a fix.

OEMDRV partition (empty) exists on the installation ISO image.
You can populate it with your staff after you burn the ISO to USB drive or SD card and use that as the installation media (why would you need another disk just for OEMDRV if there are plenty of space on the installation media itself?).

Anyway, it's on the same installation media.

@bam80
Copy link
Contributor Author

bam80 commented Mar 7, 2025

I have a bad feeling about this change. You are basically returning this regression back
#2863

The change is absolutely safe and is real, the only reasonable fix (I couldn't find another one).

#2863 issue can only happen if you pass the installation device to inst.stage2 via LABEL ,
because only then the device to choose is ambiguous (disk vs partition, see the block devices listing here)

Nothing bad can happen if you pass the partition unambiguously: via PARTLABEL, PARTUUID or by file.

@bam80 bam80 requested a review from KKoukiou March 7, 2025 18:19
@bam80
Copy link
Contributor Author

bam80 commented Mar 7, 2025

Also the change will result in more fragile code as we need to keep an eye how is the root specified everywhere else where we may mount the partition.

You don't have to worry about it as it's all normalized here:

disk_to_dev_path() {
case "$1" in
CDLABEL=*|LABEL=*) echo "/dev/disk/by-label/${1#*LABEL=}" ;;
UUID=*) echo "/dev/disk/by-uuid/${1#UUID=}" ;;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants