Ask Your Question

usb stick installation cannot allways find ISO image

asked 2012-02-17 08:28:11 +0000

Achim gravatar 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 flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2012-02-23 00:21:31 +0000

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.


Asked: 2012-02-17 08:28:11 +0000

Seen: 2,118 times

Last updated: Feb 23 '12