Re: [CentOS] kickstart %pre vda/sda troubles
On 03/11/2013 01:18 AM, Natxo Asenjo wrote: > nice examples with bash functions Thanks. I PXE boot the installer and give options about how I want to set up the guest as extra command line arguments. Typically, that means for a KVM server I'd type: centos6 softraid kvm For a KVM guest, I'd use no extra options. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] kickstart %pre vda/sda troubles
On Mon, Mar 11, 2013 at 12:45 AM, Gordon Messmer wrote: > On 03/10/2013 08:14 AM, Natxo Asenjo wrote: >> lets reply to myself then ;-) > > I missed your first message. I've put a copy of my centos 6 kickstart > here in case there are any ideas you think are good ones: > http://pastebin.com/rJEnsdvw nice examples with bash functions ;-) Thanks! -- natxo ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] kickstart %pre vda/sda troubles
On 03/10/2013 08:14 AM, Natxo Asenjo wrote: > lets reply to myself then ;-) I missed your first message. I've put a copy of my centos 6 kickstart here in case there are any ideas you think are good ones: http://pastebin.com/rJEnsdvw ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] kickstart %pre vda/sda troubles
lets reply to myself then ;-) %pre #!/bin/bash if [ -b /dev/vda ] ; then echo "bootloader --location=mbr --timeout=0 --driveorder=vda --append="crashkernel=auto rhgb quiet"" > /tmp/diskinfo echo "clearpart --linux --drives=vda" >> /tmp/diskinfo echo "part /boot --fstype=ext4 --size=500" >> /tmp/diskinfo echo "part pv.008002 --grow --size=1" >> /tmp/diskinfo echo "volgroup vg_host --pesize=4096 pv.008002" >> /tmp/diskinfo echo "logvol / --fstype=ext4 --name=lv_root --vgname=vg_host --grow --size=1024" --recommended >> /tmp/diskinfo echo "logvol swap --name=lv_swap --vgname=vg_host --grow --size=512 --maxsize=1024" >> /tmp/diskinfo elif [ -b /dev/sda ] ; then echo "bootloader --location=mbr --timeout=0 --driveorder=sda --append="crashkernel=auto rhgb quiet"" > /tmp/diskinfo echo "clearpart --linux --drives=sda" >> /tmp/diskinfo echo "part /boot --fstype=ext4 --size=500" >> /tmp/diskinfo echo "part pv.008002 --grow --size=1" >> /tmp/diskinfo echo "volgroup vg_host --pesize=4096 pv.008002" >> /tmp/diskinfo echo "logvol / --fstype=ext4 --name=lv_root --vgname=vg_host --grow --size=1024" --recommended >> /tmp/diskinfo echo "logvol swap --name=lv_swap --vgname=vg_host --grow --size=512 --maxsize=1024" >> /tmp/diskinfo fi %end as seen in http://fedoraproject.org/wiki/Anaconda/Kickstart#Chapter_4._Pre-installation_Script ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] kickstart %pre vda/sda troubles
hi, The problem: for kvm/qemu disks are /dev/vdx devices when using the virtio driver. For vmware, drives are /dev/sdx devices. For hp servers, /dev/ccisss/whatever (sorry, no proliant with an array controller handy to check it). in order to just have one kickstart script to maintain I am trying to use the %pre section but getting a bit stuck. This is what I have: %pre if [ -b /dev/sda ] then zerombr clearpart --all bootloader --location=mbr --timeout=0 --driveorder=sda --append="crashkernel=auto rhgb quiet" part /boot --fstype=ext4 --size=500 part pv.008002 --grow --size=1 volgroup vg_host --pesize=4096 pv.008002 logvol / --fstype=ext4 --name=lv_root --vgname=vg_host --grow --size=1024 --maxsize=51200 logvol swap --name=lv_swap --vgname=vg_host --grow --size=512 --maxsize=1024 fi elif [ -b /dev/vda ] then zerombr clearpart --all bootloader --location=mbr --timeout=0 --driveorder=vda --append="crashkernel=auto rhgb quiet" clearpart --linux --drives=vda part /boot --fstype=ext4 --size=500 --ondisk=vda part pv.008002 --grow --size=1 --ondisk=vda volgroup vg_host --pesize=4096 pv.008002 logvol / --fstype=ext4 --name=lv_root --vgname=vg_host --grow --size=1024 --recommended logvol swap --name=lv_swap --vgname=vg_host --grow --size=512 --maxsize=1024 fi else echo unknown disk fi But when kickstarting a guest on a kvm host, I get this error: the kickstart configuration file is missing required information that anaconda cannot promtp for. Please add the following sections and try again: Bootloader configuration. If I swith to another virtual terminal, I see this: Device vda not found. But it's there, I can see it with ls -l, it is a block device Has anybody implemented something like this and is willing to share it? TIA, -- Groeten, natxo ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos