mkimage.sh: add --efishell option
This commit is contained in:
parent
04f270c58e
commit
55a963613d
17
mkimage.sh
17
mkimage.sh
|
@ -21,6 +21,7 @@ TEMP=$(
|
|||
--long crypttpm2 \
|
||||
--long simple \
|
||||
--long update \
|
||||
--long efishell \
|
||||
--long help \
|
||||
-- "$@"
|
||||
)
|
||||
|
@ -36,6 +37,10 @@ unset TEMP
|
|||
|
||||
while true; do
|
||||
case "$1" in
|
||||
'--efishell')
|
||||
USE_EFISHELL="y"
|
||||
shift 1; continue
|
||||
;;
|
||||
'--crypt')
|
||||
USE_CRYPT="y"
|
||||
shift 1; continue
|
||||
|
@ -158,18 +163,20 @@ if ! [[ $UPDATE ]]; then
|
|||
mkfs.fat -nEFI -F32 ${DEV_PART}1
|
||||
fi
|
||||
mkdir "$MY_TMPDIR"/boot
|
||||
mount ${DEV_PART}1 "$MY_TMPDIR"/boot
|
||||
mount "${DEV_PART}1" "$MY_TMPDIR"/boot
|
||||
|
||||
mkdir -p "$MY_TMPDIR"/boot/EFI/Boot
|
||||
mkdir -p "$MY_TMPDIR"/boot/EFI/FedoraBook
|
||||
if [[ -e "${SOURCE}"/Shell.efi ]] && [[ -e "${SOURCE}"/startup.nsh ]] && [[ -e "${SOURCE}"/LockDown.efi ]]; then
|
||||
cp "${SOURCE}"/startup.nsh "$MY_TMPDIR"/boot/
|
||||
cp "${SOURCE}"/LockDown.efi "$MY_TMPDIR"/boot/
|
||||
|
||||
if [[ $USE_EFISHELL ]]; then
|
||||
[[ -e "${SOURCE}"/startup.nsh ]] && cp "${SOURCE}"/startup.nsh "$MY_TMPDIR"/boot/
|
||||
[[ -e "${SOURCE}"/LockDown.efi ]] && cp "${SOURCE}"/LockDown.efi "$MY_TMPDIR"/boot/
|
||||
cp "${SOURCE}"/Shell.efi "$MY_TMPDIR"/boot/EFI/Boot/bootx64.efi
|
||||
cp "$SOURCE"/bootx64.efi "$MY_TMPDIR"/boot/EFI/FedoraBook/bootx64.efi
|
||||
else
|
||||
cp "$SOURCE"/bootx64.efi "$MY_TMPDIR"/boot/EFI/Boot/bootx64.efi
|
||||
fi
|
||||
|
||||
umount "$MY_TMPDIR"/boot
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -179,7 +186,7 @@ dd if="$SOURCE"/root.img of=${DEV_PART}2 status=progress
|
|||
# ------------------------------------------------------------------------------
|
||||
# data
|
||||
if ! [[ $UPDATE ]]; then
|
||||
mkfs.xfs -L data ${DEV_PART}3
|
||||
mkfs.xfs -L data "${DEV_PART}3"
|
||||
fi
|
||||
# ------------------------------------------------------------------------------
|
||||
# DONE
|
||||
|
|
Loading…
Reference in a new issue