Hi,
> I don't use Rufus because the size of the ISO is 10.5/11GB
> and Rufus has only 2 filesystems that it supports.
That would be the unpacking mode of Rufus (don't know its official name).
But with a hybrid ISO like the CentOS which you build, you don't need
a hosting filesystem. The ISO should get written directly to the USB
stick device (which seems to be not easy on MS-Windows).
There it will stand as ISO 9660 filesystem
Thus i propose the "dd"-mode of Rufus.
(I have no hands-on experience with Rufus or balenaEtcher. So i can only
forward what others reported about success with Rufus "dd"-mode.)
There remains the riddle of the changed size of /images/efiboot.img.
> You could be right about something going wrong while extracting the iso content.
> I just mount the iso file to a location (/mnt/iso/) inside the centos vm
> and use "cp -r /mnt/iso /root/iso_extract" to extract it. Maybe some
> hidden files or such got missed.
efiboot.img is supposed to be a FAT filesystem image. Mountable in CentOS by
Code: Select all
mount /root/iso_extract/images/efiboot.img /mnt/fat_on_disk
mount /mnt/iso/images/efiboot.img /mnt/fat_in_iso
You could then compare the files of the mount points /mnt/fat_on_disk
and /mnt/fat_in_iso to learn about possible differences. Like:
Code: Select all
diff -r /mnt/fat_in_iso /mnt/fat_on_disk 2>&1 | less
------------------------------------------------------------------------
> What method to extract the official iso would you recommend?
Maybe "cp -a" is better suited than "cp -r". It provides more fidelity.
I myself would use xorriso for that:
Code: Select all
xorriso -osirrox on -indev CentOS-Stream-8-x86_64-latest-dvd1.iso \
extract / /root/iso_extract
I guess that in both cases you will have to do the copying as superuser
to get the foreign user ids and group ids
Code: Select all
-rwx------ 1 0 1010 1005672 Aug 1 2020 '/EFI/BOOT/BOOTIA32.EFI'
-rwx------ 1 0 1010 1244496 Aug 1 2020 '/EFI/BOOT/BOOTX64.EFI'
With xorriso the fidelity is high enough that you have afterwards to give
write-permissions to /root/iso_extract and some of its its sub-directories
before you can manipulate files in there.
Any problems with permissions and ownership can be avoided if you let
xorriso load and manipulate the original ISO before writing it as a new
ISO image:
Code: Select all
xorriso \
-indev CentOS-Stream-8-x86_64-latest-dvd1.iso \
-outdev UEFI_USB.iso \
-rm ...paths.in.the.ISO.which.shall.be.deleted... -- \
...maybe.more.-rm.commands... \
-map /...file.from.disk... /...path.for.it.in.the.ISO... \
...maybe.more.map.commands... \
-boot_image any replay \
-compliance no_emul_toc \
-padding included
The -rm commands remove files from the loaded ISO filesystem model.
-rm takes multiple file paths and thus needs to be ended by "--" so that
xorriso knows that the next argument is a command.
The -map commands put exactly one file or one directory tree from the
hard disk into the ISO filesystem model. Use as many of them as you need
to shape your new ISO.
"-boot_image any replay" will apply the necessary xorriso commands to
set up the boot equipment for -outdev like it was detected with -indev.
(Let me hope that 5 year old xorriso-1.4.8 does a good job.)
"-compliance no_emul_toc" and "-padding included" set two habits which
xorriso normally only shows when emulating mkisofs.
(See man xorriso for details.)
-------------------------------------------------------------------------
If you are exploring the possibilities of this approach, then it might
be worth to exercise it in dialog mode (i do it here with the smaller
"boot.iso"):
Code: Select all
xorriso -dialog on -page 16 80 -abort_on NEVER
You will get prompted to enter commands and their arguments:
Code: Select all
============================
enter option and arguments :
-indev CentOS-Stream-8-x86_64-latest-boot.iso
==============================================================
xorriso : NOTE : Loading ISO image tree from LBA 0
...
Media summary: 1 session, XXX data blocks, XXXm data, XXXg free
Volume id : 'CentOS-Stream-8-x86_64-dvd'
============================
enter option and arguments :
-outdev UEFI_USB.iso
==============================================================
...
Media summary: 0 sessions, 0 data blocks, 0 data, XXXg free
============================
enter option and arguments :
-lsl /
==============================================================
total 5
dr-xr-xr-x 1 0 0 0 May 3 23:36 'EFI'
-rw-r--r-- 1 0 1010 18092 Sep 14 2021 'LICENSE'
-r--r--r-- 1 0 0 219 May 3 23:36 'TRANS.TBL'
dr-xr-xr-x 1 0 0 0 May 3 23:36 'images'
drwxrwsr-x 1 0 1010 0 May 3 23:36 'isolinux'
============================
enter option and arguments :
-find / -exec lsdl
==============================================================
dr-xr-xr-x 1 0 0 0 May 3 23:36 '/'
dr-xr-xr-x 1 0 0 0 May 3 23:36 '/EFI'
...
-rwx------ 1 0 1010 930152 Aug 1 2020 '/EFI/BOOT/mmia32.efi'
.... [Press Enter to continue. @,Enter avoids further stops. @@@ aborts] ....
@
-rwx------ 1 0 1010 1162400 Aug 1 2020 '/EFI/BOOT/mmx64.efi'
-rw-r--r-- 1 0 1010 18092 Sep 14 2021 '/LICENSE'
...
-rw-r--r-- 1 0 1010 26788 Nov 19 2020 '/isolinux/vesamenu.c32'
-rwxr-xr-x 1 0 1010 10468488 Apr 20 17:47 '/isolinux/vmlinuz'
============================
enter option and arguments :
Apply the desired -rm and -map commands. Finally give the commands
Code: Select all
-boot_image any replay
-compliance no_emul_toc
-padding included
-commit
-commit will cause UEFI_USB.iso to be written and then to be loaded as
-indev for inspection.
When you are done, enter command
(This would automatically perform -commit if any changes would be pending.)
If you want to abort the xorriso dialog run without writing UEFI_USB.iso
enter command
If you have messed up and want to go back to the situation after -indev, enter
Have a nice day
Thomas