# usb stick installation cannot allways find ISO image

my usb stick uses kickstart to do an unattended installation of centos. The usb device must be declared in the syslinux.cfg file. Is there a way to avoid this? Currently my syslinux.cfg config looks like this: APPEND initrd=initrd.img ks=hd:sdc1:/ks.cfg method=hd:sdc1:/iso This tells syslinux where to find the kickstart file and the iso image to install. Its possible to place the kickstart file to the ramdisk e.g. APPEND initrd=initrd.img ks=file:/mydir/ks.cfg method=hd:sdc1:/iso but still the location of the iso image must be configured. Since the usb device can change e.g. sdb1 etc. this is not very useful. I have tried to set this parameter in the %pre section of the kickstart file harddrive --partition=sdc1 --dir=iso but this does not work. thanks in advance

edit retag close merge delete

Sort by » oldest newest most voted

Probably the best way is to use UUIDs instead of partition names. First you'll have to figure out UUID of the sdc1 partition (or wherever your iso is). To find this out run blkid:

\$ blkid
/dev/sdc1: SEC_TYPE="msdos" UUID="4B8F-8337" TYPE="vfat"


You'll have to note down the UUID. Then modify your kickstart to use it like this:

APPEND initrd=initrd.img ks=file:/mydir/ks.cfg method=hd:UUID=4B8F-8337:/iso


Where the UUID after hd: is the one you noted down by running blkid

more