What is this error? – multiple source directories have been specified and merged into the root of the filesystem genisoimage is not tar

I’ve tried a script to create a custom ISO, however get this error message:

Using KS000.CFG;1 for  /ks.cfg (ks.cfg)
genisoimage: Error: './ks.cfg' and '/tmp/4711/isoworkdir//isolinux/./ks.cfg' have the same Rock Ridge name 'ks.cfg'.
Unable to sort directory 
NOTE: multiple source directories have been specified and merged into the root
of the filesystem. Check your program arguments. genisoimage is not tar.

Script:

mkdir -v /tmp/bootiso
mount -o loop /path/to/some.iso /tmp/bootiso
 
mkdir -v /tmp/bootisoks
cp -vr /tmp/bootiso/* /tmp/bootisoks/
umount /tmp/bootiso && rmdir /tmp/bootiso
 
chmod -R u+w /tmp/bootisoks
cp /path/to/someks.cfg /tmp/bootisoks/isolinux/ks.cfg
 
# evtl. zusätzliche RPMs rein kopieren
#cp /path/to/*.rpm /tmp/bootisoks/Packages/.
#cd /tmp/bootisoks/Packages && createrepo -dpo .. .
 
sed -i 's/append\ initrd\=initrd.img/append initrd=initrd.img\ ks\=cdrom:\/ks.cfg/' /tmp/bootisoks/isolinux/isolinux.cfg
cd /tmp/bootisoks && \ 
mkisofs -o /tmp/boot.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "CentOS 7 x86_64" -R -J -v -T isolinux/. .
 
# Optional: ISO für USB key erstellen
#isohybrid /tmp/boot.iso
 
# md5 checksumme einfügen (damit man bei der Installation das Medium testen kann)
implantisomd5 /tmp/boot.iso

Call:

mkisofs -o /tmp/4711/4711.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V centos8stream -R -J -v -T /tmp/4711/isoworkdir//isolinux/. .

Answer

Attribution
Source : Link , Question Author : J. Doe , Answer Author : Community

Leave a Comment