From abhijitz at icloud.com Fri Jan 29 04:34:49 2016 From: abhijitz at icloud.com (Abhijit Das) Date: Thu, 28 Jan 2016 20:34:49 -0800 Subject: Dynamic allocation of swap not working. In-Reply-To: <248C1A49-F971-4F35-8A94-65E983910C6F@icloud.com> References: <248C1A49-F971-4F35-8A94-65E983910C6F@icloud.com> Message-ID: <208EA5D7-A6B1-461E-B45C-1E98D8A83066@icloud.com> Trying to dynamically allocate swap logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024 %include /tmp/swap_partition %pre #!/bin/bash mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` mem_mb=`expr $mem / 1024` echo "logvol swap --name=lv_swap --vgname=VolGroup00 ?-size=$mem_mb" > /tmp/swap_partition It throws an error that /tmp/swap_partition is not found. Please advise how should i proceed. From abhijitz at icloud.com Fri Jan 29 05:14:56 2016 From: abhijitz at icloud.com (Abhijit Das) Date: Thu, 28 Jan 2016 21:14:56 -0800 Subject: Dynamic allocation of swap not working. In-Reply-To: <208EA5D7-A6B1-461E-B45C-1E98D8A83066@icloud.com> References: <248C1A49-F971-4F35-8A94-65E983910C6F@icloud.com> <208EA5D7-A6B1-461E-B45C-1E98D8A83066@icloud.com> Message-ID: <57C84D77-8CDA-4E8A-9D46-3A9421AC4EF8@icloud.com> I tried every possible way ? still same error, Here is my command section. clearpart --linux zerombr part /boot/efi --fstype=efi --grow --maxsize=200 --size=20 part /boot --fstype=ext4 --size=500 part pv.008002 --grow --size=1 %include /tmp/disk_partition.cfg Here is my complete %pre section now. %pre mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` mem_mb=`expr $mem / 1024` cat << EOF > /tmp/disk_partition.cfg volgroup VolGroup00 --pesize=4096 pv.008002 logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024 logvol swap --name=lv_swap --vgname=VolGroup00 ?-size=$mem_mb EOF sleep 5 exec < /dev/tty6 > /dev/tty6 2> /dev/tty6 chvt 6 APIKEY=xxxx HOSTNAME=$(hostname) curl -s -o /tmp/deploytoken --data "private_token=${APIKEY}&hostname=${HOSTNAME}&message=preinstall_start" https:// chvt 1 On Jan 28, 2016, at 8:34 PM, Abhijit Das wrote: Trying to dynamically allocate swap logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024 %include /tmp/swap_partition %pre #!/bin/bash mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` mem_mb=`expr $mem / 1024` echo "logvol swap --name=lv_swap --vgname=VolGroup00 ?-size=$mem_mb" > /tmp/swap_partition It throws an error that /tmp/swap_partition is not found. Please advise how should i proceed. From sagarun at gmail.com Fri Jan 29 05:44:53 2016 From: sagarun at gmail.com (Arun SAG) Date: Thu, 28 Jan 2016 21:44:53 -0800 Subject: Dynamic allocation of swap not working. In-Reply-To: <57C84D77-8CDA-4E8A-9D46-3A9421AC4EF8@icloud.com> References: <248C1A49-F971-4F35-8A94-65E983910C6F@icloud.com> <208EA5D7-A6B1-461E-B45C-1E98D8A83066@icloud.com> <57C84D77-8CDA-4E8A-9D46-3A9421AC4EF8@icloud.com> Message-ID: <20160129054453.GA22266@gnubox.lan> On Thu, Jan 28, 2016 at 09:14:56PM -0800, Abhijit Das wrote: > I tried every possible way ? still same error, > > Here is my command section. > > clearpart --linux > zerombr > > part /boot/efi --fstype=efi --grow --maxsize=200 --size=20 > part /boot --fstype=ext4 --size=500 > part pv.008002 --grow --size=1 > > %include /tmp/disk_partition.cfg > Try moving the %include /tmp/disk_partition.cfg below the %pre section in your kickstart file -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From clumens at redhat.com Fri Jan 29 16:09:08 2016 From: clumens at redhat.com (Chris Lumens) Date: Fri, 29 Jan 2016 11:09:08 -0500 Subject: Dynamic allocation of swap not working. In-Reply-To: <208EA5D7-A6B1-461E-B45C-1E98D8A83066@icloud.com> References: <248C1A49-F971-4F35-8A94-65E983910C6F@icloud.com> <208EA5D7-A6B1-461E-B45C-1E98D8A83066@icloud.com> Message-ID: <20160129160908.GA24235@exeter.usersys.redhat.com> > Trying to dynamically allocate swap > > logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024 > %include /tmp/swap_partition > > %pre > #!/bin/bash > mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` > mem_mb=`expr $mem / 1024` > echo "logvol swap --name=lv_swap --vgname=VolGroup00 ???-size=$mem_mb" > /tmp/swap_partition > > It throws an error that /tmp/swap_partition is not found. Please advise how should i proceed. What OS and version? Are there any other errors in your /tmp/anaconda.log or on tty1? - Chris From abhijitd at apple.com Fri Jan 29 17:35:50 2016 From: abhijitd at apple.com (Abhijit Das) Date: Fri, 29 Jan 2016 09:35:50 -0800 Subject: Kickstart-list Digest, Vol 137, Issue 1 In-Reply-To: References: Message-ID: <24FF4123-5567-48F3-BB0C-95863371FECB@apple.com> @ Arun - I believe it shouldn?t matter where the %pre is located. However, i have tried and the same error. @ Chris - I appended ?log /tmp/ks-pre.log to %pre but the log file is blank. /ks/anaconda.log tells me that %pre is executed but not .. Here i have modified %pre %pre --log=/tmp/pre-log #!/bin/bash exec < /dev/tty6 > /dev/tty6 2> /dev/tty6 chvt 6 disk=`sfdisk -s | head -1 | awk -F':' '{print $1}'` mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` mem_mb=`expr $mem / 2048` allparts=$( sfdisk -d | grep "/dev/"| grep -v "^#" | cut -d ":" -f1 ) for part in $allparts do dd if=/dev/zero of=$part bs=512 count=16 done cat << EOF > /tmp/disk_partition.sh clearpart --all --drives=$disk part /boot/efi --fstype=efi --grow --maxsize=200 --size=20 part /boot --fstype=ext4 --size=500 part pv.01 --grow --size=1 volgroup VolGroup01 --pesize=4096 pv.01 logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup01 --grow --size=1024 logvol swap --fstype=swap --name=lv_swap --vgname=VolGroup01 ?-size=$mem_mb EOF APIKEY=aea1e3bb412e0e8273340f5e5ec22c33 HOSTNAME=$(hostname) curl -s -o /tmp/deploytoken --data "private_token=${APIKEY}&hostname=${HOSTNAME}&message=preinstall_start" https://1.1.1.1/api/v2/deploy/log/start chvt 1 exec < /dev/tty1 > /dev/tty1 2> /dev/tty1 On Jan 29, 2016, at 9:00 AM, kickstart-list-request at redhat.com wrote: Send Kickstart-list mailing list submissions to kickstart-list at redhat.com 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 at redhat.com You can reach the person managing the list at kickstart-list-owner at redhat.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Kickstart-list digest..." Today's Topics: 1. Dynamic allocation of swap not working. (Abhijit Das) 2. Re: Dynamic allocation of swap not working. (Abhijit Das) 3. Re: Dynamic allocation of swap not working. (Arun SAG) 4. Re: Dynamic allocation of swap not working. (Chris Lumens) From: Abhijit Das Subject: Dynamic allocation of swap not working. Date: January 28, 2016 at 8:34:49 PM PST To: kickstart-list at redhat.com Reply-To: Discussion list about Kickstart Trying to dynamically allocate swap logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024 %include /tmp/swap_partition %pre #!/bin/bash mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` mem_mb=`expr $mem / 1024` echo "logvol swap --name=lv_swap --vgname=VolGroup00 ?-size=$mem_mb" > /tmp/swap_partition It throws an error that /tmp/swap_partition is not found. Please advise how should i proceed. From: Abhijit Das Subject: Re: Dynamic allocation of swap not working. Date: January 28, 2016 at 9:14:56 PM PST To: kickstart-list at redhat.com Reply-To: Discussion list about Kickstart I tried every possible way ? still same error, Here is my command section. clearpart --linux zerombr part /boot/efi --fstype=efi --grow --maxsize=200 --size=20 part /boot --fstype=ext4 --size=500 part pv.008002 --grow --size=1 %include /tmp/disk_partition.cfg Here is my complete %pre section now. %pre mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` mem_mb=`expr $mem / 1024` cat << EOF > /tmp/disk_partition.cfg volgroup VolGroup00 --pesize=4096 pv.008002 logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024 logvol swap --name=lv_swap --vgname=VolGroup00 ?-size=$mem_mb EOF sleep 5 exec < /dev/tty6 > /dev/tty6 2> /dev/tty6 chvt 6 APIKEY=xxxx HOSTNAME=$(hostname) curl -s -o /tmp/deploytoken --data "private_token=${APIKEY}&hostname=${HOSTNAME}&message=preinstall_start" https:// chvt 1 On Jan 28, 2016, at 8:34 PM, Abhijit Das wrote: Trying to dynamically allocate swap logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024 %include /tmp/swap_partition %pre #!/bin/bash mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` mem_mb=`expr $mem / 1024` echo "logvol swap --name=lv_swap --vgname=VolGroup00 ?-size=$mem_mb" > /tmp/swap_partition It throws an error that /tmp/swap_partition is not found. Please advise how should i proceed. From: Arun SAG Subject: Re: Dynamic allocation of swap not working. Date: January 28, 2016 at 9:44:53 PM PST To: Discussion list about Kickstart Reply-To: Discussion list about Kickstart On Thu, Jan 28, 2016 at 09:14:56PM -0800, Abhijit Das wrote: > I tried every possible way ? still same error, > > Here is my command section. > > clearpart --linux > zerombr > > part /boot/efi --fstype=efi --grow --maxsize=200 --size=20 > part /boot --fstype=ext4 --size=500 > part pv.008002 --grow --size=1 > > %include /tmp/disk_partition.cfg > Try moving the %include /tmp/disk_partition.cfg below the %pre section in your kickstart file From: Chris Lumens Subject: Re: Dynamic allocation of swap not working. Date: January 29, 2016 at 8:09:08 AM PST To: kickstart-list at redhat.com Reply-To: Discussion list about Kickstart > Trying to dynamically allocate swap > > logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024 > %include /tmp/swap_partition > > %pre > #!/bin/bash > mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` > mem_mb=`expr $mem / 1024` > echo "logvol swap --name=lv_swap --vgname=VolGroup00 ???-size=$mem_mb" > /tmp/swap_partition > > It throws an error that /tmp/swap_partition is not found. Please advise how should i proceed. What OS and version? Are there any other errors in your /tmp/anaconda.log or on tty1? - Chris _______________________________________________ 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 abhijitd at apple.com Fri Jan 29 17:51:27 2016 From: abhijitd at apple.com (Abhijit Das) Date: Fri, 29 Jan 2016 09:51:27 -0800 Subject: Kickstart-list Digest, Vol 137, Issue 2 In-Reply-To: References: Message-ID: If i do not have my disk partitioning (for the purpose of dynamically calculating swap, note my logic is bit flawed for dynamic calculation, yes i divided it by a hardcoded value, but this was to test if it works) in %pre and have it outside, this works. OS is Redhat 6.6 On Jan 29, 2016, at 9:36 AM, kickstart-list-request at redhat.com wrote: Send Kickstart-list mailing list submissions to kickstart-list at redhat.com 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 at redhat.com You can reach the person managing the list at kickstart-list-owner at redhat.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Kickstart-list digest..." Today's Topics: 1. Re: Kickstart-list Digest, Vol 137, Issue 1 (Abhijit Das) From: Abhijit Das Subject: Re: Kickstart-list Digest, Vol 137, Issue 1 Date: January 29, 2016 at 9:35:50 AM PST To: kickstart-list at redhat.com Reply-To: Discussion list about Kickstart @ Arun - I believe it shouldn?t matter where the %pre is located. However, i have tried and the same error. @ Chris - I appended ?log /tmp/ks-pre.log to %pre but the log file is blank. /ks/anaconda.log tells me that %pre is executed but not .. Here i have modified %pre %pre --log=/tmp/pre-log #!/bin/bash exec < /dev/tty6 > /dev/tty6 2> /dev/tty6 chvt 6 disk=`sfdisk -s | head -1 | awk -F':' '{print $1}'` mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` mem_mb=`expr $mem / 2048` allparts=$( sfdisk -d | grep "/dev/"| grep -v "^#" | cut -d ":" -f1 ) for part in $allparts do dd if=/dev/zero of=$part bs=512 count=16 done cat << EOF > /tmp/disk_partition.sh clearpart --all --drives=$disk part /boot/efi --fstype=efi --grow --maxsize=200 --size=20 part /boot --fstype=ext4 --size=500 part pv.01 --grow --size=1 volgroup VolGroup01 --pesize=4096 pv.01 logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup01 --grow --size=1024 logvol swap --fstype=swap --name=lv_swap --vgname=VolGroup01 ?-size=$mem_mb EOF APIKEY=aea1e3bb412e0e8273340f5e5ec22c33 HOSTNAME=$(hostname) curl -s -o /tmp/deploytoken --data "private_token=${APIKEY}&hostname=${HOSTNAME}&message=preinstall_start" https://1.1.1.1/api/v2/deploy/log/start chvt 1 exec < /dev/tty1 > /dev/tty1 2> /dev/tty1 On Jan 29, 2016, at 9:00 AM, kickstart-list-request at redhat.com wrote: Send Kickstart-list mailing list submissions to kickstart-list at redhat.com 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 at redhat.com You can reach the person managing the list at kickstart-list-owner at redhat.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Kickstart-list digest..." Today's Topics: 1. Dynamic allocation of swap not working. (Abhijit Das) 2. Re: Dynamic allocation of swap not working. (Abhijit Das) 3. Re: Dynamic allocation of swap not working. (Arun SAG) 4. Re: Dynamic allocation of swap not working. (Chris Lumens) From: Abhijit Das Subject: Dynamic allocation of swap not working. Date: January 28, 2016 at 8:34:49 PM PST To: kickstart-list at redhat.com Reply-To: Discussion list about Kickstart Trying to dynamically allocate swap logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024 %include /tmp/swap_partition %pre #!/bin/bash mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` mem_mb=`expr $mem / 1024` echo "logvol swap --name=lv_swap --vgname=VolGroup00 ?-size=$mem_mb" > /tmp/swap_partition It throws an error that /tmp/swap_partition is not found. Please advise how should i proceed. From: Abhijit Das Subject: Re: Dynamic allocation of swap not working. Date: January 28, 2016 at 9:14:56 PM PST To: kickstart-list at redhat.com Reply-To: Discussion list about Kickstart I tried every possible way ? still same error, Here is my command section. clearpart --linux zerombr part /boot/efi --fstype=efi --grow --maxsize=200 --size=20 part /boot --fstype=ext4 --size=500 part pv.008002 --grow --size=1 %include /tmp/disk_partition.cfg Here is my complete %pre section now. %pre mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` mem_mb=`expr $mem / 1024` cat << EOF > /tmp/disk_partition.cfg volgroup VolGroup00 --pesize=4096 pv.008002 logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024 logvol swap --name=lv_swap --vgname=VolGroup00 ?-size=$mem_mb EOF sleep 5 exec < /dev/tty6 > /dev/tty6 2> /dev/tty6 chvt 6 APIKEY=xxxx HOSTNAME=$(hostname) curl -s -o /tmp/deploytoken --data "private_token=${APIKEY}&hostname=${HOSTNAME}&message=preinstall_start" https:// chvt 1 On Jan 28, 2016, at 8:34 PM, Abhijit Das wrote: Trying to dynamically allocate swap logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024 %include /tmp/swap_partition %pre #!/bin/bash mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` mem_mb=`expr $mem / 1024` echo "logvol swap --name=lv_swap --vgname=VolGroup00 ?-size=$mem_mb" > /tmp/swap_partition It throws an error that /tmp/swap_partition is not found. Please advise how should i proceed. From: Arun SAG Subject: Re: Dynamic allocation of swap not working. Date: January 28, 2016 at 9:44:53 PM PST To: Discussion list about Kickstart Reply-To: Discussion list about Kickstart On Thu, Jan 28, 2016 at 09:14:56PM -0800, Abhijit Das wrote: > I tried every possible way ? still same error, > > Here is my command section. > > clearpart --linux > zerombr > > part /boot/efi --fstype=efi --grow --maxsize=200 --size=20 > part /boot --fstype=ext4 --size=500 > part pv.008002 --grow --size=1 > > %include /tmp/disk_partition.cfg > Try moving the %include /tmp/disk_partition.cfg below the %pre section in your kickstart file From: Chris Lumens Subject: Re: Dynamic allocation of swap not working. Date: January 29, 2016 at 8:09:08 AM PST To: kickstart-list at redhat.com Reply-To: Discussion list about Kickstart > Trying to dynamically allocate swap > > logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup00 --grow --size=1024 > %include /tmp/swap_partition > > %pre > #!/bin/bash > mem=`cat /proc/meminfo | grep MemTotal: | sed 's/^.*MemTotal: \(.*\)kB*$/\1/'` > mem_mb=`expr $mem / 1024` > echo "logvol swap --name=lv_swap --vgname=VolGroup00 ???-size=$mem_mb" > /tmp/swap_partition > > It throws an error that /tmp/swap_partition is not found. Please advise how should i proceed. What OS and version? Are there any other errors in your /tmp/anaconda.log or on tty1? - Chris _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steven_Hajducko at intuit.com Fri Jan 29 17:53:37 2016 From: Steven_Hajducko at intuit.com (Hajducko, Steven) Date: Fri, 29 Jan 2016 17:53:37 +0000 Subject: Detecting boot drive Message-ID: Is there a way to consistently detect the boot-drive, across multiple hardware platforms? We have several different hardware types - but it remains consistent that we always want the OS installed on the first drive in boot order. We played around with --on-bios-disk, but that doesn't always work ( it fails, for instance, on Dell R820's with the PERC RAID controller ). We've also tried specifying /dev/disk/by-id/edd-int13_dev80, which works on the Dell's, but fails on VMs. ( And then throw HP and it's cciss into the whole mix.. ). /dev/sda isn't always the boot disk - this happens to us with certain RAID configs like 1 logical drive and 8 JBOD's. The JBOD's get detected as /dev/sda-h and the RAID drive ( which is the boot drive ), ends up as /dev/sdi. Just curious if anyone else has come up with a solid way to always figure out what the boot drive is. -------------- next part -------------- An HTML attachment was scrubbed... URL: