From m.leanza at resi.it Mon May 3 07:23:22 2010 From: m.leanza at resi.it (Mirko Leanza) Date: Mon, 3 May 2010 09:23:22 +0200 Subject: R: [Read Isolinux Label in Kickstart File] Message-ID: <007a01caea91$87b62860$97227920$@leanza@resi.it> Hi Everybody, i use kickstart installation since the first release of RHEL3 and across the year the number of kickstart files in my isolinux directory are grown. Now I want know if there is a way to use the isolinux label insert by the user like a variable to read in %pre script for a number of things first of all create a %include file for partitioning, in this way I think that I'm able to reduce the number of kickstart files tha I use. For example. I have a ks file for ext3 partitioning and one for ext4 the rest of ks file are identhical, now if there is a way to read the label insert. I can aggregate the two files J Sorry for my poor English as usually i'm runnig out of time. Thanks in advance for your precious help in all these years! Mirko -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.mckay at gmail.com Mon May 3 15:49:45 2010 From: alan.mckay at gmail.com (Alan McKay) Date: Mon, 3 May 2010 11:49:45 -0400 Subject: [Read Isolinux Label in Kickstart File] In-Reply-To: <-8902556463722605596@unknownmsgid> References: <-8902556463722605596@unknownmsgid> Message-ID: You should be able to do this. In my kickstart files I use a lot of prompting and asking questions, and taking actions accordingly. Even with regards to disk partitioning. For example : whichdiskprompt() { # # which disk to format and install on # eventually need option for /data # echo "" echo "Here are the disks you have to choose from ..." fdisk -l 2>/dev/null | grep Disk | grep "/dev/sd[abcd]" DISKS=`fdisk -l 2>/dev/null | grep Disk | grep "/dev/sd[abcd]" | awk '{print $2}' | awk -F/ '{print $3}' | sed s/://` SAVEPS3=$PS3 PS3="Which disk to format? " MYDISK= select MYDISK in $DISKS do [ "$MYDISK" != "" ] && break done PS3=$SAVEPS3 echo "You chose [$MYDISK]" MYDISKSIZE=`fdisk -l 2>/dev/null | grep Disk | grep "/dev/$MYDISK" | awk '{print $3}' | awk -F. '{print $1}'` export MYDISK export MYDISKSIZE } I also work with NFS filesystems in my kickstart, so you could store your different formatting options on NFS, have your script look in a certain location to see what options are available there, and then prompt the user accordingly. I even have my options selected in %pre saved to the NFS drive so they can be read back in in %post and used there.bb Here is %pre part - note NFS server is 192.168.0.9 # # now lets try to copy some info over to an NFS drive # to save it for %post # mkdir -p /mnt/ks chmod 0777 /mnt /mnt/ks mount 192.168.0.9:/data/ks /mnt/ks -w mkdir -p /mnt/ks/kstmp MYMAC=`ifconfig | grep HWaddr | head -1 | awk '{print $5}'` # # OK, save out the vars we want for %post echo "MYMAC=$MYMAC" > /mnt/ks/kstmp/$MYMAC.vars echo "MYSYSTYPE=$MYSYSTYPE" >> /mnt/ks/kstmp/$MYMAC.vars echo "MYDISK=$MYDISK" >> /mnt/ks/kstmp/$MYMAC.vars echo "MYDISKSIZE=$MYDISKSIZE" >> /mnt/ks/kstmp/$MYMAC.vars echo "MYOWNVAR=$MYOWNVAR" >> /mnt/ks/kstmp/$MYMAC.vars echo "MYSWAPSIZE=$MYSWAPSIZE" >> /mnt/ks/kstmp/$MYMAC.vars echo "MYROOTSIZE=$MYROOTSIZE" >> /mnt/ks/kstmp/$MYMAC.vars echo "MINROOTSIZE=$MINROOTSIZE" >> /mnt/ks/kstmp/$MYMAC.vars echo "" cat /mnt/ks/kstmp/$MYMAC.vars echo "" umount /mnt/ks and here is %post part MYMAC=`ifconfig | grep HWaddr | head -1 | awk '{print $5}'` cp /etc/fstab /etc/fstab.orig echo "192.168.0.9:/data/ks /mnt/ks nfs rsize=32768,wsize=32768,timeo=14,intr" >> /etc/fstab mkdir -p /mnt/ks chmod 0777 /mnt /mnt/ks /etc/init.d/netfs start mount /mnt/ks cp /mnt/ks/kstmp/$MYMAC.vars /root umount /mnt/ks mv -f /etc/fstab.orig /etc/fstab while read line do eval $line done < /root/$MYMAC.vars -- ?Don't eat anything you've ever seen advertised on TV? - Michael Pollan, author of "In Defense of Food" From alan.mckay at gmail.com Mon May 3 15:52:23 2010 From: alan.mckay at gmail.com (Alan McKay) Date: Mon, 3 May 2010 11:52:23 -0400 Subject: [Read Isolinux Label in Kickstart File] In-Reply-To: References: <-8902556463722605596@unknownmsgid> Message-ID: Further to this - in my kickstart shortly after the "install" command, near the top of the file, I do this : %include /tmp/part-include And the file /tmp/part-include is where all my partitioning command get stored in %pre according to the questions I ask, and how they get answered. I cannot release my entire script at this point as it has some proprietary info in it -- ?Don't eat anything you've ever seen advertised on TV? - Michael Pollan, author of "In Defense of Food" From matt at indigo.nu Mon May 17 15:17:22 2010 From: matt at indigo.nu (Matthew Sellers) Date: Mon, 17 May 2010 10:17:22 -0500 Subject: Custom pxeboot kernel/images. Message-ID: Hello, I am in the process of "attempting" to build my own kernel image and initrd to replace the stock pxeboot images provided with Fedora. I am stuck though as I cannot find any documentation on how the initrd is built for pxeboot purposes. Can anybody reference any documentation or tools that describe how pxeboot kernel/initrd are built? My goal is to run the latest vanilla kernel as my PXE boot kernel for an older Fedora release. Thank You! Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: