Index: /branches/rel_avx_2_7_5_caswell_5070/avx_cli.spec
===================================================================
--- /branches/rel_avx_2_7_5_caswell_5070/avx_cli.spec	(revision 9158)
+++ /branches/rel_avx_2_7_5_caswell_5070/avx_cli.spec	(working copy)
@@ -199,6 +199,7 @@
 install -Dm 0644 conf/system/grub.cfg.2U_cmcc_3.nohpg %{buildroot}/ca/conf/system/grub.cfg.2U_cmcc_3.nohpg
 install -Dm 0644 conf/system/grub.cfg.4T %{buildroot}/ca/conf/system/grub.cfg.4T
 install -Dm 0644 conf/system/grub.cfg.2U.nohpg %{buildroot}/ca/conf/system/grub.cfg.2U.nohpg
+install -Dm 0644 conf/system/grub.cfg.2U_UEFI %{buildroot}/ca/conf/system/grub.cfg.2U_UEFI
 install -Dm 0644 conf/ha/avxha.info %{buildroot}/ca/conf/ha/avxha.info
 install -Dm 0644 conf/ha/avxha.info %{buildroot}/ca/conf/ha/avxha.info.sample
 install -Dm 0644 conf/ha/keepalived.conf %{buildroot}/ca/conf/ha/keepalived.conf.sample
Index: /branches/rel_avx_2_7_5_caswell_5070/conf/system/grub.cfg.2U_UEFI
===================================================================
--- /branches/rel_avx_2_7_5_caswell_5070/conf/system/grub.cfg.2U_UEFI	(revision 0)
+++ /branches/rel_avx_2_7_5_caswell_5070/conf/system/grub.cfg.2U_UEFI	(working copy)
@@ -0,0 +1,146 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="1"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=10
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=10
+fi
+
+serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1
+terminal_output console serial
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+
+######## AVX Dual system failover ###########
+if [ ${avx_bootcount} == 0 ]; then
+        set avx_bootcount=1
+elif [ ${avx_bootcount} == 1 ]; then
+        set avx_bootcount=2
+elif [ ${avx_bootcount} == 2 ]; then
+        set avx_bootcount=3
+else
+        set avx_bootcount=0
+        if [ ${avx_menuent} == 0 ]; then
+                set avx_menuent=1
+        else
+                set avx_menuent=0
+        fi
+fi
+save_env avx_menuent
+save_env avx_bootcount
+
+if [ ${avx_menuent} == 0 ]; then
+set default="0"
+else
+set default="1"
+fi
+
+################## end ######################
+menuentry 'AVXM' --class centos --class gnu-linux --class gnu --class os --unrestricted {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_gpt
+	insmod ext2
+	set root='hd0,gpt3'
+	search --no-floppy --fs-uuid --set=root $UUID_SDA3
+	linuxefi /vmlinuz root=UUID=$UUID_SDA3 ro crashkernel=auto arraykicker nomodeset xdriver=vesa brokenmodules=ast rhgb quiet LANG=en_US.UTF-8 console=tty0 console=ttyS0,9600n8 iommu=pt intel_iommu=on hugepagesz=$avx_hgpgsz hugepages=$avx_hgpgs intel_pstate=disable pcie_acs_override=downstream loglevel=3 modprobe.blacklist=ast
+  initrdefi /initramfs.img
+}
+menuentry 'AVXS' --class centos --class gnu-linux --class gnu --class os --unrestricted {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_gpt
+	insmod ext2
+	set root='hd0,gpt5'
+	search --no-floppy --fs-uuid --set=root $UUID_SDA5
+	linuxefi /vmlinuz root=UUID=$UUID_SDA5 ro crashkernel=auto arraykicker nomodeset xdriver=vesa brokenmodules=ast rhgb quiet LANG=en_US.UTF-8 console=tty0 console=ttyS0,9600n8 iommu=pt intel_iommu=on hugepagesz=$avx_hgpgsz hugepages=$avx_hgpgs intel_pstate=disable pcie_acs_override=downstream loglevel=3 modprobe.blacklist=ast
+  initrdefi /initramfs.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
Index: /branches/rel_avx_2_7_5_caswell_5070/installable_utils/init_host.sh
===================================================================
--- /branches/rel_avx_2_7_5_caswell_5070/installable_utils/init_host.sh	(revision 9158)
+++ /branches/rel_avx_2_7_5_caswell_5070/installable_utils/init_host.sh	(working copy)
@@ -383,6 +383,8 @@
 echo $AVX_PRODUCT_ID > /var/array/public/config/arrayid
 echo $AVX_MODEL_ID > /var/array/public/config/arraymodel
 echo $MGMT_PORT > /var/array/public/config/mgmtport
+/usr/bin/grub2-editenv $GRUBENV_PATH set avx_bootcount=0
+/usr/bin/grub2-editenv $GRUBENV_PATH set avx_menuent=0
 sed -i "s/avx_hgpgsz=.*/avx_hgpgsz=2M/g" $GRUBENV_PATH
 sed -i "s/avx_hgpgs=.*/avx_hgpgs=$HUGEPAGES/g" $GRUBENV_PATH
 # disable useless service
Index: /branches/rel_avx_2_7_5_caswell_5070/scripts/avxapps_upgrade.sh
===================================================================
--- /branches/rel_avx_2_7_5_caswell_5070/scripts/avxapps_upgrade.sh	(revision 9158)
+++ /branches/rel_avx_2_7_5_caswell_5070/scripts/avxapps_upgrade.sh	(working copy)
@@ -127,6 +127,12 @@
         if [ $mtpt == "sda3sda5" ] || [ $mtpt == "sda5sda3" ]; then
             if [ "x${model}" == "x952800" ]; then
                 install -m 0644 /caupgrade/ca/conf/system/grub.cfg.2U.nohpg $GRUB_CFG_PATH
+            elif [ "x${model}" == "x957902" ] || [ "x${model}" == "x959902" ]; then
+                UUID_SDA3=$(blkid -s UUID -o value /dev/sda3)
+                UUID_SDA5=$(blkid -s UUID -o value /dev/sda5)
+                install -m 0644 /caupgrade/ca/conf/system/grub.cfg.2U_UEFI $GRUB_CFG_PATH
+                sed -i "s/\$UUID_SDA3/$UUID_SDA3/g" $GRUB_CFG_PATH
+                sed -i "s/\$UUID_SDA5/$UUID_SDA5/g" $GRUB_CFG_PATH
             else
                 install -m 0644 /caupgrade/ca/conf/system/grub.cfg.2U $GRUB_CFG_PATH
             fi
