aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJybz <j.biernacki@free.fr>2022-04-22 09:17:32 +0200
committerJybz <j.biernacki@free.fr>2022-04-22 09:17:32 +0200
commitb34b4f7910bdba40d8bbe89bd64976331016e419 (patch)
tree3e17835a2f36d1b811e336e4027a6f9e9568fa5c
parent4346bf0552e6d129d3aca4768bd9babebfcaf5aa (diff)
downloadmageia4arm-b34b4f7910bdba40d8bbe89bd64976331016e419.tar
mageia4arm-b34b4f7910bdba40d8bbe89bd64976331016e419.tar.gz
mageia4arm-b34b4f7910bdba40d8bbe89bd64976331016e419.tar.bz2
mageia4arm-b34b4f7910bdba40d8bbe89bd64976331016e419.tar.xz
mageia4arm-b34b4f7910bdba40d8bbe89bd64976331016e419.zip
Use default efi name for automatique boot on KVM instead of a custom mageia's name.user/jibz/freebox-delta
-rw-r--r--platforms/freebox-delta/second_stage_install.sh2
-rwxr-xr-xplatforms/freebox-delta/specialFunctions.sh76
2 files changed, 6 insertions, 72 deletions
diff --git a/platforms/freebox-delta/second_stage_install.sh b/platforms/freebox-delta/second_stage_install.sh
index bc06649..7f307f6 100644
--- a/platforms/freebox-delta/second_stage_install.sh
+++ b/platforms/freebox-delta/second_stage_install.sh
@@ -50,7 +50,7 @@ echo -e "# Module to add :\nadd_dracutmodules+=\" ${MODULE_ADD_LIST} \"\n" > /et
# /usr/bin/sed -i -e 's/GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=1/' /etc/default/grub
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
-/usr/sbin/grub2-install --skip-fs-probe --target=arm64-efi --efi-directory=/boot/EFI
+/usr/sbin/grub2-install --skip-fs-probe --target=arm64-efi --removable --no-nvram
#For dracut :
# <INSTALL_EXEC> mindi-busybox plymouth-scripts #systemd-bootchart libcap-utils keyutils lvm2 #dmsetup
diff --git a/platforms/freebox-delta/specialFunctions.sh b/platforms/freebox-delta/specialFunctions.sh
index 4386a54..3a15863 100755
--- a/platforms/freebox-delta/specialFunctions.sh
+++ b/platforms/freebox-delta/specialFunctions.sh
@@ -17,34 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#Fdisk partitionment commands :
-DEFAULT=""
-NEW_DOSTAB="o"
-NEW_PART="n"
-PRIMARY="p"
-CHANGE_TYPE="t"
-TYPE_FAT32LBA="c"
-CHANGE_BOOTFLAG="a"
-APPLY="w"
-
-# PART_BOOT=1
-# PART_BOOT_FIRST_SECTOR=${DEFAULT}
-# PART_BOOT_SIZE="+128M"
-#
-# PART_ROOT=2
-# PART_ROOT_FIRST_SECTOR=${DEFAULT}
-# PART_ROOT_SIZE=${DEFAULT}
-
-PART_BOOTandROOT="1"
-PART_BOOTandROOT_FIRST_SECTOR="${DEFAULT}"
-PART_BOOTandROOT_SIZE="${DEFAULT}"
-
-
-# FDISK_SCRIPT="${NEW_PART}\n${PRIMARY}\n${PART_BOOTandROOT}\n${PART_BOOTandROOT_FIRST_SECTOR}\n${PART_BOOTandROOT_SIZE}\n${CHANGE_BOOTFLAG}\n${APPLY}\n"
p1_Start_sector="${DEFAULT}"
p1_Size="128M"
-p1_Size=$((2*1024*128))
p1_Type="uefi"
#p1_Bootable="*"
p1_Bootable="${DEFAULT}"
@@ -52,7 +26,7 @@ p2_Start_sector="${DEFAULT}"
p2_Size="${DEFAULT}"
p2_Type="linux"
p2_Bootable="${DEFAULT}"
-#SFDISK_SCRIPT=",128M,U,*\n,,L,\nwrite\n"
+
SFDISK_SCRIPT="label: gpt
${p1_Start_sector}, ${p1_Size}, ${p1_Type}, ${p1_Bootable}
${p2_Start_sector}, ${p2_Size}, ${p2_Type}, ${p2_Bootable}
@@ -120,50 +94,6 @@ function loopingImage() {
}
-function out_partitionningimage() {
- title "Partitionning image"
- warning "JE SUIS ICI DEDANS!"
-
- if [ "x" != "${SFDISK_SCRIPT:="x"}" ]; then
- HDD_INFO="$(echo -e "${SFDISK_SCRIPT}" | /usr/sbin/sfdisk "${INSTALL_PATH}/${IMAGE}")"
- warning "JE check"
- /usr/sbin/sfdisk -V "${INSTALL_PATH}/${IMAGE}"
- warning "DONE"
- echo "${HDD_INFO}"
- SECTOR_SIZE="$(echo "${HDD_INFO}" | grep -m1 "Units: sectors" | sed -e 's/^.* \([[:digit:]]\+\) bytes[[:space:]]*$/\1/')"
- if [ 1 -eq ${SEPARATE_BOOT_PARTITION} ]; then
- BOOT_P_INFO=$(echo "${HDD_INFO}" | grep -m1 -A3 "^Device" | grep "${IMAGE}1" | tr '*' ' ' | sed -e 's/[[:space:]]\+/ /g')
- ROOT_P_INFO=$(echo "${HDD_INFO}" | grep -m1 -A3 "^Device" | grep "${IMAGE}2" | tr '*' ' ' | sed -e 's/[[:space:]]\+/ /g')
- BOOT_OFFSET_S="$(echo "${BOOT_P_INFO}" | sed -e "s/^.*${IMAGE}[[:digit:]][[:space:]\*]\+//g" | cut -d ' ' -f 1)"
- BOOT_NB_SECTORS=$(echo "${BOOT_P_INFO}" | sed -e "s/^.*${IMAGE}[[:digit:]][[:space:]\*]\+//g" | cut -d ' ' -f 3)
- BOOT_SIZE_KB="$((${SECTOR_SIZE}*${BOOT_NB_SECTORS}/1024))"
- BOOT_SIZE_B="$((${SECTOR_SIZE}*${BOOT_NB_SECTORS}))"
- BOOT_OFFSET_KB="$((${SECTOR_SIZE}*${BOOT_OFFSET_S}/1024))"
- print_info "Boot offset : ${BOOT_OFFSET_S}"
- print_info "Boot offset (kB) : ${BOOT_OFFSET_KB}"
- print_info "Boot sectors : ${BOOT_NB_SECTORS}"
- print_info "Boot size (kB) : ${BOOT_SIZE_KB}"
- print_info "Boot size (B) : ${BOOT_SIZE_B}"
- else
- ROOT_P_INFO=$(echo "${HDD_INFO}" | grep -m1 -A3 "^Device" | grep "${IMAGE}1")
- fi
- ROOT_OFFSET_S=$(echo "${ROOT_P_INFO}" | sed -e "s/^.*${IMAGE}[[:digit:]][[:space:]\*]\+//g" | cut -d ' ' -f 1)
- ROOT_NB_SECTORS=$(echo "${ROOT_P_INFO}" | sed -e "s/^.*${IMAGE}[[:digit:]][[:space:]\*]\+//g" | cut -d ' ' -f 3)
- ROOT_SIZE_KB="$((${SECTOR_SIZE}*${ROOT_NB_SECTORS}/1024))"
- ROOT_OFFSET_B="$((${SECTOR_SIZE}*${ROOT_OFFSET_S}))"
-
- print_info "Root offset : ${ROOT_OFFSET_S}"
- print_info "Root offset (B) : ${ROOT_OFFSET_B}"
- print_info "Root sectors : ${ROOT_NB_SECTORS}"
- print_info "Root size kB : ${ROOT_SIZE_KB}"
- else
- error "Error, no partitionning script found."
- cleanExit ${ERR_1}
- fi
-
- return 0
-}
-
function formatpartitions() {
print_info "Formatting partitions"
if [ 1 -eq ${SEPARATE_BOOT_PARTITION} ]; then
@@ -203,6 +133,7 @@ function formatpartitions() {
return 0
}
+
function imageConversion()
{
title "Converting image into a qcow2 file"
@@ -211,6 +142,7 @@ function imageConversion()
return 0
}
+
function preImgCreation()
{
# title "Creating Banana Pro image"
@@ -225,12 +157,14 @@ function postPrepareChroot()
return 0
}
+
function burningBootloader()
{
# DEVICE is set just before this function and looped.
return 0
}
+
function copyingCustomSystem()
{
# installpkg ${CONFIG_PATH}/package.mga7.aarch64.rpm