Index: /branches/rel_apv_10_7/GNUmakefile
===================================================================
--- /branches/rel_apv_10_7/GNUmakefile	(revision 40011)
+++ /branches/rel_apv_10_7/GNUmakefile	(working copy)
@@ -425,3 +425,11 @@
 	echo -e "Console-type: VNC" >> metadata.ini
 	echo -e "Image-md5value: $(shell /usr/bin/md5sum ${REL}.${IMAGE_TYPE} | /usr/bin/awk '{print $$1}') " >> metadata.ini
 	tar czvf ${REL}.${IMAGE_TYPE}.tar.gz ${REL}.${IMAGE_TYPE} metadata.ini
+
+build_iso:
+	cd tools/install_iso_creator && make all
+	mv tools/install_iso_creator/install_APV_10_7.iso ./
+
+clean_iso:
+	cd tools/install_iso_creator && make clean
+	rm -f install_APV_10_7.iso
\ No newline at end of file
Index: /branches/rel_apv_10_7/tools/install_iso_creator/Makefile
===================================================================
--- /branches/rel_apv_10_7/tools/install_iso_creator/Makefile	(revision 0)
+++ /branches/rel_apv_10_7/tools/install_iso_creator/Makefile	(working copy)
@@ -0,0 +1,181 @@
+# Define variables
+ROOT_DIR := ../..
+
+ISO_NAME     := install_APV_10_7.iso
+BASE_ISO     := Rocky-9.5-x86_64-minimal.iso
+MOUNT_DIR    := ./iso_mount
+BUILD_DIR    := ./rocky_liveCD
+LABEL        := Rocky-9-5-x86_64-dvd
+
+APV_KS_FILE  := apv_deploy.ks
+CENTOS_BOOT  := centos_boot.tar.gz
+
+PEM_FILE     := click_pub_cert.pem
+APV_PEM_FILE := $(ROOT_DIR)/usr/click/tools/$(PEM_FILE)
+
+ORGINAL_SIGN_UNPACK_DIR:= ./sign_unpack
+SIGN_UNPACK_FILE        := sign_unpack
+SIGN_UNPACK  := $(ORGINAL_SIGN_UNPACK_DIR)/$(SIGN_UNPACK_FILE)
+
+UEFI_GRUB    := grub.cfg
+UEFI_GRUB_DIR:= $(BUILD_DIR)/EFI/BOOT/
+
+# Directories for APV assets
+ARRAY_DIR    := $(BUILD_DIR)/Array
+SIGN_DIR     := $(ARRAY_DIR)/sign_unpack
+
+# Repository URLs
+REPO_URL := http://192.168.100.11/everything
+REPO_FILE := /etc/yum.repos.d/internal_temp.repo
+
+# Default target
+all: build_iso
+
+## 1. Prepare environment
+prepare:
+	@echo "Creating directories..."
+	mkdir -p $(MOUNT_DIR)
+	mkdir -p $(BUILD_DIR)
+	mkdir -p $(SIGN_DIR)
+
+## 2. Extract ISO contents (requires sudo to mount)
+extract: prepare
+	@if [ ! -f $(BASE_ISO) ]; then \
+		wget http://192.168.100.11/install_iso_creator_apv_avx/$(BASE_ISO); \
+		if [ ! -f $(BASE_ISO) ]; then \
+			wget https://download.rockylinux.org/pub/rocky/9/isos/x86_64/$(BASE_ISO); \
+		fi; \
+		if [ ! -f $(BASE_ISO) ]; then \
+			echo "Error: $(BASE_ISO) not found!"; \
+			exit 1; \
+		fi; \
+	fi
+
+	@if [ -d "$(BUILD_DIR)" ] && [ -f "$(BUILD_DIR)/isolinux/isolinux.bin" ]; then \
+		echo "Directory $(BUILD_DIR) already exists and is not empty. Skipping extract."; \
+	else \
+		echo "Mounting and copying ISO contents..."; \
+		mount -o loop $(BASE_ISO) $(MOUNT_DIR); \
+		cp -r $(MOUNT_DIR)/. $(BUILD_DIR)/; \
+		umount $(MOUNT_DIR); \
+		chmod -R 755 $(BUILD_DIR); \
+	fi
+
+## 3. Compile and inject files (this part requires manual placement of source code)
+# Assuming you have placed sign_unpack.c in the current directory
+inject: extract
+	@echo "Injecting APV 10.7 assets..."
+	# Copy Kickstart and Array images
+	cp -f $(APV_KS_FILE) $(ARRAY_DIR)/
+	cp -f $(CENTOS_BOOT) $(ARRAY_DIR)/
+	cp -f $(ROOT_DIR)/*.array $(ARRAY_DIR)/
+
+	cp -f $(APV_PEM_FILE) $(SIGN_DIR)/
+	cp -f $(SIGN_UNPACK) $(SIGN_DIR)/
+
+	cp -f $(UEFI_GRUB) $(UEFI_GRUB_DIR)/
+
+check_files: inject
+	@if [ ! -f $(ARRAY_DIR)/$(APV_KS_FILE) ]; then \
+		echo "Error: Kickstart file $(APV_KS_FILE) not found in $(ARRAY_DIR)!"; \
+		exit 1; \
+	fi
+
+	@if [ ! -f $(ARRAY_DIR)/$(CENTOS_BOOT) ]; then \
+		echo "Error: Boot image $(CENTOS_BOOT) not found in $(ARRAY_DIR)!"; \
+		exit 1; \
+	fi
+
+	@if [ $$(ls $(ARRAY_DIR)/*.array 2>/dev/null | wc -l) -eq 0 ]; then \
+		echo "Error: No .array files found in $(ARRAY_DIR)!"; \
+		exit 1; \
+	fi
+
+	@if [ ! -f $(SIGN_DIR)/$(PEM_FILE) ]; then \
+		echo "Error: PEM file $(PEM_FILE) not found in $(SIGN_DIR)!"; \
+		exit 1; \
+	fi
+
+	@if [ ! -f $(SIGN_DIR)/$(SIGN_UNPACK_FILE) ]; then \
+		echo "Error: sign_unpack binary not found in $(SIGN_DIR)!"; \
+		exit 1; \
+	fi
+
+	@if [ ! -f $(UEFI_GRUB_DIR)/$(UEFI_GRUB) ]; then \
+		echo "Error: UEFI grub.cfg not found in $(UEFI_GRUB_DIR)!"; \
+		exit 1; \
+	fi
+
+install_deps:
+	@if ! which mkisofs > /dev/null 2>&1; then \
+		echo "mkisofs not found. Setting up temporary repo..."; \
+		bash -c 'echo -e "[internal-temp]\nname=Internal Temp Repo\nbaseurl=$(REPO_URL)\nenabled=1\ngpgcheck=0" > $(REPO_FILE)'; \
+		yum clean expire-cache; \
+		yum install -y genisoimage; \
+		rm -f $(REPO_FILE); \
+	fi
+
+	@if ! which isohybrid > /dev/null 2>&1; then \
+		echo "isohybrid not found. Setting up temporary repo..."; \
+		bash -c 'echo -e "[internal-temp]\nname=Internal Temp Repo\nbaseurl=$(REPO_URL)\nenabled=1\ngpgcheck=0" > $(REPO_FILE)'; \
+		yum clean expire-cache; \
+		yum install -y syslinux; \
+		rm -f $(REPO_FILE); \
+	fi
+
+## 4. Build ISO
+build_iso: check_files install_deps
+	@echo "Generating bootable UEFI ISO..."
+
+# CentOS 7 is using genisoimage
+	mkisofs -o ./$(ISO_NAME) \
+		-v -R -J -T \
+		-cache-inodes \
+		-joliet-long \
+		-b isolinux/isolinux.bin \
+		-c isolinux/boot.cat \
+		-no-emul-boot \
+		-boot-load-size 4 \
+		-boot-info-table \
+		-eltorito-alt-boot \
+		-e images/efiboot.img \
+		-no-emul-boot \
+		-V '$(LABEL)' \
+		$(BUILD_DIR)/
+
+# for RockyLinux 9
+# 	mkisofs -o ./$(ISO_NAME) \
+# 		-b isolinux/isolinux.bin \
+# 		-c isolinux/boot.cat \
+# 		-no-emul-boot \
+# 		-boot-load-size 4 \
+# 		-boot-info-table \
+# 		-eltorito-alt-boot \
+# 		-e images/efiboot.img \
+# 		-no-emul-boot \
+# 		-isohybrid-gpt-basdat \
+# 		-V '$(LABEL)' \
+# 		-R -J -v -T $(BUILD_DIR)/
+
+	@if [ $$? -ne 0 ]; then \
+		echo "Error: ISO creation failed!"; \
+		exit 1; \
+	fi
+
+# Make the ISO hybrid (bootable on both BIOS and UEFI)
+# For CentOS 7, isohybrid is part of syslinux package
+	isohybrid --uefi ./$(ISO_NAME)
+	@if [ $$? -ne 0 ]; then \
+		echo "Error: isohybrid failed!"; \
+		exit 1; \
+	fi
+
+	@echo "Done! Output: $(ISO_NAME)"
+
+## 5. Clean environment
+clean:
+	@echo "Cleaning up..."
+	umount $(MOUNT_DIR) 2>/dev/null || true
+	rm -rf $(MOUNT_DIR) $(BUILD_DIR) $(REPO_FILE) $(ISO_NAME) $(BASE_ISO)
+
+.PHONY: all prepare extract inject build_iso clean check_files install_deps
\ No newline at end of file
Index: /branches/rel_apv_10_7/tools/install_iso_creator/README.md
===================================================================
--- /branches/rel_apv_10_7/tools/install_iso_creator/README.md	(revision 0)
+++ /branches/rel_apv_10_7/tools/install_iso_creator/README.md	(working copy)
@@ -0,0 +1,74 @@
+# Install iso creator
+
+Created UEFI disk for APV by modifying the RockyLinux 9.5 LiveCD to install APV 10.7.
+
+1. Download the base ISO: **Rocky-9.5-x86_64-minimal.iso**  
+Since the CentOS 7 LiveCD does not support EFI boot, Rocky Linux 9 is used as the base instead.
+    - [RockyLinux official](https://dl.rockylinux.org/vault/rocky/9.5/isos/x86_64/Rocky-9.5-x86_64-minimal.iso)
+    - [ArrayNetworks repo server](http://192.168.100.11/install_iso_creator_apv_avx/Rocky-9.5-x86_64-minimal.iso)
+
+2. Extract the contents  
+```
+mkdir iso_mount
+mkdir rocky_liveCD
+mount Rocky-9.5-x86_64-minimal.iso ./iso_mount/
+cp -r ./iso_mount/. ./rocky_liveCD/
+umount ./iso_mount/
+```
+
+3. Add file
+    - create folder in `./rocky_liveCD/Array`
+        - `apv_deploy.ks`
+        - `*.array`  
+        This `*.array` must be the version modified to support `UEFI`. The previous version cannot be used.
+        - `centos_boot.tar.gz`  
+        Use `CentOS-7-x86_64-LiveGNOME-1511.iso` to install UEFI CentOS 7, and copy the `/boot` directory from it.
+            - [CentOS official](https://buildlogs.centos.org/rolling/7/isos/x86_64/CentOS-7-x86_64-LiveGNOME-1511.iso)
+            - [ArrayNetworks repo server](http://192.168.100.11/install_iso_creator_apv_avx/CentOS-7-x86_64-LiveGNOME-1511.iso)
+    - create folder in `./rocky_liveCD/Array/sign_unpack`
+        - copy `click_pub_cert.pem` from `usr/click/tools/click_pub_cert.pem`
+        - compile `sign_unpack` from `usr\click\bin\sign_unpack` in `RockyLinux 9.5`  
+        Since the LiveCD environment is `RockyLinux 9.5`, the `sign_unpack.c` from the APV 10.7 project needs to be brought into `RockyLinux 9.5` for compilation.
+
+4. Modify `./rocky_liveCD/EFI/BOOT/grub.cfg`
+
+5. Rebuild the ISO  
+The -V \<Label\> should not be modified arbitrarily; it must match other configuration files.
+    - RockyLinux 9.5  
+    ```
+    mkisofs -o ./install_APV_10_7.iso \
+    -b isolinux/isolinux.bin \
+    -c isolinux/boot.cat \
+    -no-emul-boot \
+    -boot-load-size 4 \
+    -boot-info-table \
+    -eltorito-alt-boot \
+    -e images/efiboot.img \
+    -no-emul-boot \
+    -isohybrid-gpt-basdat \
+    -V 'Rocky-9-5-x86_64-dvd' \
+    -R -J -v -T ./rocky_liveCD/
+    ```
+    - CentOS 7  
+    ```
+    mkisofs -o ./install_APV_10_7.iso \
+		-v -R -J -T \
+		-cache-inodes \
+		-joliet-long \
+		-b isolinux/isolinux.bin \
+		-c isolinux/boot.cat \
+		-no-emul-boot \
+		-boot-load-size 4 \
+		-boot-info-table \
+		-eltorito-alt-boot \
+		-e images/efiboot.img \
+		-no-emul-boot \
+		-V 'Rocky-9-5-x86_64-dvd' \
+		./rocky_liveCD/
+
+    isohybrid --uefi ./install_APV_10_7.iso
+    ```
+
+6. Create the installation USB drive.
+    - Use [Rufus](https://rufus.ie/zh_TW/) in Windows
+    - Use `dd` in Linux
\ No newline at end of file
Index: /branches/rel_apv_10_7/tools/install_iso_creator/apv_deploy.ks
===================================================================
--- /branches/rel_apv_10_7/tools/install_iso_creator/apv_deploy.ks	(revision 0)
+++ /branches/rel_apv_10_7/tools/install_iso_creator/apv_deploy.ks	(working copy)
@@ -0,0 +1,343 @@
+# Install using text interface
+text
+
+# Language settings
+keyboard --vckeymap=us --xlayouts='us'
+lang en_US.UTF-8
+eula --agreed
+timezone US/Eastern
+
+# Do not configure the X Window System
+skipx
+
+# Automatically shut down after installation is complete
+poweroff
+
+# Because we need to specify the partition order,
+# we are not using Kickstart's built-in partitioning commands to initialize the disk.
+# # Use GPT partitioning + specify the target disk vda for kvm, sda for other
+# ignoredisk --only-use=sda
+# zerombr
+# clearpart --all --initlabel
+
+# using this pre instead of regular partitioning to preserve the order of the partitions
+%pre
+
+# output to main screen
+LOG_FILE="/tmp/ks-pre-debug.log"
+touch $LOG_FILE
+
+print_msg() {
+  while IFS= read -r line; do
+    echo -e "${line}\r" > /dev/tty1
+    echo "${line}" >> $LOG_FILE
+  done
+}
+
+echo "Waiting for disk to be ready..." | print_msg
+udevadm trigger --action=add
+udevadm settle
+
+DISK_BASE=""
+DEV_PATH=""
+DEV_PATHS=()
+PART_NUMS=(0 1 2 3 4 5 6 7 8)
+
+echo "Start to find disk..." | print_msg
+if grep -qw 'arrayraid' /proc/cmdline; then
+  MDSTAT="/proc/mdstat"
+  echo "cat $MDSTAT" | print_msg
+  cat "$MDSTAT" 2>&1 | print_msg
+  echo "lsblk -f" | print_msg
+  lsblk -f 2>&1 | print_msg
+
+  TIMEOUT=60
+  while [[ $TIMEOUT -gt 0 ]]; do
+    while read -r line; do
+      if [[ $line =~ ^(md[0-9]+)[[:space:]]*:[[:space:]]*active[[:space:]]+raid ]]; then
+        DISK_BASE="${BASH_REMATCH[1]}"
+        DEV_PATH="/dev/$DISK_BASE"
+        break 2
+      fi
+    done < "$MDSTAT"
+
+    sleep 1
+    ((TIMEOUT--))
+  done
+
+  if [[ -z "$DISK_BASE" ]]; then
+    echo "raid disk still not found after waiting." | print_msg
+    echo "cat $MDSTAT" | print_msg
+    cat "$MDSTAT" 2>&1 | print_msg
+    exit 1
+  fi
+
+  PART_NUMS=(p0 p1 p2 p3 p4 p5 p6 p7 p8)
+else
+  if [ ! -b /dev/sda ]; then
+    echo "/dev/sda still not found after waiting." | print_msg
+    echo "lsblk -f" | print_msg
+    lsblk -f 2>&1 | print_msg
+    exit 1
+  fi
+
+  DISK_BASE="sda"
+  DEV_PATH="/dev/$DISK_BASE"
+fi
+
+for p in "${PART_NUMS[@]}"; do
+  DEV_PATHS+=("${DEV_PATH}${p}")
+done
+
+# create partitions
+echo "Start to create partitions..." | print_msg
+size=$(lsblk -bd -o NAME,SIZE | grep "^sda" | awk '{print $2}')
+num_size=$((size/1024/1024/1024))
+
+ROOT_SIZE="+12G"
+SWAP_SIZE="+6G"
+if [ "$num_size" -lt 800 ]; then
+  ROOT_SIZE="+12G"
+  SWAP_SIZE="+6G"
+else
+  ROOT_SIZE="+32G"
+  SWAP_SIZE="+64G"
+fi
+
+vgchange -an
+wipefs -af "$DEV_PATH"
+sgdisk -og "$DEV_PATH"
+sgdisk -n 1:0:+200M -t 1:ef00 -c 1:"efi" "$DEV_PATH"
+sgdisk -n 2:0:+200M -t 2:8300 -c 2:"boot" "$DEV_PATH"
+sgdisk -n 3:0:$SWAP_SIZE   -t 3:8200 -c 3:"swap" "$DEV_PATH"
+sgdisk -n 4:0:+1M   -t 4:8300 -c 4:"dummy1" "$DEV_PATH"
+sgdisk -n 5:0:+1M   -t 5:8300 -c 5:"dummy2" "$DEV_PATH"
+sgdisk -n 6:0:$ROOT_SIZE  -t 6:8300 -c 6:"root" "$DEV_PATH"
+sgdisk -n 7:0:$ROOT_SIZE  -t 7:8300 -c 7:"caupgrade" "$DEV_PATH"
+sgdisk -n 8:0:0     -t 8:8300 -c 8:"var" "$DEV_PATH"
+
+mkfs.vfat -F32 -n EFI "${DEV_PATHS[1]}"
+mkfs.ext4 -F -O ^metadata_csum -L boot "${DEV_PATHS[2]}"
+mkswap -f -L swap "${DEV_PATHS[3]}"
+mkfs.xfs -f -m crc=0 -L root "${DEV_PATHS[6]}"
+mkfs.xfs -f -m crc=0 -L caupgrade "${DEV_PATHS[7]}"
+mkfs.xfs -f -m crc=0 -L var "${DEV_PATHS[8]}"
+
+parted "$DEV_PATH" set 1 boot on
+parted "$DEV_PATH" set 1 esp on
+
+##################################################
+
+ARRAY_PATH="/run/install/repo/Array"
+SIGN_UNPACK_PATH="$ARRAY_PATH/sign_unpack"
+VAR_PATH="/mnt/var"
+ROOT_PATH="/mnt/root"
+BOOT_PATH="/mnt/boot"
+EFI_PATH="$BOOT_PATH/efi"
+
+#################### Get *.tar.gz ####################
+# Due to space limitations, the *.array file is copied to /var.
+# It is then extracted to obtain apv.tar.gz.
+echo "Start to get *.tar.gz from *.array..." | print_msg
+mkdir -p "$VAR_PATH"
+mount "${DEV_PATHS[8]}" "$VAR_PATH"
+
+if [ ! -f "$SIGN_UNPACK_PATH/sign_unpack" ]; then
+  echo "Not found $SIGN_UNPACK_PATH/sign_unpack file..." | print_msg
+  exit 1
+fi
+cp "$SIGN_UNPACK_PATH/sign_unpack" "$VAR_PATH/"
+chmod +x "$VAR_PATH/sign_unpack"
+
+if [ ! -f "$SIGN_UNPACK_PATH/click_pub_cert.pem" ]; then
+  echo "Not found $SIGN_UNPACK_PATH/click_pub_cert.pem file..." | print_msg
+  exit 1
+fi
+cp "$SIGN_UNPACK_PATH/click_pub_cert.pem" "$VAR_PATH/"
+
+file=$(find "$ARRAY_PATH" -maxdepth 1 -name "*.array" | sort | head -n 1 | xargs basename)
+if [ -n "$file" ]; then
+  cp "$ARRAY_PATH/$file" "$VAR_PATH/"
+else
+  echo "Not found *.array file..." | print_msg
+  exit 1
+fi
+
+"$VAR_PATH/sign_unpack" -i "$VAR_PATH/$file" -o "$VAR_PATH/apv.tar.gz"  -c "$VAR_PATH/click_pub_cert.pem"
+if [ ! -f "$VAR_PATH/apv.tar.gz" ]; then
+  echo "Not found $VAR_PATH/apv.tar.gz file..." | print_msg
+  exit 1
+fi
+#################### End ####################
+
+#################### Install to LABEL=root ####################
+echo "Start to install to LABEL=root..." | print_msg
+mkdir -p "$ROOT_PATH"
+mount "${DEV_PATHS[6]}" "$ROOT_PATH"
+tar -xzvf "$VAR_PATH/apv.tar.gz" -C "$ROOT_PATH/"
+
+cp -f "$ROOT_PATH/ca/ssl/bin/root-cas.crt" "$ROOT_PATH/ca/ssl/vhost/"
+
+echo 'LABEL=root       /              xfs     defaults        0 0' >  "$ROOT_PATH/etc/fstab"
+echo 'LABEL=boot       /boot          ext4    defaults        1 2' >> "$ROOT_PATH/etc/fstab"
+echo 'LABEL=caupgrade  /caupgrade     xfs     defaults        0 0' >> "$ROOT_PATH/etc/fstab"
+echo 'LABEL=swap       swap           swap    defaults        0 0' >> "$ROOT_PATH/etc/fstab"
+echo 'LABEL=var        /var           xfs     defaults        0 0' >> "$ROOT_PATH/etc/fstab"
+echo 'LABEL=EFI        /boot/efi      vfat    umask=0077,shortname=winnt  0 2' >> "$ROOT_PATH/etc/fstab"
+
+echo "SELINUX=disabled" > "$ROOT_PATH/etc/selinux/config"
+echo "SELINUXTYPE=targeted" >> "$ROOT_PATH/etc/selinux/config"
+echo "AN" > "$ROOT_PATH/etc/hostname"
+#################### End ####################
+
+#################### Install to LABEL=caupgrade ####################
+echo "Start to install to LABEL=caupgrade..." | print_msg
+umount "$ROOT_PATH"
+mount "${DEV_PATHS[7]}" "$ROOT_PATH"
+tar -xzvf "$VAR_PATH/apv.tar.gz" -C "$ROOT_PATH/"
+
+cp -f "$ROOT_PATH/ca/ssl/bin/root-cas.crt" "$ROOT_PATH/ca/ssl/vhost/"
+
+echo 'LABEL=caupgrade  /              xfs     defaults        0 0' >  "$ROOT_PATH/etc/fstab"
+echo 'LABEL=boot       /boot          ext4    defaults        1 2' >> "$ROOT_PATH/etc/fstab"
+echo 'LABEL=root       /caupgrade     xfs     defaults        0 0' >> "$ROOT_PATH/etc/fstab"
+echo 'LABEL=swap       swap           swap    defaults        0 0' >> "$ROOT_PATH/etc/fstab"
+echo 'LABEL=var        /var           xfs     defaults        0 0' >> "$ROOT_PATH/etc/fstab"
+echo 'LABEL=EFI        /boot/efi      vfat    umask=0077,shortname=winnt  0 2' >> "$ROOT_PATH/etc/fstab"
+
+echo "SELINUX=disabled" > "$ROOT_PATH/etc/selinux/config"
+echo "SELINUXTYPE=targeted" >> "$ROOT_PATH/etc/selinux/config"
+echo "AN" > "$ROOT_PATH/etc/hostname"
+#################### End ####################
+
+#################### Copy CentOS7 boot ####################
+echo "Start to copy CentOS7 boot to LABEL=boot..." | print_msg
+mkdir -p "$BOOT_PATH"
+mount "${DEV_PATHS[2]}" "$BOOT_PATH"
+mount "${DEV_PATHS[1]}" "$EFI_PATH"
+
+shopt -s dotglob
+
+rm -rf "$EFI_PATH"/*
+umount "$EFI_PATH"
+rm -rf "$BOOT_PATH"/*
+mkdir -p "$EFI_PATH"
+mount "${DEV_PATHS[1]}" "$EFI_PATH"
+
+shopt -u dotglob
+
+if [ ! -f "$ARRAY_PATH/centos_boot.tar.gz" ]; then
+  echo "Not found $ARRAY_PATH/centos_boot.tar.gz file..." | print_msg
+  exit 1
+fi
+tar -xzvf "$ARRAY_PATH/centos_boot.tar.gz" -C "$BOOT_PATH/" --strip-components=1
+
+cp -f "$ROOT_PATH/ca/etc/loader.conf" "$BOOT_PATH/"
+CMDLINE=$(cat /proc/cmdline)
+ARRAYMODEL=$(echo $CMDLINE | sed -n 's/.*arraymodel=\([^ ]*\).*/\1/p')
+if [ -n "$ARRAYMODEL" ]; then
+  sed -i "s/^array_id=.*/array_id=${ARRAYMODEL}/" "$BOOT_PATH/loader.conf"
+fi
+#################### End ####################
+
+#################### Modify /boot/efi/EFI/centos/grub.cfg ####################
+echo "Start to write /boot/efi/EFI/centos/grub.cfg..." | print_msg
+UUID_SDA6=$(blkid -s UUID -o value "${DEV_PATHS[6]}")
+UUID_SDA7=$(blkid -s UUID -o value "${DEV_PATHS[7]}")
+
+read -r -d '' DUAL_SYSTEM_BLOCK <<'EOF'
+######## BEGIN 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 AVX Dual system failover ###
+EOF
+
+read -r -d '' BOOT_OPTION <<EOF
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'ustack_master' --class centos --class gnu-linux --class gnu --class os --unrestricted {
+        load_video
+        set gfxpayload=keep
+        insmod gzio
+        insmod part_gpt
+        insmod ext2
+        insmod diskfilter
+        insmod mdraid1x
+        insmod xfs
+
+        set root='hd0,gpt6'
+        search --no-floppy --fs-uuid --set=root $UUID_SDA6
+        linuxefi /vmlinuz root=LABEL=root ro crashkernel=auto arraykicker rhgb quiet LANG=en_US.UTF-8 console=tty0 console=ttyS0,9600n8 iommu=pt intel_iommu=on hugepagesz=\$hugepagesz hugepages=\$hugepages pcie_acs_override=downstream loglevel=3 modprobe.blacklist=ast rd.auto=1 fsck.mode=force fsck.repair=yes
+        initrdefi /initramfs-array.img
+}
+menuentry 'ustack_slave1' --class centos --class gnu-linux --class gnu --class os --unrestricted {
+        load_video
+        set gfxpayload=keep
+        insmod gzio
+        insmod part_gpt
+        insmod ext2
+        insmod diskfilter
+        insmod mdraid1x
+        insmod xfs
+
+        set root='hd0,gpt7'
+        search --no-floppy --fs-uuid --set=root $UUID_SDA7
+        linuxefi /vmlinuz root=LABEL=caupgrade ro crashkernel=auto arraykicker rhgb quiet LANG=en_US.UTF-8 console=tty0 console=ttyS0,9600n8 iommu=pt intel_iommu=on hugepagesz=\$hugepagesz hugepages=\$hugepages pcie_acs_override=downstream loglevel=3 modprobe.blacklist=ast rd.auto=1 fsck.mode=force fsck.repair=yes
+        initrdefi /initramfs-array.img
+}
+### END /etc/grub.d/10_linux ###
+EOF
+
+tmpfile=$(mktemp)
+{
+  echo "$DUAL_SYSTEM_BLOCK"
+  echo ""
+  echo "$BOOT_OPTION"
+} > "$tmpfile"
+
+PLACEHOLDER="__ARRAY_NETWORKS_PLACEHOLDER__"
+
+sed -i "/^### BEGIN \/etc\/grub.d\/10_linux ###/,/^### END \/etc\/grub.d\/10_linux ###$/c\\
+$PLACEHOLDER
+" "$EFI_PATH/EFI/centos/grub.cfg"
+
+sed -i "/^$PLACEHOLDER\$/{
+    r $tmpfile
+    d
+}" "$EFI_PATH/EFI/centos/grub.cfg"
+
+rm -f "$tmpfile"
+
+sed -i '/^saved_entry=/d' "$EFI_PATH/EFI/centos/grubenv"
+#################### End ####################
+
+#################### Clear /var ####################
+find "$VAR_PATH" -mindepth 1 -delete
+#################### End ####################
+
+umount "$EFI_PATH"
+umount "$BOOT_PATH"
+umount "$ROOT_PATH"
+umount "$VAR_PATH"
+
+reboot
+%end
Index: /branches/rel_apv_10_7/tools/install_iso_creator/centos_boot.tar.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/x-gzip
Index: /branches/rel_apv_10_7/tools/install_iso_creator/centos_boot.tar.gz
===================================================================
--- /branches/rel_apv_10_7/tools/install_iso_creator/centos_boot.tar.gz	(revision 40011)
+++ /branches/rel_apv_10_7/tools/install_iso_creator/centos_boot.tar.gz	(working copy)

Property changes on: tools/install_iso_creator/centos_boot.tar.gz
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/x-gzip
\ No newline at end of property
Index: /branches/rel_apv_10_7/tools/install_iso_creator/grub.cfg
===================================================================
--- /branches/rel_apv_10_7/tools/install_iso_creator/grub.cfg	(revision 0)
+++ /branches/rel_apv_10_7/tools/install_iso_creator/grub.cfg	(working copy)
@@ -0,0 +1,40 @@
+set default="1"
+
+function load_video {
+  insmod efi_gop
+  insmod efi_uga
+  insmod video_bochs
+  insmod video_cirrus
+  insmod all_video
+}
+
+load_video
+set gfxpayload=keep
+insmod gzio
+insmod part_gpt
+insmod ext2
+
+set timeout=60
+### END /etc/grub.d/00_header ###
+
+search --no-floppy --set=root -l 'Rocky-9-5-x86_64-dvd'
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Install Rocky Linux 9.5' --class fedora --class gnu-linux --class gnu --class os {
+	linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Rocky-9-5-x86_64-dvd quiet
+	initrdefi /images/pxeboot/initrd.img
+}
+submenu 'Install CentOS 7 APV N series -->' {
+	menuentry 'APV 7900 N' --class fedora --class gnu-linux --class gnu --class os {
+		linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Rocky-9-5-x86_64-dvd inst.ks=hd:LABEL=Rocky-9-5-x86_64-dvd:/Array/apv_deploy.ks quiet arraymodel=907902 arrayraid
+		initrdefi /images/pxeboot/initrd.img
+	}
+	menuentry 'APV 9900 N' --class fedora --class gnu-linux --class gnu --class os {
+		linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Rocky-9-5-x86_64-dvd inst.ks=hd:LABEL=Rocky-9-5-x86_64-dvd:/Array/apv_deploy.ks quiet arraymodel=909902 arrayraid
+		initrdefi /images/pxeboot/initrd.img
+	}
+	menuentry 'APV 11900 N' --class fedora --class gnu-linux --class gnu --class os {
+		linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Rocky-9-5-x86_64-dvd inst.ks=hd:LABEL=Rocky-9-5-x86_64-dvd:/Array/apv_deploy.ks quiet arraymodel=911902
+		initrdefi /images/pxeboot/initrd.img
+	}
+}
Index: /branches/rel_apv_10_7/tools/install_iso_creator/sign_unpack/Makefile
===================================================================
--- /branches/rel_apv_10_7/tools/install_iso_creator/sign_unpack/Makefile	(revision 0)
+++ /branches/rel_apv_10_7/tools/install_iso_creator/sign_unpack/Makefile	(working copy)
@@ -0,0 +1,15 @@
+CFLAGS = -Wall -O2
+LDFLAGS = -lcrypto
+
+TARGET = sign_unpack
+SRC = sign_unpack.c
+
+.PHONY: all clean
+
+all: $(TARGET)
+
+$(TARGET): $(SRC)
+	$(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS)
+
+clean:
+	rm -f $(TARGET)
Index: /branches/rel_apv_10_7/tools/install_iso_creator/sign_unpack/sign_unpack
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/x-executable
Index: /branches/rel_apv_10_7/tools/install_iso_creator/sign_unpack/sign_unpack
===================================================================
--- /branches/rel_apv_10_7/tools/install_iso_creator/sign_unpack/sign_unpack	(revision 40011)
+++ /branches/rel_apv_10_7/tools/install_iso_creator/sign_unpack/sign_unpack	(working copy)

Property changes on: tools/install_iso_creator/sign_unpack/sign_unpack
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/x-executable
\ No newline at end of property
Index: /branches/rel_apv_10_7/tools/update/ustacksystem.ks
===================================================================
--- /branches/rel_apv_10_7/tools/update/ustacksystem.ks	(revision 40011)
+++ /branches/rel_apv_10_7/tools/update/ustacksystem.ks	(working copy)
@@ -95,6 +95,9 @@
 azure-cli-2.38.2-1.el7.x86_64
 # for postgresql
 postgresql-server-9.2.24-9.el7_9.x86_64
+# for RAID
+mdadm-4.1-6.el7.x86_64
+dosfstools-3.0.20-9.el7.x86_64
 
 #below packages are dependence generated by yum
 polkit-pkla-compat-0.1-4.el7.x86_64
Index: /branches/rel_apv_10_7/tools/ustackbuildenv.ks
===================================================================
--- /branches/rel_apv_10_7/tools/ustackbuildenv.ks	(revision 40011)
+++ /branches/rel_apv_10_7/tools/ustackbuildenv.ks	(working copy)
@@ -115,6 +115,9 @@
 hiredis-devel
 json-c-devel-0.11-4.el7_0.x86_64
 yasm-1.2.0-4.el7.x86_64
+# for RAID
+mdadm-4.1-6.el7.x86_64
+dosfstools-3.0.20-9.el7.x86_64
 
 
 #below packages are dependence generated by yum
Index: /branches/rel_apv_10_7/tools/ustackbuildutils.py
===================================================================
--- /branches/rel_apv_10_7/tools/ustackbuildutils.py	(revision 40011)
+++ /branches/rel_apv_10_7/tools/ustackbuildutils.py	(working copy)
@@ -296,7 +296,7 @@
                     break
         if full_path:
             dst_file = BUILD_CHROOT_BASE_PATH + "vmlinuz"
-            os.rename(full_path, dst_file)
+            shutil.copy2(full_path, dst_file)
             logging.debug("copy file from %s to %s", full_path, dst_file)
             return True
         else:
@@ -312,7 +312,7 @@
                     break
         if full_path:
             dst_file = BUILD_CHROOT_BASE_PATH + "initramfs-array.img"
-            os.rename(full_path, dst_file)
+            shutil.copy2(full_path, dst_file)
             logging.debug("copy file from %s to %s", full_path, dst_file)
             return True
         else:
Index: /branches/rel_apv_10_7/tools/ustackbuildutils.py3
===================================================================
--- /branches/rel_apv_10_7/tools/ustackbuildutils.py3	(revision 40011)
+++ /branches/rel_apv_10_7/tools/ustackbuildutils.py3	(working copy)
@@ -285,7 +285,7 @@
                     break
         if full_path:
             dst_file = self.img_buildroot + "/vmlinuz"
-            os.rename(full_path, dst_file)
+            shutil.copy2(full_path, dst_file)
             logging.debug("copy file from %s to %s", full_path, dst_file)
             return True
         else:
@@ -301,7 +301,7 @@
                     break
         if full_path:
             dst_file = self.img_buildroot + "/initramfs-array.img"
-            os.rename(full_path, dst_file)
+            shutil.copy2(full_path, dst_file)
             logging.debug("copy file from %s to %s", full_path, dst_file)
             return True
         else:
