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

regression: ks.cfg can't be fetched from any non-first partition of installation media (ESP, OEMDRV, etc.) #1451

Closed
bam80 opened this issue Feb 22, 2025 · 6 comments

Comments

@bam80
Copy link

bam80 commented Feb 22, 2025

Original report:
https://bugzilla.redhat.com/show_bug.cgi?id=2346192

Proposed solution:

  1. apply fix fetching kickstarts from OEMDRV rhinstaller/anaconda#6222
  2. as discussed, change inst.stage2 option from:
    inst.stage2=hd:LABEL=<ISO label>
    to:
    inst.stage2=hd:/dev/disk/by-partlabel/ISO9660
    Or introduce ${isopartlabel} expansion in the template and use it here instead of the hardcoded ISO9660.

The inst.stage2 option is apparently declared here:

replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${eficonf}

I didn't find where the ISO9660 PARTLABEL comes from, but it seems stable.

@poncovka @bcl

@bcl
Copy link
Contributor

bcl commented Feb 24, 2025

I don't think that it's safe to lock that into ISO9660, especially without knowing where it comes from.

Also, I see from the linked bugzilla that this is related to you adding a kickstart file to the iso -- FWIW you can use the mkksiso tool from lorax to recreate the iso with the kickstart placed inside the iso insead of the manual method you are using to add it to the EFI partition.

@bcl bcl closed this as completed Feb 24, 2025
@bam80
Copy link
Author

bam80 commented Feb 24, 2025

I don't think that it's safe to lock that into ISO9660, especially without knowing where it comes from.

I hoped you know where it comes from and can suggest better placeholder. But I can investigate it if you don't.

Using mkksiso is overkill for this task, as when you burn the .ISO to SD or USB disk (most real use-cases), the embedded writable ESP partition gets accessible without any special tools, so it's most natural way of providing the ks.cfg.

Can we reopen the issue?

@bcl
Copy link
Contributor

bcl commented Feb 24, 2025

No. I'm not going to hardcode ISO9660. Your best bet is to either use mkksiso or work with anaconda to figure out how to mount the partition.

@bam80
Copy link
Author

bam80 commented Feb 24, 2025

Again, there is no need to hardcode ISO9660.
We just need to find a way to get PARTLABEL of the ISO partition and set it in the placeholder.
Do you have an idea maybe?

I'll provide the patch for anaconda but the second part should be addressed here, as said in the OP.

@bam80
Copy link
Author

bam80 commented Mar 1, 2025

Anaconda's part of the fix:
rhinstaller/anaconda#6222

@bam80
Copy link
Author

bam80 commented Mar 2, 2025

Also, I see from the linked bugzilla that this is related to you adding a kickstart file to the iso

@bcl
To be more precise, I added a kickstart file not to the iso, but to ESP partition of the installation media burnt with the ISO.
But as the same bug applies to any non-ISO partition of the installation media, OEMDRV including, Anaconda Kickstart Documentation you wrote is currently broken too:

Automatically load the Kickstart file

If you need to load Kickstart file automatically you can store your Kickstart file as /ks.cfg into the storage device which is accessible during the boot process and is labeled as OEMDRV. Such a device is automatically discovered during boot and the Kickstart file will be used.

As a possible solution, could we think of adding expansion of ${isopartlabel} along with the ${isolabel} to a template here?

@bam80 bam80 changed the title regression: ks.cfg can't be fetched from writable partition of installation media (ESP) regression: ks.cfg can't be fetched from any non-first partition of installation media (ESP, OEMDRV, etc.) Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants