Ask Your Question
0

usb stick installation cannot allways find ISO image

asked 2012-02-17 02:28:11 -0500

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
1

answered 2012-02-22 18:21:31 -0500

Stanislav Ochotnicky gravatar image

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

Question Tools

Stats

Asked: 2012-02-17 02:28:11 -0500

Seen: 2,584 times

Last updated: Feb 22 '12