sz=$(blockdev --getsize64 $(get_disk $rootfs_device)) if [ $sz -le $((80*$gb)) ] ; then ## Less than 80GB use a 10GB root partition LOG_VOL_SIZE=4000 SCRATCH_VOL_SIZE=4000 ROOTFS_SIZE=10000 else ## Use a 20GB root partition LOG_VOL_SIZE=4000 SCRATCH_VOL_SIZE=4000 ROOTFS_SIZE=20000 fi ROOTFS_OPTIONS="defaults" profile_mode=`cat /proc/cmdline |xargs -n1 echo |grep security_profile= | grep extended` if [ -n "$profile_mode" ]; then # Enable iversion labelling for rootfs when IMA is enabled ROOTFS_OPTIONS="${ROOTFS_OPTIONS},iversion" fi cat<>/tmp/part-include part /boot --fstype=ext4 --asprimary --size=500 --ondrive=$(get_disk $rootfs_device) --fsoptions="$ROOTFS_OPTIONS" part / --fstype=ext4 --asprimary --size=$ROOTFS_SIZE --ondrive=$(get_disk $rootfs_device) --fsoptions="$ROOTFS_OPTIONS" part /var/log --fstype=ext4 --size=$LOG_VOL_SIZE --ondrive=$(get_disk $rootfs_device) part /scratch --fstype=ext4 --size=$SCRATCH_VOL_SIZE --ondrive=$(get_disk $rootfs_device) EOF %end