From Moray.Henderson at ict-software.org Thu Oct 18 10:45:35 2012 From: Moray.Henderson at ict-software.org (Moray Henderson) Date: Thu, 18 Oct 2012 11:45:35 +0100 Subject: Kernel boot parameters Message-ID: <000001cdad1d$b6826c70$23874550$@Henderson@ict-software.org> How do the kernel boot parameters in /boot/grub/grub.conf get written when a system is installed? I'd like to install CentOS 6 with "biosdevname=0" automatically appended to the boot parameters so that when the system boots for the first time it detects and configures eth0 instead of the fancy new system. Moray. "To err is human; to purr, feline." From crucerua at avaya.com Thu Oct 18 11:04:44 2012 From: crucerua at avaya.com (Adrian Cruceru) Date: Thu, 18 Oct 2012 14:04:44 +0300 Subject: Kernel boot parameters In-Reply-To: <000001cdad1d$b6826c70$23874550$@Henderson@ict-software.org> References: <000001cdad1d$b6826c70$23874550$@Henderson@ict-software.org> Message-ID: <507FE24C.9070903@avaya.com> Hi Moray, If you want biosdevname=0 in grub: - You can edit the file in %post section in kickstart. Problem is it will get replaced on each kernel update. - Another option is having an RPM with trigger script on kernel that applies "biosdevname=0" in /boot/grub/grub.conf. (%triggerin -- kernel) - Or, you can avoid installing the "biosdevname" RPM. Regards, Adrian On 10/18/2012 01:45 PM, Moray Henderson wrote: > How do the kernel boot parameters in /boot/grub/grub.conf get written when a > system is installed? I'd like to install CentOS 6 with "biosdevname=0" > automatically appended to the boot parameters so that when the system boots > for the first time it detects and configures eth0 instead of the fancy new > system. > > > Moray. > "To err is human; to purr, feline." > > > > > > > > > _______________________________________________ > Kickstart-list mailing list > Kickstart-list at redhat.com > https://www.redhat.com/mailman/listinfo/kickstart-list > From vchepkov at gmail.com Thu Oct 18 18:18:02 2012 From: vchepkov at gmail.com (Vadym Chepkov) Date: Thu, 18 Oct 2012 14:18:02 -0400 Subject: Kernel boot parameters In-Reply-To: <507fdec0.03cc440a.3ac5.5140SMTPIN_ADDED@mx.google.com> References: <507fdec0.03cc440a.3ac5.5140SMTPIN_ADDED@mx.google.com> Message-ID: On Oct 18, 2012, at 6:45 AM, Moray Henderson wrote: > How do the kernel boot parameters in /boot/grub/grub.conf get written when a > system is installed? I'd like to install CentOS 6 with "biosdevname=0" > automatically appended to the boot parameters so that when the system boots > for the first time it detects and configures eth0 instead of the fancy new > system. bootloader --append http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader Cheers, Vadym From Moray.Henderson at ict-software.org Fri Oct 19 08:58:18 2012 From: Moray.Henderson at ict-software.org (Moray Henderson) Date: Fri, 19 Oct 2012 09:58:18 +0100 Subject: Kernel boot parameters In-Reply-To: <507FE24C.9070903@avaya.com> References: <000001cdad1d$b6826c70$23874550$@Henderson@ict-software.org> <507FE24C.9070903@avaya.com> Message-ID: <000001cdadd7$e3839e00$aa8ada00$@Henderson@ict-software.org> Ah, if we can do it by excluding an rpm, that looks the easiest way. Thanks Adrian. Moray. "To err is human; to purr, feline." > -----Original Message----- > From: Adrian Cruceru [mailto:crucerua at avaya.com] > Sent: 18 October 2012 12:05 > To: kickstart-list at redhat.com; Moray Henderson (ICT) > Subject: Re: Kernel boot parameters > > Hi Moray, > > If you want biosdevname=0 in grub: > - You can edit the file in %post section in kickstart. Problem is it > will get replaced on each kernel update. > - Another option is having an RPM with trigger script on kernel that > applies "biosdevname=0" in /boot/grub/grub.conf. (%triggerin -- kernel) > - Or, you can avoid installing the "biosdevname" RPM. > > Regards, > Adrian > > > On 10/18/2012 01:45 PM, Moray Henderson wrote: > > How do the kernel boot parameters in /boot/grub/grub.conf get written > > when a system is installed? I'd like to install CentOS 6 with > "biosdevname=0" > > automatically appended to the boot parameters so that when the system > > boots for the first time it detects and configures eth0 instead of > the > > fancy new system. > > > > > > Moray. > > "To err is human; to purr, feline." > > > > > > > > > > > > > > > > > > _______________________________________________ > > Kickstart-list mailing list > > Kickstart-list at redhat.com > > https://www.redhat.com/mailman/listinfo/kickstart-list > > > > From kks.kbase at gmail.com Sun Oct 21 21:51:25 2012 From: kks.kbase at gmail.com (kk s) Date: Mon, 22 Oct 2012 03:21:25 +0530 Subject: Disk detection with kickstart Message-ID: Hi, I have to provision the servers and all the servers are different disk types like hda, sda, xvda. So I have issue to detect the disk type itself with kickstart and make partitions. Does anyone have pre installation script that will do this job? -------------- next part -------------- An HTML attachment was scrubbed... URL: From kks.kbase at gmail.com Sun Oct 21 23:24:22 2012 From: kks.kbase at gmail.com (kk s) Date: Mon, 22 Oct 2012 04:54:22 +0530 Subject: Unable to include files in kickstart Message-ID: Hi, I want to include a file in kickstart that file contains all the partition informations. But when I try to include getting the below error, unable to open input kickstart file : could not open/read file:///tmp/partitions How to fix this issue and how can I get this file include? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sr at genyosha.net Mon Oct 22 00:15:01 2012 From: sr at genyosha.net (Steve Rikli) Date: Sun, 21 Oct 2012 17:15:01 -0700 Subject: Unable to include files in kickstart In-Reply-To: References: Message-ID: <20121022001501.GA921@dragon.genyosha.home> On Mon, Oct 22, 2012 at 04:54:22AM +0530, kk s wrote: > > I want to include a file in kickstart that file contains all the partition > informations. But when I try to include getting the below error, > > unable to open input kickstart file : could not open/read > file:///tmp/partitions > > How to fix this issue and how can I get this file include? It depends on your circumstances. E.g. if you are trying to Kickstart Fedora 17, it could be a known bug in anaconda: https://bugzilla.redhat.com/show_bug.cgi?id=805316 See if that matches your situation, otherwise you would need to provide more details about your setup. Cheers, sr. From me at byteaction.de Mon Oct 22 07:11:13 2012 From: me at byteaction.de (Markus Eyrich) Date: Mon, 22 Oct 2012 09:11:13 +0200 Subject: Disk detection with kickstart In-Reply-To: References: Message-ID: <5084F191.3070601@byteaction.de> Did you get any help on this topic ? I would also be interested in that. Kind regards, **** Markus Am 21.10.2012 23:51, schrieb kk s: > Hi, > > I have to provision the servers and all the servers are different disk > types like hda, sda, xvda. So I have issue to detect the disk type > itself with kickstart and make partitions. Does anyone have pre > installation script that will do this job? > > > _______________________________________________ > Kickstart-list mailing list > Kickstart-list at redhat.com > https://www.redhat.com/mailman/listinfo/kickstart-listDiese E-Mail wurde von bytstor archiviert. Zum ?ndern des Status: http://bytstormail.byteaction.de/bytstor/app/action/SearchStoredMailAction/template/storedMail%2CSearchStoredMail.vm?redirect_template=storedMail%2CSearchStoredMail.vm&usermailid=10337005 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kks.kbase at gmail.com Mon Oct 22 07:45:14 2012 From: kks.kbase at gmail.com (kk s) Date: Mon, 22 Oct 2012 13:15:14 +0530 Subject: Unable to include files in kickstart Message-ID: Hi, I am trying to do this on centos 5 and centos 6 not yet tried this with Fedora. > > I want to include a file in kickstart that file contains all the partition > informations. But when I try to include getting the below error, > > unable to open input kickstart file : could not open/read > file:///tmp/partitions > > How to fix this issue and how can I get this file include? It depends on your circumstances. E.g. if you are trying to Kickstart Fedora 17, it could be a known bug in anaconda: https://bugzilla.redhat.com/show_bug.cgi?id=805316 See if that matches your situation, otherwise you would need to provide more details about your setup. Cheers, sr. -------------- next part -------------- An HTML attachment was scrubbed... URL: From crucerua at avaya.com Mon Oct 22 07:45:17 2012 From: crucerua at avaya.com (Adrian Cruceru) Date: Mon, 22 Oct 2012 10:45:17 +0300 Subject: Disk detection with kickstart In-Reply-To: <5084F191.3070601@byteaction.de> References: <5084F191.3070601@byteaction.de> Message-ID: <5084F98D.4080609@avaya.com> Hi, You can process /proc/partitions within %pre. Just make sure to avoid block devices. You can easily process this and generate a separate file for partitioning (and have a %include for that) Hope this helps, Regards, Adrian On 10/22/2012 10:11 AM, Markus Eyrich wrote: > Did you get any help on this topic ? I would also be interested in that. > > Kind regards, > **** > > Markus > > Am 21.10.2012 23:51, schrieb kk s: >> Hi, >> >> I have to provision the servers and all the servers are different >> disk types like hda, sda, xvda. So I have issue to detect the disk >> type itself with kickstart and make partitions. Does anyone have pre >> installation script that will do this job? >> >> >> _______________________________________________ >> Kickstart-list mailing list >> Kickstart-list at redhat.com >> https://www.redhat.com/mailman/listinfo/kickstart-listDiese E-Mail wurde von bytstor archiviert. Zum ?ndern des Status:http://bytstormail.byteaction.de/bytstor/app/action/SearchStoredMailAction/template/storedMail%2CSearchStoredMail.vm?redirect_template=storedMail%2CSearchStoredMail.vm&usermailid=10337005 > > > > _______________________________________________ > Kickstart-list mailing list > Kickstart-list at redhat.com > https://www.redhat.com/mailman/listinfo/kickstart-list -------------- next part -------------- An HTML attachment was scrubbed... URL: From petro at cpetro.us Mon Oct 22 07:45:31 2012 From: petro at cpetro.us (Petro) Date: Mon, 22 Oct 2012 17:15:31 +0930 Subject: Disk detection with kickstart In-Reply-To: References: Message-ID: <5084F99B.7040401@cpetro.us> On 22/10/12 4:41 PM, kickstart-list-request at redhat.com wrote: > Hi, > > I have to provision the servers and all the servers are different disk > types like hda, sda, xvda. So I have issue to detect the disk type > itself with kickstart and make partitions. Does anyone have pre > installation script that will do this job? There are a couple of different approaches to this problem. One is to build a fairly sophisticated one-size-fits-all kickstart script that works for every situation. We have one admin at work (responsible for a small area--two or three hundred servers) who has done this. However he has strong control over his configurations and is very knowledgeable. This is fairly complicated, and honestly if you have to ask for more than a very narrow and specfic pointer or two you're not going to have much luck. Another way is to define a different kickstart for each type of server and use DHCP/PXE to differentiate between them. I don't have the details off the top of my head, but you can create a couple of different kickstart servers and then link each IP address to a config. Then when the tftp request comes in it gets handed the right ks.cfg file for that machine I've taken a third tack.. I have little control over my configurations (I have to mantain a 4.x, 2-3 5.x and so far 3 6.x kickstart configurations), but for the most part I have known hardware (HP DL3x0s, g4 and up) and I do something (off the top of my head) like this: %pre (some stuff to set up resolve.conf and kick ntpd up) if /dev/sda do cat << EOF >> /tmp/partitions EOF elif /dev/cciss/c0d0 do cat <> /tmp/partitions EOF else write error file. (clearly this is NOT the real code, and might have some errors :) ) Then were I'd normally have my disk layout in the ks.cfg I just %include /tmp/partitons And yes, in the first iteration I *did* spell it different in one place than the other. Just because I like beating my head into brick walls. The other thing is I only do the first disk/disk set in the ks.cfg, and configure the rest of the disks later. From Pablo.Iranzo at redhat.com Mon Oct 22 08:11:23 2012 From: Pablo.Iranzo at redhat.com (Pablo Iranzo =?utf-8?Q?G=C3=B3mez?=) Date: Mon, 22 Oct 2012 04:11:23 -0400 (EDT) Subject: Disk detection with kickstart In-Reply-To: <5084F98D.4080609@avaya.com> Message-ID: <5583578.130.1350893478917.JavaMail.iranzo@x201.no-ip.org> For me it's easier to use: set $(list-harddrives) let numd=$#/2 # Number of disks d1=$1 # device for 1st disk S1=$2 # size for first disk (and so on) DISK=$d1 echo "clearpart --drives=$DISK --all --initlabel" >> /tmp/part-include echo "part /boot --fstype ext3 --size=100 --ondisk=$DISK" >> /tmp/part-include echo "part pv.100000 --size=1 --grow --ondisk=$DISK" >> /tmp/part-include echo "volgroup vgname --pesize=32768 pv.100000" >> /tmp/part-include echo "logvol swap --fstype swap --name=Swap --vgname=vgname --size=2047" >> /tmp/part-include echo "logvol / --fstype ext3 --name=root --vgname=vgname --size=2048" >> /tmp/part-include echo "logvol /home --fstype ext3 --size=1500 --name=home --vgname=vgname" >> /tmp/part-include echo "logvol /tmp --fstype ext3 --size=2048 --name=tmp --vgname=vgname" >> /tmp/part-include ----- Mensaje original ----- > De: "Adrian Cruceru" > Para: kickstart-list at redhat.com > Enviados: Lunes, 22 de Octubre 2012 9:45:17 > Asunto: Re: Disk detection with kickstart > Hi, > You can process /proc/partitions within %pre. Just make sure to avoid > block devices. > You can easily process this and generate a separate file for > partitioning (and have a %include for that) > Hope this helps, > Regards, > Adrian > On 10/22/2012 10:11 AM, Markus Eyrich wrote: > > D id you get any help on this topic ? I would also be interested in > > that. > > > Kind regards, > > > Markus > > > Am 21.10.2012 23:51, schrieb kk s: > > > > Hi, > > > > > > I have to provision the servers and all the servers are different > > > disk types like hda, sda, xvda. So I have issue to detect the > > > disk > > > type itself with kickstart and make partitions. Does anyone have > > > pre > > > installation script that will do this job? > > > > > > _______________________________________________ > > > > > > Kickstart-list mailing list Kickstart-list at redhat.com > > > https://www.redhat.com/mailman/listinfo/kickstart-listDiese > > > E-Mail > > > wurde von bytstor archiviert. Zum ?ndern des Status: > > > http://bytstormail.byteaction.de/bytstor/app/action/SearchStoredMailAction/template/storedMail%2CSearchStoredMail.vm?redirect_template=storedMail%2CSearchStoredMail.vm&usermailid=10337005 > > > > > _______________________________________________ > > > Kickstart-list mailing list Kickstart-list at redhat.com > > https://www.redhat.com/mailman/listinfo/kickstart-list > > _______________________________________________ > Kickstart-list mailing list > Kickstart-list at redhat.com > https://www.redhat.com/mailman/listinfo/kickstart-list -- Pablo Iranzo G?mez (Pablo.Iranzo at redhat.com) Senior Global Profesional Services Consultant (RHCA, RHCSS, RHCDS, RHCVA, RHCE, RHCSA, RHCSP) #110-215-852 Phone: +34 645 01 01 49 (CET/CEST) GnuPG KeyID: 0x5BD8E1E4 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Moray.Henderson at ict-software.org Mon Oct 22 10:20:14 2012 From: Moray.Henderson at ict-software.org (Moray Henderson) Date: Mon, 22 Oct 2012 11:20:14 +0100 Subject: Disk detection with kickstart In-Reply-To: References: Message-ID: <000001cdb03e$d4257d20$7c707760$@Henderson@ict-software.org> From: kk s [mailto:kks.kbase at gmail.com] Sent: 21 October 2012 22:51 Hi, I have to provision the servers and all the servers are different disk types like hda, sda, xvda. So I have issue to detect the disk type itself with kickstart and make partitions. Does anyone have pre installation script that will do this job? There was something about this earlier in the year - I can't remember now if it was on kickstart-list or anaconda-devel. Someone was saying that if you try to create partitions in %pre anaconda gets confused and can't find them. Does anyone else remember that thread? You always need to write the partition instructions to a file and %include them back into your kickstart file. You used to detect hard drives in %pre with list-harddrives although things change in anaconda so frequently it is difficult to give precise instructions. With a kickstart file on USB drive for example, you could end up with the USB drive wiped and included in the Linux logical volume group if you were not careful. As a first step, create a kickstart that just writes the output of list-harddrives to a file and see if it gives you anything you can use. Moray. "To err is human; to purr, feline." -------------- next part -------------- An HTML attachment was scrubbed... URL: From sr at genyosha.net Mon Oct 22 15:29:25 2012 From: sr at genyosha.net (Steve Rikli) Date: Mon, 22 Oct 2012 08:29:25 -0700 Subject: Unable to include files in kickstart In-Reply-To: References: Message-ID: <20121022152925.GA6939@dragon.genyosha.home> On Mon, Oct 22, 2012 at 01:15:14PM +0530, kk s wrote: > Hi, > > I am trying to do this on centos 5 and centos 6 not yet tried this with > Fedora. %include files definitely work in CentOS5 & 6. As the notes in that bugzilla report point out, it's "normal" for anaconda to not read an %include file immediately as it parses the ks.cfg file, so while the error message is correct it is not fatal. Now if the %include file is still not being read in subsequent passes through ks.cfg (e.g. after the network has been configured or etc.) that is a different problem. If you want help debugging this you'll need to provide more details. E.g. your ks.cfg file, describe your Kickstart setup (pxe, usb media, whatever), etc. Cheers, sr. > > I want to include a file in kickstart that file contains all the partition > > informations. But when I try to include getting the below error, > > > > unable to open input kickstart file : could not open/read > > file:///tmp/partitions > > > > How to fix this issue and how can I get this file include? > > It depends on your circumstances. E.g. if you are trying to Kickstart > Fedora 17, it could be a known bug in anaconda: > > https://bugzilla.redhat.com/show_bug.cgi?id=805316 > > See if that matches your situation, otherwise you would need to provide > more details about your setup. > From jason at rampaginggeek.com Mon Oct 22 23:58:47 2012 From: jason at rampaginggeek.com (Jason Edgecombe) Date: Mon, 22 Oct 2012 19:58:47 -0400 Subject: Disk detection with kickstart In-Reply-To: <000001cdb03e$d4257d20$7c707760$@Henderson@ict-software.org> References: <000001cdb03e$d4257d20$7c707760$@Henderson@ict-software.org> Message-ID: <5085DDB7.9010006@rampaginggeek.com> On 10/22/2012 06:20 AM, Moray Henderson wrote: > From: kk s [mailto:kks.kbase at gmail.com] > Sent: 21 October 2012 22:51 > > > > Hi, > > > > I have to provision the servers and all the servers are different disk types > like hda, sda, xvda. So I have issue to detect the disk type itself with > kickstart and make partitions. Does anyone have pre installation script that > will do this job? > > > > There was something about this earlier in the year - I can't remember now if > it was on kickstart-list or anaconda-devel. Someone was saying that if you > try to create partitions in %pre anaconda gets confused and can't find them. > Does anyone else remember that thread? You always need to write the > partition instructions to a file and %include them back into your kickstart > file. You used to detect hard drives in %pre with list-harddrives although > things change in anaconda so frequently it is difficult to give precise > instructions. With a kickstart file on USB drive for example, you could end > up with the USB drive wiped and included in the Linux logical volume group > if you were not careful. As a first step, create a kickstart that just > writes the output of list-harddrives to a file and see if it gives you > anything you can use. > > > I have something similar, which checks for sda, sdb, hda, hda, etc. Tested on RHEL5 code below: #-----------------------------------------------cut----------------------------------------- # main part of kickstart # include the partitioning logic from the pre section. %include /tmp/part-include %pre # pre section #----- partitioning logic below-------------- # pick the first drive that is not removable and is over MINSIZE DIR="/sys/block" # minimum size of hard drive needed specified in GIGABYTES MINSIZE=60 ROOTDRIVE="" # /sys/block/*/size is in 512 byte chunks for DEV in sda sdb sdc sdd hda hdb; do if [ -d $DIR/$DEV ]; then REMOVABLE=`cat $DIR/$DEV/removable` if (( $REMOVABLE == 0 )); then echo $DEV SIZE=`cat $DIR/$DEV/size` GB=$(($SIZE/2**21)) if [ $GB -gt $MINSIZE ]; then echo "$(($SIZE/2**21))" if [ -z $ROOTDRIVE ]; then ROOTDRIVE=$DEV fi fi fi fi done echo "ROOTDRIVE=$ROOTDRIVE" # drives smaller than 240GB use fixed-size partions # drives larger than 240GB use percentage-based partition sizes if [ $GB -lt 240 ]; then # drives smaller than 240GB cat << EOF > /tmp/part-include zerombr clearpart --all --drives=$ROOTDRIVE --initlabel #clearpart --all --drives=$ROOTDRIVE bootloader --location=mbr --driveorder=$ROOTDRIVE part /boot --fstype ext3 --size=300 --ondisk=$ROOTDRIVE part pv.8 --size=100 --grow --ondisk=$ROOTDRIVE volgroup VolGroup00 --pesize=65536 pv.8 logvol / --fstype ext3 --name=root --vgname=VolGroup00 --size=30000 logvol swap --fstype swap --name=swap --vgname=VolGroup00 --size=8000 logvol /tmp --fstype ext3 --name=tmp --vgname=VolGroup00 --size=10000 logvol /var/log --fstype ext3 --name=varlog --vgname=VolGroup00 --size=1000 logvol /usr/vice/cache --fstype ext3 --name=usrvicecache --vgname=VolGroup00 --size=17000 EOF else # drives 240GB and larger cat << EOF > /tmp/part-include zerombr clearpart --all --drives=$ROOTDRIVE --initlabel #clearpart --all --drives=$ROOTDRIVE bootloader --location=mbr --driveorder=$ROOTDRIVE part /boot --fstype ext3 --size=300 --ondisk=$ROOTDRIVE part pv.8 --size=100 --grow --ondisk=$ROOTDRIVE volgroup VolGroup00 --pesize=65536 pv.8 logvol / --fstype ext3 --name=root --vgname=VolGroup00 --percent=12 logvol swap --fstype swap --name=swap --vgname=VolGroup00 --percent=4 logvol /tmp --fstype ext3 --name=tmp --vgname=VolGroup00 --percent=4 logvol /var/log --fstype ext3 --name=varlog --vgname=VolGroup00 --percent=1 logvol /usr/vice/cache --fstype ext3 --name=usrvicecache --vgname=VolGroup00 --percent=7 EOF fi #-----------------------------------------------cut----------------------------------------- Jason