USB Installer fails with "Failed to set up installation source"

For years, we’ve been using a syslinux-based USB installer to install Centos 8 and our product application software. Now we’d like to upgrade it to Rocky 9.3. However, despite reading hundreds of posts online, I can’t seem to get it to work.

Works with Centos 8.1
This procedure has worked without issue with Centos 8.1:

  1. Copy contents of Rocky-9.3-x86_64-minimal.iso, including hidden .discinfo/.treeinfo files to a folder
  2. On the USB, create and format an EFI partition to contain everything:
parted --script /dev/sdb -- \
		mklabel gpt \
		mkpart primary fat32 2048s 100% \
		name 1 EFI \
		set 1 boot on \
		set 1 esp on

mkfs.vfat -F 32 -n TORQUE /dev/sdb1
  1. Copy the contents of the install DVD (eg. Rocky-9.3-x86_64-minimal.iso) to the USB.
  2. Copy the syslinux modules to /mnt/usb/EFI/BOOT
  3. Copy the kickstart.cfg file to /mnt/usb/
  4. Install syslinux: syslinux --directory /EFI/BOOT --install /dev/sdb1

The syslinux.cfg menu entry:

label MinOs
  menu label Mininal OS Install
  menu default
  kernel rklinuz
  append inst.ks=hd:LABEL=TORQUE:/kstorque.cfg initrd=rkinitrd.img rd.shell inst.stage2=hd:LABEL=TORQUE:/ net.ifnames=0 biosdevname=0 nompath inst.nompath=sda,sdb inst.debug inst.nokill

The kickstart file:

cdrom
#harddrive --partition=sdb --dir=/
#ignoredisk --only-use=sda

On Centos, using cdrom works fine. On Rocky, if I use use cdrom installation fails to locate installation source. If I use harddrive as suggested by this post, the installer fails with Error setting up base repository.

Clicking on the GUI shows “sdb” auto-selected. Clicking “Verify” does nothing.

The anaconda.log file shows payload.manager: PayloadError: Nothing useful found for Hard drive ISO source at partition=sdb dir=/

This exact procedure (with ‘cdrom’ in kickstart) worked fine for Centos 8.1.

Across hundreds of posts, I have also tried:

Creating an ISO9660 image of the installer tree using:
genisoimage -o rockyIso.img -V Rocky-9-3-x86_64-dvd -r -J rocky_iso_tree/ and then:

  1. Create separate EFI and installer partitions; format the installer partition as FAT32 and copy the rockyIso.img as a file to the installer partition

  2. Create separate EFI and installer partitions; format the installer partition as FAT32 and copy the rockyIso.img directly to the installer partition with dd if=rockyIso.img of=/dev/sdb1

  3. Create a single partition on the USB and copy the rockyIso.img directly to the installer partition with dd if=rockyIso.img of=/dev/sdb

In addition to the OS installer files, the USB also contains our product installers, product-specific config files. Also, the kickstart file has company branding, logos, colors, etc. As such we’d like a scriptable Linux CLI-only solution that doesn’t rely on tools like etcher, ventoy, etc.

Any suggestions?

You are not using ignoredisk, so the cdrom source should still work, at least it does that for us as long as ignoredisk is unset.

Are you doing any modifications to any of the boot images (efiboot.img, install.img)? If you do that, you will need to recompute checksums in .treeinfo (previous versions of the installers did not seem to check the checksums).

Thanks, I will try again with cdrom and omit ignoredisk.

Thanks for the .treeinfo info. To figure out what was happening, I did modify install.img to some print statements in the anaconda code. There were no complaints about checksums though.

Anaconda failed with the message “Nothing useful found for the HDD source…”. Digging deeper, it tried to mount the source folder (from /dev/sdb) but that failed because /dev/sdb1 was already mounted at /run/install/repo.

From /tmp/syslog:

mount -t auto -o defaults,ro /dev/sdb /run/install/sources/mount-0000-hdd-device
ERR: kernel : /dev/sdb Can't open blockdev
mount: /run/install/sources/mount-0000-hdd-device /dev/sdb already mounted or mount point busy

After which it fails with the “Nothing useful” message.

I’ll try the cdrom

Trying cdrom in the kickstart file also fails. Unlike using harddrive where the GUI shows sdb, the GUI shows “From Network” with nothing selected.

Messages in /tmp/syslog suggest it is looking for an actual CD ROM device (??)

  1. First it checks if sdb1 is a CD-ROM device, if not raises a “Source Setup Error”
  2. During cleanup, tries unmounting /run/install/sources/mount-0000-cdrom which fails with “no mount point specified” (ie, the directory does not exist)
05:49:05,541 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.source.cdrom.initialization:Trying to detect CD-ROM automatically
05:49:05,541 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.source.cdrom.initialization:Testing if inst.stage2 is a CDROM device
05:49:05,543 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.source.cdrom.initialization:Found possible stage2 default installation source sdb1
05:49:05,611 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:anaconda.threading:Thread Failed: AnaTaskThread-SetUpSourcesTask-1 (139806116800064)
05:49:05,612 WARNING org.fedoraproject.Anaconda.Modules.Payloads:ERROR:anaconda.modules.common.task.task:Thread AnaTaskThread-SetUpSourcesTask-1 has failed: Traceback (most recent call last):
05:49:05,612 WARNING org.fedoraproject.Anaconda.Modules.Payloads:  File "/usr/lib64/python3.9/site-packages/pyanaconda/modules/payloads/source/mount_tasks.py", line 75, in run
05:49:05,612 WARNING org.fedoraproject.Anaconda.Modules.Payloads:  File "/usr/lib64/python3.9/site-packages/pyanaconda/modules/payloads/source/cdrom/initialization.py", line 54, in _do_mount
05:49:05,612 WARNING org.fedoraproject.Anaconda.Modules.Payloads:    raise SourceSetupError("Found no CD-ROM")
05:49:05,612 WARNING org.fedoraproject.Anaconda.Modules.Payloads:pyanaconda.modules.common.errors.payload.SourceSetupError: Found no CD-ROM

05:49:05,612 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:anaconda.threading:Thread Done: AnaTaskThread-SetUpSourcesTask-1 (139806116800064)
05:49:06,549 WARNING org.fedoraproject.Anaconda.Modules.Payloads:  File "/usr/lib64/python3.9/site-packages/pyanaconda/modules/payloads/source/mount_tasks.py", line 75, in run
05:49:06,549 WARNING org.fedoraproject.Anaconda.Modules.Payloads:  File "/usr/lib64/python3.9/site-packages/pyanaconda/modules/payloads/source/cdrom/initialization.py", line 54, in _do_mount
05:49:06,549 WARNING org.fedoraproject.Anaconda.Modules.Payloads:    raise SourceSetupError("Found no CD-ROM")

05:49:06,549 WARNING org.fedoraproject.Anaconda.Modules.Payloads:pyanaconda.modules.common.errors.payload.SourceSetupError: Found no CD-ROM

05:49:06,660 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:anaconda.threading:Running Thread: AnaTaskThread-TearDownSourcesTask-2 (139806116800064)
05:49:06,660 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.base.initialization:Collected ['Tear down mount installation source'] tasks from SourceType.CDROM source
05:49:06,660 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.base.initialization:Running task Tear down mount installation source
05:49:06,660 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.source.mount_tasks:Unmounting installation source
05:49:06,660 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:program:Running... umount /run/install/sources/mount-0000-cdrom
05:49:06,665 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:program:b'umount: /run/install/sources/mount-0000-cdrom: no mount point specified.'
05:49:06,665 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:anaconda.threading:Thread Done: AnaTaskThread-TearDownSourcesTask-2 (139806116800064)
05:49:23,438 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:anaconda.threading:Running Thread: AnaTaskThread-TearDownSourcesTask-3 (139806116800064)
05:49:23,439 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.base.initialization:Collected ['Tear down mount installation source'] tasks from SourceType.CDROM source
05:49:23,439 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.base.initialization:Running task Tear down mount installation source
05:49:23,439 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.source.mount_tasks:Unmounting installation source
05:49:23,439 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:program:Running... umount /run/install/sources/mount-0000-cdrom
05:49:23,443 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:program:b'umount: /run/install/sources/mount-0000-cdrom: no mount point specified.'

05:49:23,444 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:anaconda.threading:Thread Done: AnaTaskThread-TearDownSourcesTask-3 (139806116800064)
05:49:24,451 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:dasbus.connection:Publishing an object at /org/fedoraproject/Anaconda/Modules/Payloads/Source/2.
05:49:24,452 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.payload.payload_base:New sources [Source(type='CLOSEST_MIRROR')] were added.
05:49:25,462 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:anaconda.threading:Running Thread: AnaTaskThread-TearDownSourcesTask-4 (139806116800064)
05:49:25,462 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.base.initialization:Collected [] tasks from SourceType.CLOSEST_MIRROR source
05:49:25,463 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:anaconda.threading:Thread Done: AnaTaskThread-TearDownSourcesTask-4 (139806116800064)
05:49:25,471 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:anaconda.threading:Running Thread: AnaTaskThread-SetUpSourcesTask-2 (139806116800064)
05:49:25,471 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.base.initialization:Collected ['Set up Repo files Installation Source'] tasks from SourceType.CLOSEST_MIRROR source
05:49:25,471 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.base.initialization:Running task Set up Repo files Installation Source
05:49:25,471 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.source.repo_files.initialization:Trying to detect repo files automatically
05:49:25,472 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:anaconda.threading:Thread Done: AnaTaskThread-SetUpSourcesTask-2 (139806116800064)
05:49:25,613 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:anaconda.threading:Running Thread: AnaTaskThread-TearDownSourcesTask-5 (139806116800064)
05:49:25,613 WARNING org.fedoraproject.Anaconda.Modules.Payloads:DEBUG:anaconda.modules.payloads.base.initialization:Collected [] tasks from SourceType.CLOSEST_MIRROR source
05:49:25,613 WARNING org.fedoraproject.Anaconda.Modules.Payloads:INFO:anaconda.threading:Thread Done: AnaTaskThread-TearDownSourcesTask-5 (139806116800064)

Some progress!

In the kickstart file, instead of using cdrom or harddrive, I used:

url --url=file:///run/install/repo

The source was located and packages are being installed.