Hello Dan:<div><br></div><div>My script already figures out the device - the problem is using that device in the harddrive statement, by putting the harddrive statement in the %pre isn't working...</div><div><br></div>

<div>Lance<br><br><div class="gmail_quote">On Fri, Aug 27, 2010 at 9:00 AM,  <span dir="ltr"><<a href="mailto:kickstart-list-request@redhat.com">kickstart-list-request@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Send Kickstart-list mailing list submissions to<br>
        <a href="mailto:kickstart-list@redhat.com">kickstart-list@redhat.com</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://www.redhat.com/mailman/listinfo/kickstart-list" target="_blank">https://www.redhat.com/mailman/listinfo/kickstart-list</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:kickstart-list-request@redhat.com">kickstart-list-request@redhat.com</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:kickstart-list-owner@redhat.com">kickstart-list-owner@redhat.com</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Kickstart-list digest..."<br>
<br>Today's Topics:<br>
<br>
   1. Re: harddrive in %pre (Lance Gropper)<br>
   2. Re: harddrive in %pre (Dan Davis)<br>
   3. pungi question (Dan Davis)<br>
<br><br>---------- Forwarded message ----------<br>From: Lance Gropper <<a href="mailto:streamscalelance@gmail.com">streamscalelance@gmail.com</a>><br>To: <a href="mailto:kickstart-list@redhat.com">kickstart-list@redhat.com</a><br>

Date: Fri, 27 Aug 2010 08:43:05 -0700<br>Subject: Re: harddrive in %pre<br>Hello Ya'all:<div><br></div><div>Thank you all for the kind responses so far. Below is my kickstart (so far) - it is intended to be an automated install. Basically, the %pre finds the USB key, and sets it as the "install from" drive, and based on this sets the "install to" drive. The "install to" drive and network configuration currently works, however the "install from" harddrive statement does not, even though the USB key is properly detected. It would be great if the USB device was the same Linux short device name on every system, but it's not. Today, I am going to modify the script so it attempts other devices, other than hda, sda, and sdb. One of our customers' systems going to IBC the week after next has 73 drives, and the USB key shows up last. I'd like to keep the kickstart as light and fluffy as possible...</div>



<div><br></div><div>Lance</div><div><br></div><div><div># Kickstart file</div><div><br></div><div>%include /tmp/inst-include</div><div>install</div><div>key --skip</div><div>lang en_US.UTF-8</div><div>keyboard us</div><div>



skipx</div><div><br></div><div>rootpw --iscrypted $1$kt/7H6d3$g96NCQCYIJL.bIF7/FEJh/</div><div>firewall --disabled</div><div>authconfig --useshadow --enablemd5</div><div>selinux --disabled</div><div>timezone America/Tijuana</div>



<div><br></div><div>%packages</div><div>@core</div><div><br></div><div>%pre</div><div>#!/bin/bash</div><div><br></div><div>INSTALLFROM='sda5'</div><div>INSTALLTO='hda'</div><div><br></div><div>touch /tmp/inst-include</div>



<div>if test -e '/sys/block/hda' ; then</div><div>   ls -l /sys/block/hda/device | grep /usb</div><div>   if [ $? -neq 0 ] ; then</div><div>      INSTALLFROM='hda5'</div><div>      INSTALLTO='sda'</div>



<div>   fi</div><div>fi</div><div>if test -e '/sys/block/sda' ; then</div><div>   ls -l /sys/block/sda/device | grep /usb</div><div>   if [ $? -neq 0 ] ; then</div><div>      INSTALLFROM='sda5'</div><div>


      if test -e '/sys/block/hda' ; then</div>
<div>         INSTALLTO='hda'</div><div>      else</div><div>         INSTALLTO='sdb'</div><div>      fi</div><div>   fi</div><div>fi</div><div>if test -e '/sys/block/sdb' ; then</div><div>   ls -l /sys/block/sdb/device | grep /usb</div>



<div>   if [ $? -neq 0 ] ; then</div><div>      INSTALLFROM='sdb5'</div><div>      if test -e '/sys/block/hda' ; then</div><div>         INSTALLTO='hda'</div><div>      else</div><div>         INSTALLTO='sda'</div>



<div>      fi</div><div>   fi</div><div>fi</div><div>NICPORTS=0</div><div>if test -e '/sys/class/net/eth0' ; then</div><div>   NICPORTS=1</div><div>fi</div><div>if test -e '/sys/class/net/eth1' ; then</div>



<div>   NICPORTS=2</div><div>fi</div><div><br></div><div>echo 'harddrive --partition='$INSTALLFROM' --dir=/' >>/tmp/inst-include</div><div><br></div><div>if [ $NICPORTS -gt 0 ] ; then</div><div>   if [ $NICPORTS -eq 1 ] ; then</div>



<div>      echo 'network --device eth0 --bootproto static --ip 192.168.1.129 --netmask 255.255.255.0 --gateway 192.168.1.1 --nameserver None --hostname mybox' >>/tmp/inst-include</div><div>   else</div><div>



      echo 'network --device eth0 --bootproto dhcp --hostname mybox' >>/tmp/inst-include</div><div>      echo 'network --device eth1 --bootproto static --ip 192.168.1.129 --netmask 255.255.255.0 --gateway 192.168.1.1 --nameserver None --hostname mybox' >>/tmp/inst-include</div>



<div>   fi</div><div>fi</div><div><br></div><div>echo 'bootloader --location=mbr --driveorder='$INSTALLTO' --append="rhgb quiet crashkernel=128M@16M"' >>/tmp/inst-include</div><div>echo 'clearpart --all --drives='$INSTALLTO >>/tmp/inst-include</div>



<div>echo 'part /boot --fstype ext3 --size=100 --ondisk='$INSTALLTO >>/tmp/inst-include</div><div>echo 'part pv.100000 --size=0 --grow --ondisk='$INSTALLTO >>/tmp/inst-include</div><div>echo 'volgroup VolGroup00 --pesize=32768 pv.100000' >>/tmp/inst-include</div>



<div>echo 'logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=384 --grow --maxsize=768' >>/tmp/inst-include</div><div>echo 'logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow' >>/tmp/inst-include</div>



<div>%end</div></div><div><br></div>
<br><br>---------- Forwarded message ----------<br>From: Dan Davis <<a href="mailto:dansmood@gmail.com">dansmood@gmail.com</a>><br>To: Discussion list about Kickstart <<a href="mailto:kickstart-list@redhat.com">kickstart-list@redhat.com</a>><br>

Date: Fri, 27 Aug 2010 11:50:08 -0400<br>Subject: Re: harddrive in %pre<br>What we do is set a label with mkfs.vfat and change the syslinux.cfg on the USB to make reference to the USB label.<br><br>In %pre and %post scripts, you can use udevadm info on the devices and figure out which is USB, but that only works if your "real" hard disks are not USB.<br>


<br><br>---------- Forwarded message ----------<br>From: Dan Davis <<a href="mailto:dansmood@gmail.com">dansmood@gmail.com</a>><br>To: <a href="mailto:kickstart-list@redhat.com">kickstart-list@redhat.com</a><br>Date: Fri, 27 Aug 2010 11:57:37 -0400<br>

Subject: pungi question<br>Is there anyway I can instruct pungi to use one set of repositories to build the isolinux sub-directory, and another set of repositories for the Packages to install?<br><br>I've wanted to be able to do that for a long time, just so that nothing important to the DVD/CD changes, but we can change what we install (including the kernel).<br>


<br>I got hope the other day of this because I did a pungi build that turned out odd, in that these files didn't match:<br><br>x86_64/os/Packages/kernel*<br>x86_64/os/vmlinuz<br><br>All I did was list fedora-updates with a repository cost of 1000, trying out some options for listing my internal mirrors.<br>


<br>Is this a Feature or a Bug?  I'd love to use it... but I'm not sure why the build was different.<br>
<br>_______________________________________________<br>
Kickstart-list mailing list<br>
<a href="mailto:Kickstart-list@redhat.com">Kickstart-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/kickstart-list" target="_blank">https://www.redhat.com/mailman/listinfo/kickstart-list</a><br></blockquote></div><br></div>