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

support for iso9660 partitions in "hybrid" ISO images #1345

Open
bam80 opened this issue Mar 1, 2025 · 6 comments
Open

support for iso9660 partitions in "hybrid" ISO images #1345

bam80 opened this issue Mar 1, 2025 · 6 comments

Comments

@bam80
Copy link

bam80 commented Mar 1, 2025

Is the issue mentioned here for Blivet is still actual?

Never mount partitions on a disk with the iso9660 filesystem (#1878784)

Blivet doesn't recognize these partitions, so we mount the disk in stage2.
However, it will fail if one of its partitions is already mounted, for example
in stage1. Therefore, skip these partitions in the script that looks for a root
image on devices and use the disk instead.

The boot.iso has the following structure:

NAME   TYPE  SIZE FSTYPE  LABEL
sda    disk  8.8G iso9660 RHEL-8-3-0-BaseOS-x86_64
|-sda1 part  8.8G iso9660 RHEL-8-3-0-BaseOS-x86_64
`-sda2 part   10M vfat    ANACONDA
@vojtechtrefny
Copy link
Member

Yes, blivet intentionally ignores partitions on ISO hybrid images:

if not disk.partitioned or not disk.format.supported:
# Ignore partitions on:
# - devices we do not support partitioning of, like logical volumes
# - devices that contain disklabels made by isohybrid
#
# For partitions on disklabels parted cannot make sense of, go ahead
# and instantiate a PartitionDevice so our view of the layout is
# complete.
if not disk.partitionable or disk.format.type in ("iso9660", "udf") or disk.format.hidden:
log.debug("ignoring partition %s on %s", name, disk.format.type)
return

This was decided a long time ago (see for example ff12619). TLDR is that ISO hybrid images are a huge mess with multiple signatures that confuses a lot of system tools and ignoring the partitions is just easier.

I am not saying this cannot be changed, but it would be a lot of work in both blivet and anaconda to make sure everything works and the "new" partitions doesn't confuse the installer.

@bam80
Copy link
Author

bam80 commented Mar 3, 2025

Thanks.
The problem is original Anaconda patch adapting to this Blivet restriction introduced a regression:
regression: ks.cfg can't be fetched from any writable partition of installation media (ESP, OEMDRV)

I tried to fix it with these two patches, effectively allowing to pass the ISO partition unambiguously via PARTLABEL, not as just LABEL which is the source of confusion:
rhinstaller/anaconda#6222
weldr/lorax#1451

Does it mean my fixes are incorrect?
At what stage I will get problems then during the installation?
I was able to reach Anaconda GUI Welcome screen with my patches, didn't try to install further yet, sorry..

@vojtechtrefny
Copy link
Member

At what stage I will get problems then during the installation?

I meant that if we stop ignoring the partitions in blivet, anaconda will suddenly see three partitions instead one device formatted to iso9660, which might be a problem when displaying devices or when making sure the Live USB is being ignored/hidden etc.

@bam80
Copy link
Author

bam80 commented Mar 3, 2025

OK, my main concern here is to fix the Anaconda regression, as fetching Kickstart files from installation media is essential functionality.
I'll try to finish the installation with the patches and report back.
Thank you.

@vojtechtrefny
Copy link
Member

Let's see what the Anaconda team thinks about the change, but I don't think it could cause any problems for Blivet so from point of view, it's OK.

@bam80
Copy link
Author

bam80 commented Mar 4, 2025

Thanks.
Unfortunately, I still have no idea how to pass the ISO by partlabel on Lorax side, so if you could help with that, you are welcome.

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