anchor.diff:      #set $drives = ",".join($grub_drives)
   echo "bootloader --location=mbr --driveorder=$drives --append=' biosdevname=0 crashkernel=none'" > /tmp/bootloader.ks
       ##
  +    #######################################
  +    ## Actual custom bootloader installing
  +    #######################################
  +    #set $num = 0
  +    #for $drive in $custom_grub_drives
  +echo "stage2_devnum=\\$((\\$(fdisk -l $drive | grep -E '^\/.+\*' | awk '{print \\$1}' | sed s/[^0-9]//g) - 1))" >> /tmp/post_partition.ks
  +echo "chroot /mnt/sysimage /bin/cp /boot/grub/grub.conf /boot/grub/grub${num}.conf" >> /tmp/post_partition.ks
  +echo "chroot /mnt/sysimage /bin/sed -i -re \"s/\(hd[0-9]+\,[0-9]+\)/\(hd0\,\\${stage2_devnum}\)/g\" /boot/grub/grub${num}.conf"  >> /tmp/post_partition.ks
  +echo "echo -n > /tmp/grub.script" >> /tmp/post_partition.ks
  +echo "echo \"device (hd0) $drive\" >> /tmp/grub.script" >> /tmp/post_partition.ks
  +echo "echo \"root (hd0,\\${stage2_devnum})\" >> /tmp/grub.script" >> /tmp/post_partition.ks
  +echo "echo \"install /grub/stage1 (hd0) /grub/stage2 p /grub/grub${num}.conf\" >> /tmp/grub.script" >> /tmp/post_partition.ks
  +echo "echo quit >> /tmp/grub.script" >> /tmp/post_partition.ks
  +echo "cat /tmp/grub.script | chroot /mnt/sysimage /sbin/grub --batch" >> /tmp/post_partition.ks
  +        #set $num += 1
  +    #end for
  +echo "cp /tmp/post_partition.ks /mnt/sysimage/root/post_partition.ks" >> /tmp/post_partition.ks
   #end if
  
positive.code:     #set $clearpart_drives = []
      #set $physical_volumes = []
      #set $grub_drives = []
      #set $partitions = []
      #set $volume_groups = {}
      #set $raid_volumes = {}
  
negative.code:             #end for
              #set $num_spares = $len($raid_volumes[$raid_mount]) - 2
              #set $md_name = "md%d" % $mdnum
  ##            #if $num_spares > 0
  ##echo "raid $raid_mount --device $md_name --spares=$num_spares --fstype ext2 --level=RAID1 $ks_raids" >> /tmp/partition.ks
  ##            #else
  echo "raid $raid_mount --device $md_name --fstype ext2 --level=RAID1 $ks_raids" >> /tmp/partition.ks
  ##            #end if
          #end if
          #set $mdnum += 1
      #end for
  