+# stages setup {{{
+if [ -z "$STAGES" ] ; then
+ STAGES="/var/cache/grml-debootstrap/stages_${SHORT_TARGET}"
+ [ -d "$STAGES" ] || mkdir -p "$STAGES"
+fi
+
+if [ -r "$STAGES"/grml-debootstrap ] ; then
+ if grep -q 'done' "${STAGES}/grml-debootstrap" ; then
+ eerror "Error: grml-debootstrap has been executed already, won't continue therefore."
+ eerror "If you want to re-execute grml-debootstrap just manually remove ${STAGES}"
+ fi
+fi
+# }}}
+
+# partition handling {{{
+PARTITION=''
+DIRECTORY=''
+
+set_target_directory(){
+ # assume we are installing into a directory, don't run mkfs and grub related stuff therefore
+ DIRECTORY=1
+ MNTPOINT="$TARGET"
+ MKFS=''
+ TUNE2FS=''
+ FSCK=''
+ # make sure we normalise the path to an absolute directory name so something like:
+ # mkdir -p foo/a bar/a; (cd foo; grml-debootstrap -t a)&; (cd bar; grml-debootstrap -t a)&; wait
+ # works
+ TARGET="$(readlink -f "$TARGET")"
+}
+
+if [ -b "$TARGET" ] || [ -n "$VIRTUAL" ] ; then
+ PARTITION=1
+else
+ # $TARGET was not detected as block device, but we do not want to create target directory in /dev/
+ if [[ $TARGET == "/dev/"* ]]; then
+ eerror "Error: Will not create target directory $TARGET in /dev."
+ eerror " Please check the partition(s) of the blockdevice."
+ bailout 1
+ fi
+ set_target_directory
+fi
+# }}}
+
+# make sure we have the right syntax when using an iso image {{{
+if [ -n "$ISO" ] ; then
+ case $ISO in
+ file*) # do nothing
+ ;;
+ *)
+ ISO=file:$ISO
+ ;;
+ esac
+fi
+ISODIR=${ISO##file:}
+ISODIR=${ISODIR%%/}
+# }}}
+
+# Debian ISOs do not contain signed Release files {{{
+if [ -n "$ISO" ] ; then
+ DEBOOTSTRAP_OPT="$DEBOOTSTRAP_OPT --no-check-gpg"
+fi
+# }}}
+
+# create filesystem {{{
+mkfs() {
+ if [ -n "$DIRECTORY" ] ; then
+ einfo "Running grml-debootstrap on a directory, skipping mkfs stage."
+ return 0
+ fi
+
+ if grep -q "$TARGET" /proc/mounts ; then
+ eerror "$TARGET already mounted, exiting to avoid possible damage. (Manually unmount $TARGET)"
+ bailout 1
+ fi
+
+ # mkfs.ext* might prompt with "/dev/sdX# contains a ext* file system
+ # created on ... Proceed anyway? (y,n)" which we want to skip in force mode
+ if [ -n "$MKFS" ] && [ -n "$FORCE" ] ; then
+ case "$MKFS" in
+ mkfs.ext*)
+ einfo "Enabling force option (-F) for mkfs.ext* tool as requested via --force switch."
+ MKFS_OPTS="$MKFS_OPTS -F"
+ ;;
+ esac
+ fi
+
+ # starting with e2fsprogs 1.43~WIP.2015.05.18-1 mkfs.ext4 enables the metadata_csum feature
+ # by default, which requires a recent version of tune2fs on the target system then,
+ # so disable this feature for older Debian releases where it's known to be unsupported
+ if [ -n "$MKFS" ] && [ "$MKFS" = "mkfs.ext4" ] ; then
+ case "$RELEASE" in
+ jessie)
+ # assume a more recent version if we can't identify the version via dpkg-query
+ local e2fsprogs_version
+ e2fsprogs_version="$(dpkg-query --show --showformat='${Version}' e2fsprogs 2>/dev/null || echo 1.44)"
+ if [ -n "$e2fsprogs_version" ] && dpkg --compare-versions "$e2fsprogs_version" ge '1.43~WIP.2015.05.18-1' ; then
+ einfo "Disabling metadata_csum feature for $MKFS as $RELEASE doesn't support it."
+ MKFS_OPTS="$MKFS_OPTS -O ^metadata_csum"
+ fi
+ ;;
+ esac
+ fi
+
+ # starting with e2fsprogs v1.47.0 mkfs.ext4 enables the metadata_csum_seed feature
+ # by default, which requires Linux kernel >=4.4, e2fsprogs >=1.43, according GRUB etc.
+ # Disable this feature for Debian releases older than bookworm
+ if [ -n "$MKFS" ] && [ "$MKFS" = "mkfs.ext4" ] ; then
+ case "$RELEASE" in
+ jessie|stretch|buster|bullseye)
+ local e2fsprogs_version
+ # assume a more recent version if we can't identify the version via dpkg-query
+ e2fsprogs_version="$(dpkg-query --show --showformat='${Version}' e2fsprogs 2>/dev/null || echo 1.47)"
+ if [ -n "$e2fsprogs_version" ] && dpkg --compare-versions "$e2fsprogs_version" ge '1.43' ; then
+ einfo "Disabling metadata_csum_seed feature for $MKFS as $RELEASE doesn't support it."
+ MKFS_OPTS="$MKFS_OPTS -O ^metadata_csum_seed"
+ fi
+ ;;
+ esac
+ fi
+
+ if [ -n "$MKFS" ] ; then
+
+ if [ -n "${ARM_EFI_TARGET}" ] ; then
+ einfo "Running mkfs.fat $MKFS_OPTS on $ARM_EFI_TARGET"
+ mkfs.fat -n "EFI" "$ARM_EFI_TARGET"
+ MKFS_OPTS="$MKFS_OPTS -L LINUX"
+ fi
+
+ einfo "Running $MKFS $MKFS_OPTS on $TARGET"
+ # shellcheck disable=SC2086
+ "$MKFS" $MKFS_OPTS "$TARGET"
+
+ if [ "$FIXED_DISK_IDENTIFIERS" = "yes" ] ; then
+ if ! echo "$MKFS" | grep -q "mkfs.ext" ; then
+ eerror "Not changing disk uuid for $TARGET because $MKFS doesn't seem to match for ext{2,3,4} file system"
+ bailout 1
+ else
+ einfo "Changing disk uuid for $TARGET to fixed (non-random) value $DISK_IDENTIFIER using tune2fs"
+ tune2fs "$TARGET" -U "$DISK_IDENTIFIER" </dev/null
+ fi
+ fi
+
+ if [ -n "$VIRTUAL" ] && [ -n "$EFI_TARGET" ]; then
+ einfo "Creating FAT filesystem on $EFI_TARGET"
+ mkfs.fat -F32 -n "EFI" "$EFI_TARGET"
+ fi
+
+ # make sure /dev/disk/by-uuid/... is up2date, otherwise grub
+ # will fail to detect the uuid in the chroot
+ if [ -n "$VIRTUAL" ] ; then
+ einfo "Virtual environment doesn't require blockdev --rereadpt, skipping therefore"
+ elif echo "$TARGET" | grep -q "/dev/md" ; then
+ blockdev --rereadpt "${TARGET}"
+ else
+ # if we deploy to /dev/sdX# then let's see if /dev/sdX exists
+ local main_device="${TARGET%%[0-9]*}"
+ # sanity check to not try to e.g. access /dev/loop if we get /dev/loop0
+ if [ -f "/sys/block/$(basename "${main_device}")/$(basename "${TARGET}")/dev" ] ; then
+ blockdev --rereadpt "$main_device"
+ else
+ einfo "No underlying block device for $TARGET identified, skipping blockdev --rereadpt."
+ fi
+ fi
+ # give the system 2 seconds, otherwise we might run into
+ # race conditions :-/
+ sleep 2
+
+ eend $RC
+ fi
+}
+# }}}
+
+# retrieve ID_FS_UUID {{{
+identify_target_uuid() {
+ local device="$1"
+
+ if ! [ -b "$device" ] ; then
+ return 1
+ fi
+
+ eval "$(blkid -o udev "$1" 2>/dev/null)"
+
+ if [ -n "$ID_FS_UUID" ] ; then
+ echo "$ID_FS_UUID"
+ else
+ return 1
+ fi
+}
+# }}}
+
+# identify TARGET_UUID {{{
+mountpoint_to_blockdevice() {
+ TARGET_UUID=''
+
+ TARGET_UUID=$(identify_target_uuid "$TARGET" 2>/dev/null || true)
+ if [ -n "$TARGET_UUID" ] ; then
+ einfo "Identified UUID $TARGET_UUID for $TARGET"
+ return 0
+ fi
+
+ # $TARGET might be a mountpoint and not a blockdevice, search for according entry
+ for file in /sys/block/*/*/dev ; do
+ if grep -q "^$(mountpoint -d "${TARGET}")$" "$file" ; then
+ local dev
+ dev="${file%/dev}"
+ dev="/dev/${dev##*/}"
+ TARGET_UUID=$(identify_target_uuid "$dev" 2>/dev/null || true)
+
+ if [ -n "$TARGET_UUID" ] ; then
+ einfo "Identified UUID $TARGET_UUID for $TARGET (via $file)"
+ return 0
+ fi
+ fi
+ done
+}
+# }}}
+
+# modify filesystem settings {{{
+tunefs() {
+ if [ -n "$TUNE2FS" ] && echo "$MKFS" | grep -q "mkfs.ext" ; then
+ einfo "Disabling automatic filesystem check on $TARGET via tune2fs"
+ $TUNE2FS "$TARGET" </dev/null
+ fi
+}
+# }}}
+
+# mount the new partition or if it's a directory do nothing at all {{{
+mount_target() {
+ if [ -n "$DIRECTORY" ] ; then
+ einfo "Running grml-debootstrap on a directory, nothing to mount."
+ else
+ if grep -q "$TARGET" /proc/mounts ; then
+ ewarn "$TARGET already mounted, continuing anyway."
+ else
+ if ! [ -d "${MNTPOINT}" ] ; then
+ [ -n "$VIRTUAL" ] || mkdir -p "${MNTPOINT}"
+ fi
+ einfo "Mounting $TARGET to $MNTPOINT"
+ mkdir -p "$MNTPOINT"
+ mount -o rw,suid,dev "$TARGET" "$MNTPOINT"
+ fi
+ fi
+ if [ -n "$ISODIR" ] ; then
+ einfo "Mounting Debian image loopback to $MNTPOINT/$ISODIR."
+ mkdir -p "$MNTPOINT/$ISODIR"
+ mount --bind "$ISODIR" "$MNTPOINT/$ISODIR"
+ fi
+}
+# }}}
+
+# prepare VM image for usage with debootstrap {{{
+prepare_vm() {
+ if [ -z "$VIRTUAL" ] ; then
+ return 0 # be quiet by intention
+ fi
+
+ if [ -b "$TARGET" ] && [ -n "$VMFILE" ] ; then
+ eerror "Error: specified virtual disk target ($TARGET) is an existing block device."
+ bailout 1
+ fi
+ if [ ! -b "$TARGET" ] && [ -z "$VMFILE" ] ; then
+ eerror "Error: specified virtual disk target ($TARGET) does not exist yet."
+ bailout 1
+ fi
+
+ # make sure loop module is present and a usable loop device exists
+ modprobe loop || true
+ if ! losetup -f >/dev/null 2>&1; then
+ eerror "Error finding usable loop device"
+ bailout 1
+ fi
+
+ # if dm-mod isn't available then kpartx will fail with
+ # "Is device-mapper driver missing from kernel? [...]"
+ modprobe dm-mod || true
+ if ! grep -q 'device-mapper' /proc/misc >/dev/null 2>&1 ; then
+ eerror "Device-mapper support missing in kernel."
+ bailout 1
+ fi
+
+ ORIG_TARGET="$TARGET" # store for later reuse
+
+ if [ -n "$VMFILE" ]; then
+ qemu-img create -f raw "${TARGET}" "${VMSIZE}"
+ fi
+ if [ -n "$VMEFI" ]; then
+ parted -s "${TARGET}" 'mklabel gpt'
+ parted -s "${TARGET}" 'mkpart ESP fat32 1MiB 101MiB'
+ parted -s "${TARGET}" 'set 1 boot on'
+ parted -s "${TARGET}" 'mkpart bios_grub 101MiB 102MiB'
+ parted -s "${TARGET}" 'set 2 bios_grub on'
+ parted -s "${TARGET}" 'mkpart primary ext4 102MiB 100%'
+
+ else
+ # arm64 support largely only exists for GPT
+ if [ "$ARCH" = 'arm64' ]; then
+ einfo "Setting up GPT partitions for arm64"
+ parted -s "${TARGET}" 'mklabel gpt'
+ parted -s "${TARGET}" 'mkpart ESP fat32 1MiB 10MiB'
+ parted -s "${TARGET}" 'set 1 boot on'
+ parted -s "${TARGET}" 'mkpart LINUX ext4 10MiB 100%'
+ else
+ parted -s "${TARGET}" 'mklabel msdos'
+ if [ "$FIXED_DISK_IDENTIFIERS" = "yes" ] ; then
+ einfo "Adjusting disk signature to a fixed (non-random) value"
+ MBRTMPFILE=$(mktemp)
+ dd if="${TARGET}" of="${MBRTMPFILE}" bs=512 count=1
+ echo -en "\\x41\\x41\\x41\\x41" | dd of="${MBRTMPFILE}" conv=notrunc seek=440 bs=1
+ dd if="${MBRTMPFILE}" of="${TARGET}" conv=notrunc
+ fi
+ parted -s "${TARGET}" 'mkpart primary ext4 4MiB 100%'
+ parted -s "${TARGET}" 'set 1 boot on'
+ fi
+ fi
+
+ DEVINFO=$(kpartx -asv "$TARGET") # e.g. 'add map loop0p1 (254:5): 0 20477 linear 7:0 3' - will be multi-line for arm64
+ if [ -z "${DEVINFO}" ] ; then
+ eerror "Error setting up loopback device."
+ bailout 1
+ fi
+
+ # if we're building for arm64, we operate on the first line of $DEVINFO which is the EFI partition
+ if [ "$ARCH" = 'arm64' ]; then
+ LOOP_PART="${DEVINFO##add map }" # 'loop0p1 (254:5): 0 20477 linear 7:0 3'
+ LOOP_PART="${LOOP_PART// */}" # 'loop0p1'
+ LOOP_DISK="${LOOP_PART%p*}" # 'loop0'
+ export ARM_EFI_TARGET="/dev/mapper/$LOOP_PART"
+ DEVINFO=${DEVINFO##*$'\n'} # now set $DEVINFO to the last line which is the OS partition
+ fi
+
+ # hopefully this always works as expected
+ LOOP_PART="${DEVINFO##add map }" # 'loop0p1 (254:5): 0 20477 linear 7:0 3'
+ LOOP_PART="${LOOP_PART// */}" # 'loop0p1'
+ if [ -n "$VMEFI" ]; then
+ export EFI_TARGET="/dev/mapper/$LOOP_PART" # '/dev/mapper/loop0p1'
+ LOOP_PART="${LOOP_PART%p1}p3"
+ fi
+ LOOP_DISK="${LOOP_PART%p*}" # 'loop0'
+ export TARGET="/dev/mapper/$LOOP_PART" # '/dev/mapper/loop0p1'
+
+ if [ -z "$TARGET" ] ; then
+ eerror "Error: target could not be set to according /dev/mapper/* device."
+ bailout 1
+ fi
+}
+# }}}
+
+# make VM image bootable {{{
+grub_install() {
+ if [ -z "${VIRTUAL}" ] ; then
+ return 0
+ fi
+ if [ "${GRUB_INSTALL}" != "yes" ] ; then
+ einfo "Not installing GRUB as requested via \$GRUB_INSTALL=$GRUB_INSTALL"
+ return 0
+ fi
+
+ if ! mount "${TARGET}" "${MNTPOINT}" ; then
+ eerror "Error: Mounting ${TARGET} failed, can not continue."
+ bailout 1
+ fi
+
+ if [ -n "${ARM_EFI_TARGET}" ]; then
+ mkdir -p "${MNTPOINT}"/boot/efi
+ if ! mount "${ARM_EFI_TARGET}" "${MNTPOINT}"/boot/efi ; then
+ eerror "Error: Mounting ${ARM_EFI_TARGET} failed, can not continue."
+ bailout 1
+ fi
+ fi
+
+ mount -t proc none "${MNTPOINT}"/proc
+ mount -t sysfs none "${MNTPOINT}"/sys
+ mount -t devtmpfs udev "${MNTPOINT}"/dev
+ mount -t devpts devpts "${MNTPOINT}"/dev/pts
+
+ if [ -n "$ARM_EFI_TARGET" ]; then
+ einfo "Installing Grub as bootloader into EFI."
+
+ chroot "${MNTPOINT}" grub-install --target=arm64-efi --efi-directory=/boot/efi --bootloader-id=debian --recheck --no-nvram --removable
+ # Has chroot-script installed GRUB to MBR using grub-install (successfully), already?
+ # chroot-script skips installation for unset ${GRUB}
+ elif [[ -z "${GRUB}" ]] || ! dd if="${GRUB}" bs=512 count=1 2>/dev/null | cat -v | grep -Fq GRUB; then
+ einfo "Installing Grub as bootloader."
+
+ if ! chroot "${MNTPOINT}" dpkg --list grub-pc 2>/dev/null | grep -q '^ii' ; then
+ echo "Notice: grub-pc package not present yet, installing it therefore."
+ # shellcheck disable=SC2086
+ DEBIAN_FRONTEND=$DEBIAN_FRONTEND chroot "$MNTPOINT" apt-get -y --no-install-recommends install $DPKG_OPTIONS grub-pc
+ fi
+
+ mkdir -p "${MNTPOINT}/boot/grub"
+ if ! [ -d "${MNTPOINT}"/usr/lib/grub/i386-pc/ ] ; then
+ eerror "Error: grub not installed inside Virtual Machine. Can not install bootloader."
+ bailout 1
+ fi
+ cp -a "${MNTPOINT}"/usr/lib/grub/i386-pc "${MNTPOINT}/boot/grub/"
+
+ if [ -n "$VMEFI" ]; then
+
+ mkdir -p "${MNTPOINT}"/boot/efi
+ mount -t vfat "${EFI_TARGET}" "${MNTPOINT}"/boot/efi
+
+ if ! chroot "${MNTPOINT}" dpkg --list shim-signed 2>/dev/null | grep -q '^ii' ; then
+ echo "Notice: shim-signed package not present yet, installing it therefore."
+ # shellcheck disable=SC2086
+ DEBIAN_FRONTEND=$DEBIAN_FRONTEND chroot "$MNTPOINT" apt-get -y --no-install-recommends install $DPKG_OPTIONS shim-signed
+ fi
+
+ if [ "$(dpkg --print-architecture)" = "arm64" ]; then
+ if ! chroot "${MNTPOINT}" dpkg --list grub-efi-arm64-signed 2>/dev/null | grep -q '^ii' ; then
+ echo "Notice: grub-efi-arm64-signed package not present yet, installing it therefore."
+ # shellcheck disable=SC2086
+ DEBIAN_FRONTEND=$DEBIAN_FRONTEND chroot "$MNTPOINT" apt-get -y --no-install-recommends install $DPKG_OPTIONS grub-efi-arm64-bin grub-efi-arm64-signed
+ fi
+ chroot "$MNTPOINT" grub-install --target=arm64-efi --efi-directory=/boot/efi --uefi-secure-boot --removable "/dev/$LOOP_DISK"
+ elif [ "$(dpkg --print-architecture)" = "i386" ]; then
+ if ! chroot "${MNTPOINT}" dpkg --list grub-efi-ia32-signed 2>/dev/null | grep -q '^ii' ; then
+ echo "Notice: grub-efi-ia32-signed package not present yet, installing it therefore."
+ # shellcheck disable=SC2086
+ DEBIAN_FRONTEND=$DEBIAN_FRONTEND chroot "$MNTPOINT" apt-get -y --no-install-recommends install $DPKG_OPTIONS grub-efi-ia32-bin grub-efi-ia32-signed
+ fi
+ chroot "$MNTPOINT" grub-install --target=i386-efi --efi-directory=/boot/efi --uefi-secure-boot --removable "/dev/$LOOP_DISK"
+ chroot "$MNTPOINT" grub-install --target=i386-pc "/dev/$LOOP_DISK"
+ else
+ if ! chroot "${MNTPOINT}" dpkg --list grub-efi-amd64-signed 2>/dev/null | grep -q '^ii' ; then
+ echo "Notice: grub-efi-amd64-signed package not present yet, installing it therefore."
+ # shellcheck disable=SC2086
+ DEBIAN_FRONTEND=$DEBIAN_FRONTEND chroot "$MNTPOINT" apt-get -y --no-install-recommends install $DPKG_OPTIONS grub-efi-amd64-bin grub-efi-amd64-signed
+ fi
+ chroot "$MNTPOINT" grub-install --target=x86_64-efi --efi-directory=/boot/efi --uefi-secure-boot --removable "/dev/$LOOP_DISK"
+ chroot "$MNTPOINT" grub-install --target=i386-pc "/dev/$LOOP_DISK"
+ fi
+ else
+ dd if="${MNTPOINT}/usr/lib/grub/i386-pc/boot.img" of="${ORIG_TARGET}" conv=notrunc bs=440 count=1
+ case "${_opt_filesystem}" in
+ f2fs)
+ chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos f2fs
+ ;;
+ xfs)
+ chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos xfs
+ ;;
+ # NOTE - we might need to distinguish between further filesystems
+ *)
+ chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos ext2
+ ;;
+ esac
+
+ dd if="${MNTPOINT}/tmp/core.img" of="${ORIG_TARGET}" conv=notrunc seek=1
+ rm -f "${MNTPOINT}/tmp/core.img"
+ fi
+ fi
+
+ # workaround for Debian bug #918590 with lvm + udev:
+ # WARNING: Device /dev/... not initialized in udev database even after waiting 10000000 microseconds
+ if [ -d /run/udev ] ; then
+ einfo "Setting up bind-mount /run/udev"
+ mkdir -p "${MNTPOINT}"/run/udev
+ mount --bind /run/udev "${MNTPOINT}"/run/udev
+ fi
+
+ if [ -n "${BOOT_APPEND}" ] ; then
+ echo "Adding BOOT_APPEND configuration ['${BOOT_APPEND}'] to /etc/default/grub."
+ sed -i "/GRUB_CMDLINE_LINUX_DEFAULT/ s#\"\$# ${BOOT_APPEND}\"#" "${MNTPOINT}/etc/default/grub"
+ fi
+
+ einfo "Updating grub configuration file."
+ chroot "${MNTPOINT}" update-grub
+ chroot "${MNTPOINT}" sync
+
+ case "$RELEASE" in
+ jessie)
+ einfo "Applying workaround for GRUB font path bug in jessie (Debian #787685)."
+ mkdir -p "${MNTPOINT}/boot/grub/fonts/"
+ cp "${MNTPOINT}/usr/share/grub/unicode.pf2" "${MNTPOINT}/boot/grub/fonts/"
+ ;;
+ esac
+
+ if grep -q '^GRUB_DISABLE_LINUX_UUID=.*true' "${MNTPOINT}"/etc/default/grub 2>/dev/null ; then
+ ewarn "GRUB_DISABLE_LINUX_UUID is set to true in /etc/default/grub, not adjusting root= in grub.cfg."
+ ewarn "Please note that your system might NOT be able to properly boot."
+ elif [ -z "$ARM_EFI_TARGET" ]; then
+ einfo "Adjusting grub.cfg for successful boot sequence."
+ sed -i "s;root=[^ ]\\+;root=UUID=$TARGET_UUID;" "${MNTPOINT}"/boot/grub/grub.cfg
+ fi
+
+ # workaround for Debian bug #918590 with lvm + udev:
+ # WARNING: Device /dev/... not initialized in udev database even after waiting 10000000 microseconds
+ if mountpoint "${MNTPOINT}"/run/udev &>/dev/null ; then
+ einfo "Unmounting bind-mount /run/udev"
+ umount "${MNTPOINT}"/run/udev
+ fi
+
+ umount "${MNTPOINT}"/proc
+ umount "${MNTPOINT}"/sys
+ umount "${MNTPOINT}"/dev/pts
+ try_umount 3 "${MNTPOINT}"/dev
+
+ if findmnt "${MNTPOINT}"/boot/efi &>/dev/null ; then
+ umount "${MNTPOINT}"/boot/efi
+ fi