debian: Move LAT partitioning/formatting into the kickstarts
Enable full control of the partition scheme in the kickstart files so that partitioning can be more easily aligned with previous releases and can be adjusted for specific personalities without needing additional LAT / LAT installer changes. This moves the equivalent logic from LAT into the kickstarts. This will be cleaned up and optimized with a followup commit. Test Plan: PASS - Install/Bootstrap/Provision AIO-SX PASS - Install/Bootstrap/Provision Std Controller + workers (2+2) Change-Id: Ie4abf4479b9e8043c20712053b86afdd25ee626e Story: 2009303 Task: 46191 Depends-On: https://review.opendev.org/c/starlingx/integ/+/856481 Signed-off-by: Robert Church <robert.church@windriver.com>
This commit is contained in:
parent
ed1704d131
commit
fe33a694b8
|
@ -563,6 +563,12 @@ function get_std_controller_provisioning_sizes()
|
|||
export SCRATCH_VOL_SIZE=16000
|
||||
}
|
||||
|
||||
#########################################################################
|
||||
# Name : get_worker_provisioning_sizes
|
||||
# Purpose : Provide Logical Volume sizes
|
||||
# Parameter: None
|
||||
# Return : Nothing, but exports key values
|
||||
#########################################################################
|
||||
function get_worker_provisioning_sizes()
|
||||
{
|
||||
gb=\$((1024*1024*1024))
|
||||
|
@ -1289,6 +1295,62 @@ else
|
|||
ilog "BIOS Firmware"
|
||||
fi
|
||||
|
||||
# Common LAT installer stuff
|
||||
a=""
|
||||
|
||||
# Copy the installer default steps
|
||||
# FSZ=# - MB size of fat partition
|
||||
# BSZ=# - MB size of boot partition
|
||||
# RSZ=# - MB size of root partition
|
||||
# VSZ=# - MB size of var partition (0 for auto expand)
|
||||
ilog "LAT size parameters: BLM=${BLM} FSZ=${FSZ} BSZ=${BSZ} RSZ=${RSZ} VSZ=${VSZ}"
|
||||
|
||||
lsz=`lsblk -n ${dev} -o LOG-SEC -d`
|
||||
|
||||
sgdisk -Z ${dev}
|
||||
first=`sgdisk -F ${dev}|grep -v Creating`
|
||||
|
||||
# BIOSPLUSEFI=1 is always used
|
||||
# 1MB size for BIOS boot partition
|
||||
end=$(($first+(1*1024*1024/$lsz)-1))
|
||||
a="$a -n 1:$first:$end -c 1:bios -t 1:EF02"
|
||||
first=$(($end+1))
|
||||
|
||||
end=$(($first+($FSZ*1024*1024/$lsz)-1))
|
||||
a="$a -n ${p1}:$first:$end -c ${p1}:otaefi -t ${p1}:EF00"
|
||||
first=$(($end+1))
|
||||
|
||||
last=$(sgdisk -E ${dev} 2>/dev/null |grep -v Creating)
|
||||
p=$((p1+1))
|
||||
|
||||
# Boot Partition A
|
||||
end=$(($first+($BSZ*1024*1024/$lsz)-1))
|
||||
a="$a -n $p:$first:$end -c $p:otaboot"
|
||||
grub_pt_update
|
||||
|
||||
if [ "$INSTAB" = 0 -a "${INSTFLUX}" = 0 ] ; then
|
||||
if [ "$VSZ" = 0 ] ; then
|
||||
end=$last
|
||||
else
|
||||
end=$(($first+($RSZ*1024*1024/$lsz)-1))
|
||||
fi
|
||||
a="$a -n $p:$first:$end -c $p:otaroot"
|
||||
else
|
||||
end=$(($first+($RSZ*1024*1024/$lsz)-1))
|
||||
a="$a -n $p:$first:$end -c $p:otaroot"
|
||||
fi
|
||||
|
||||
# Flux Partition
|
||||
if [ "${INSTFLUX}" = 1 ] ; then
|
||||
grub_pt_update
|
||||
if [ "$VSZ" = 0 ] ; then
|
||||
end=$last
|
||||
else
|
||||
end=$(($first+($VSZ*1024*1024/$lsz)-1))
|
||||
fi
|
||||
a="$a -n $p:$first:$end -c $p:fluxdata"
|
||||
fi
|
||||
|
||||
# Only controllers have a persistent partition
|
||||
# Allocate platform backup partition
|
||||
if [ "${controller}" = true ] ; then
|
||||
|
@ -1349,6 +1411,8 @@ dev=$INSTDEV
|
|||
|
||||
dlog "Requesting ${dev} Partition Table: ${a}"
|
||||
|
||||
sgdisk $a -p ${dev}
|
||||
|
||||
true
|
||||
%end
|
||||
|
||||
|
@ -1391,6 +1455,20 @@ elif [ "${worker}" = true ] ; then
|
|||
get_worker_provisioning_sizes
|
||||
fi
|
||||
|
||||
# p1 is set in LAT installer based on the BIOSPLUSEFI setting (always 1 for
|
||||
# StarlingX resulting as p1=2)
|
||||
mkfs.vfat -n otaefi ${fs_dev}${p1}
|
||||
|
||||
pi=$((p1+1))
|
||||
mkfs.ext4 -F -L otaboot ${fs_dev}${pi}
|
||||
|
||||
pi=$((pi+1))
|
||||
mkfs.ext4 -F -L otaroot ${fs_dev}${pi}
|
||||
|
||||
pi=$((pi+1))
|
||||
FLUXPART=${pi}
|
||||
mkfs.ext4 -F -L fluxdata ${fs_dev}${FLUXPART}
|
||||
|
||||
ilog "MINIMUM_PLATFORM_PV_SIZE : ${MINIMUM_PLATFORM_PV_SIZE}"
|
||||
ilog "SCRATCH_VOL_SIZE : ${SCRATCH_VOL_SIZE}"
|
||||
ilog "ROOTFS_SIZE : ${ROOTFS_SIZE}"
|
||||
|
|
Loading…
Reference in New Issue