Bug 2088631
| Summary: | Backport upstream mkksiso changes | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Brian Lane <bcl> | ||||
| Component: | lorax | Assignee: | Brian Lane <bcl> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 9.1 | CC: | jstodola | ||||
| Target Milestone: | rc | Keywords: | Triaged | ||||
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | lorax-34.9.18-1.el9 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2022-11-15 10:11:08 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: | |||||||
| Attachments: |
|
||||||
|
Description
Brian Lane
2022-05-19 21:38:58 UTC
Brian, I've checked one of you automated test from RHEL-9.0 with lorax-34.9.14-1.el9 and xorriso is already used there where running mkksiso:
INFO:Running... mount -o loop /var/tmp/images/cdimage.iso /tmp/lorax.imgutils.mvwq5g1c
INFO:mount: /tmp/lorax.imgutils.mvwq5g1c: WARNING: source write-protected, mounted read-only.
INFO:iso arch = x86_64
INFO:Volume Id = RHEL-9-0-0-BaseOS-x86_64
INFO:Using xorrisofs to create the new iso
WARNING:No boot/grub/grub.cfg file found
WARNING:No images/generic.prm file found
WARNING:No images/cdboot.prm file found
INFO:grafts = [('/tmp/mkksiso-5pz_v2pa/.discinfo', '.discinfo'), ('/tmp/mkksiso-5pz_v2pa/.treeinfo', '.treeinfo'), ('/tmp/mkksiso-5pz_v2pa/AppStream', 'AppStream'), ('/tmp/mkksiso-5pz_v2pa/BaseOS', 'BaseOS'), ('/tmp/mkksiso-5pz_v2pa/EFI', 'EFI'), ('/tmp/mkksiso-5pz_v2pa/EULA', 'EULA'), ('/tmp/mkksiso-5pz_v2pa/GPL', 'GPL'), ('/tmp/mkksiso-5pz_v2pa/RPM-GPG-KEY-redhat-beta', 'RPM-GPG-KEY-redhat-beta'), ('/tmp/mkksiso-5pz_v2pa/RPM-GPG-KEY-redhat-release', 'RPM-GPG-KEY-redhat-release'), ('/tmp/mkksiso-5pz_v2pa/extra_files.json', 'extra_files.json'), ('/tmp/mkksiso-5pz_v2pa/images', 'images'), ('/tmp/mkksiso-5pz_v2pa/isolinux', 'isolinux'), ('/tmp/mkksiso-5pz_v2pa/media.repo', 'media.repo'), ('/mnt/tests/installation/mkksiso-ks-into-dvd/ks.cfg', 'ks.cfg')]
xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.
Drive current: -outdev 'stdio:/var/tmp/images/cdimage_ks.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 52.5g free
xorriso : WARNING : -volid text is too long for Joliet (24 > 16)
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
Added to ISO image: file '/.discinfo'='/tmp/mkksiso-5pz_v2pa/.discinfo'
xorriso : UPDATE : 1 files added in 1 seconds
Added to ISO image: file '/.treeinfo'='/tmp/mkksiso-5pz_v2pa/.treeinfo'
Added to ISO image: directory '/AppStream'='/tmp/mkksiso-5pz_v2pa/AppStream'
Added to ISO image: directory '/BaseOS'='/tmp/mkksiso-5pz_v2pa/BaseOS'
Added to ISO image: directory '/EFI'='/tmp/mkksiso-5pz_v2pa/EFI'
Added to ISO image: file '/EULA'='/tmp/mkksiso-5pz_v2pa/EULA'
Added to ISO image: file '/GPL'='/tmp/mkksiso-5pz_v2pa/GPL'
Added to ISO image: file '/RPM-GPG-KEY-redhat-beta'='/tmp/mkksiso-5pz_v2pa/RPM-GPG-KEY-redhat-beta'
Added to ISO image: file '/RPM-GPG-KEY-redhat-release'='/tmp/mkksiso-5pz_v2pa/RPM-GPG-KEY-redhat-release'
Added to ISO image: file '/extra_files.json'='/tmp/mkksiso-5pz_v2pa/extra_files.json'
Added to ISO image: directory '/images'='/tmp/mkksiso-5pz_v2pa/images'
Added to ISO image: directory '/isolinux'='/tmp/mkksiso-5pz_v2pa/isolinux'
Added to ISO image: file '/media.repo'='/tmp/mkksiso-5pz_v2pa/media.repo'
Added to ISO image: file '/ks.cfg'='/mnt/tests/installation/mkksiso-ks-into-dvd/ks.cfg'
xorriso : UPDATE : 6433 files added in 1 seconds
xorriso : NOTE : Copying to System Area: 432 bytes from file '/usr/share/syslinux/isohdpfx.bin'
libisofs: NOTE : Automatically adjusted MBR geometry to 1039/255/63
libisofs: WARNING : Image size exceeds 1024 cylinders. Cannot align partition.
libisofs: WARNING : There are said to be BIOSes which will not boot this via MBR.
xorriso : UPDATE : 0.42% done
xorriso : UPDATE : 14.78% done
xorriso : UPDATE : 27.77% done, estimate finish Sun Mar 13 13:24:22 2022
xorriso : UPDATE : 39.73% done, estimate finish Sun Mar 13 13:24:22 2022
xorriso : UPDATE : 52.20% done, estimate finish Sun Mar 13 13:24:22 2022
...
So I wonder what is the expected change?
Right, I'm talking about this upstream change: https://github.com/weldr/lorax/pull/1228 Instead of rebuilding the efiboot.img and reconstructing the iso from scratch it modifies the original iso by changing the config files, and optionally adding new ones. I do need to make sure that xorriso on RHEL9 has the correct support though. Brian,
I tested executing mkksiso as a regular user, but it failed:
[test2@kvm-08-guest32 ~]$ mkksiso default.ks RHEL-9.1.0-20220708.0-x86_64-dvd1.iso user.iso
xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.
xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE : 6572 nodes read in 1 seconds
xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded
Drive current: -indev '/home/test2/RHEL-9.1.0-20220708.0-x86_64-dvd1.iso'
Drive access : shared:readonly
Media current: stdio file, overwriteable
Media status : is written , is appendable
Boot record : El Torito , MBR isohybrid cyl-align-off GPT
Media summary: 1 session, 4313682 data blocks, 8425m data, 1466m free
Volume id : 'RHEL-9-1-0-BaseOS-x86_64'
xorriso : UPDATE : 1 files restored ( 1401b) in 1 seconds = 0.0xD
Extracted from ISO image: file '/EFI/BOOT/grub.cfg'='/tmp/mkksiso-dv4e8kxu/EFI/BOOT/grub.cfg'
xorriso : UPDATE : 1 files restored ( 3147b) in 1 seconds = 0.0xD
Extracted from ISO image: file '/isolinux/isolinux.cfg'='/tmp/mkksiso-dv4e8kxu/isolinux/isolinux.cfg'
xorriso : UPDATE : 1 files restored ( 60b) in 1 seconds = 0.0xD
Extracted from ISO image: file '/.discinfo'='/tmp/mkksiso-dv4e8kxu/.discinfo'
INFO:iso arch = x86_64
INFO:Volume Id = RHEL-9-1-0-BaseOS-x86_64
Traceback (most recent call last):
File "/usr/bin/mkksiso", line 372, in <module>
sys.exit(main())
File "/usr/bin/mkksiso", line 362, in main
MakeKickstartISO(args.ks, args.input_iso, args.output_iso,
File "/usr/bin/mkksiso", line 283, in MakeKickstartISO
EditIsolinux(new_args, new_volid, old_volid, tmpdir)
File "/usr/bin/mkksiso", line 162, in EditIsolinux
with open(orig_cfg + ".new", "w") as out_fp:
PermissionError: [Errno 13] Permission denied: '/tmp/mkksiso-dv4e8kxu/isolinux/isolinux.cfg.new'
[test2@kvm-08-guest32 ~]$
RHEL-9.1.0-20220707.0 + lorax-34.9.16-1.el9 was used for testing.
Moving back to ASSIGNED.
I am unable to reproduce this locally. The error seems to be saying it doesn't have write permission on the tempdir it just created and wrote files into, which is really odd. How did you setup the user you are running this from? Are there and SELinux errors? Created attachment 1896661 [details]
kickstart
Reproduced on a freshly installed VM, using the attached kickstart file (the user account is defined there, in the previous attempt the user was created on the installed system using "useradd test2")
Compose was RHEL-9.1.0-20220712.1 with lorax-34.9.16-1.el9 and lorax-templates-generic-34.9.16-1.el9 installed after the installation.
I've checked SELinux errors, there were none and the problem is reproducible with SELinux in permissive mode.
It ends up it was file permissions, the boot iso I was testing with has less restrictive permissions on the config files and directories than the dvd. Fix is here: https://github.com/weldr/lorax/pull/1250 Retested with lorax-34.9.18-1.el9 and no issue was discovered, it's also possible to use mkksiso as a regular user. Marking as Verified:Tested Checked that lorax-34.9.18-1.el9 is in nightly compose RHEL-9.1.0-20220719.0 Moving to VERIFIED Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (lorax bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:8018 |