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...
Lance
On Fri, Aug 27, 2010 at 9:00 AM, <kickstart-list-request@xxxxxxxxxx> wrote:
Send Kickstart-list mailing list submissions to
kickstart-list@xxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit
https://www.redhat.com/mailman/listinfo/kickstart-list
or, via email, send a message with subject or body 'help' to
kickstart-list-request@xxxxxxxxxx
You can reach the person managing the list at
kickstart-list-owner@xxxxxxxxxx
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Kickstart-list digest..."
Today's Topics:
1. Re: harddrive in %pre (Lance Gropper)
2. Re: harddrive in %pre (Dan Davis)
3. pungi question (Dan Davis)
---------- Forwarded message ----------
From: Lance Gropper <streamscalelance@xxxxxxxxx>
To: kickstart-list@xxxxxxxxxx
Date: Fri, 27 Aug 2010 08:43:05 -0700
Subject: Re: harddrive in %pre
Hello Ya'all: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...Lance# Kickstart file%include /tmp/inst-includeinstallkey --skiplang en_US.UTF-8keyboard usskipxrootpw --iscrypted $1$kt/7H6d3$g96NCQCYIJL.bIF7/FEJh/firewall --disabledauthconfig --useshadow --enablemd5selinux --disabledtimezone America/Tijuana%packages@core%pre#!/bin/bashINSTALLFROM='sda5'INSTALLTO='hda'touch /tmp/inst-includeif test -e '/sys/block/hda' ; thenls -l /sys/block/hda/device | grep /usbif [ $? -neq 0 ] ; thenINSTALLFROM='hda5'INSTALLTO='sda'fifiif test -e '/sys/block/sda' ; thenls -l /sys/block/sda/device | grep /usbif [ $? -neq 0 ] ; thenINSTALLFROM='sda5'if test -e '/sys/block/hda' ; thenINSTALLTO='hda'elseINSTALLTO='sdb'fififiif test -e '/sys/block/sdb' ; thenls -l /sys/block/sdb/device | grep /usbif [ $? -neq 0 ] ; thenINSTALLFROM='sdb5'if test -e '/sys/block/hda' ; thenINSTALLTO='hda'elseINSTALLTO='sda'fififiNICPORTS=0if test -e '/sys/class/net/eth0' ; thenNICPORTS=1fiif test -e '/sys/class/net/eth1' ; thenNICPORTS=2fiecho 'harddrive --partition='$INSTALLFROM' --dir=/' >>/tmp/inst-includeif [ $NICPORTS -gt 0 ] ; thenif [ $NICPORTS -eq 1 ] ; thenecho '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-includeelseecho 'network --device eth0 --bootproto dhcp --hostname mybox' >>/tmp/inst-includeecho '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-includefifiecho 'bootloader --location=mbr --driveorder='$INSTALLTO' --append="rhgb quiet crashkernel=128M@16M"' >>/tmp/inst-includeecho 'clearpart --all --drives='$INSTALLTO >>/tmp/inst-includeecho 'part /boot --fstype ext3 --size=100 -- >>/tmp/inst-includeecho 'part pv.100000 --size=0 --grow -- >>/tmp/inst-includeecho 'volgroup VolGroup00 --pesize=32768 pv.100000' >>/tmp/inst-includeecho 'logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=384 --grow --maxsize=768' >>/tmp/inst-includeecho 'logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow' >>/tmp/inst-include%end
---------- Forwarded message ----------
From: Dan Davis <dansmood@xxxxxxxxx>
To: Discussion list about Kickstart <kickstart-list@xxxxxxxxxx>
Date: Fri, 27 Aug 2010 11:50:08 -0400
Subject: Re: harddrive in %pre
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.
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.
---------- Forwarded message ----------
From: Dan Davis <dansmood@xxxxxxxxx>
To: kickstart-list@xxxxxxxxxx
Date: Fri, 27 Aug 2010 11:57:37 -0400
Subject: pungi question
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?
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).
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:
x86_64/os/Packages/kernel*
x86_64/os/vmlinuz
All I did was list fedora-updates with a repository cost of 1000, trying out some options for listing my internal mirrors.
Is this a Feature or a Bug? I'd love to use it... but I'm not sure why the build was different.
_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list
_______________________________________________ Kickstart-list mailing list Kickstart-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/kickstart-list