From 506b43a35eb07e65feb3f5e6ae599c7f7ffb002a Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Fri, 8 Apr 2022 16:06:28 +0200 Subject: [PATCH] _umountall before any action is taken in stop storage part --- usr/lib/archboot/installer/blockdevices.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr/lib/archboot/installer/blockdevices.sh b/usr/lib/archboot/installer/blockdevices.sh index 82c968a50..d3bf6f8c2 100644 --- a/usr/lib/archboot/installer/blockdevices.sh +++ b/usr/lib/archboot/installer/blockdevices.sh @@ -409,6 +409,7 @@ _stopmd() DISABLEMD="" DIALOG --defaultno --yesno "Setup detected already running raid devices, do you want to disable them completely?" 0 0 && DISABLEMD="1" if [[ "${DISABLEMD}" = "1" ]]; then + _umountall DIALOG --infobox "Disabling all software raid devices..." 0 0 # shellcheck disable=SC2013 for i in $(grep ^md /proc/mdstat | sed -e 's# :.*##g'); do @@ -429,6 +430,7 @@ _stopmd() if ${_LSBLK} FSTYPE | grep -q "linux_raid_member"; then DIALOG --defaultno --yesno "Setup detected superblock of raid devices, do you want to clean the superblock of them?" 0 0 && DISABLEMDSB="1" if [[ "${DISABLEMDSB}" = "1" ]]; then + _umountall DIALOG --infobox "Cleaning superblocks of all software raid devices..." 0 0 for i in $(${_LSBLK} NAME,FSTYPE | grep "linux_raid_member$" | cut -d' ' -f 1); do # clear all magic strings/signatures - mdadm, lvm, partition tables etc. @@ -455,6 +457,7 @@ _stoplvm() DIALOG --defaultno --yesno "Setup detected lvm volumes, volume groups or physical devices, do you want to remove them completely?" 0 0 && DISABLELVM="1" fi if [[ "${DISABLELVM}" = "1" ]]; then + _umountall DIALOG --infobox "Removing logical volumes ..." 0 0 for i in ${LV_VOLUMES}; do lvremove -f "/dev/mapper/${i}" 2>/dev/null> "${LOG}" @@ -484,6 +487,7 @@ _stopluks() DIALOG --defaultno --yesno "Setup detected running luks encrypted devices, do you want to remove them completely?" 0 0 && DISABLELUKS="1" fi if [[ "${DISABLELUKS}" = "1" ]]; then + _umountall DIALOG --infobox "Removing luks encrypted devices ..." 0 0 for i in ${LUKSDEVICE}; do LUKS_REAL_DEVICE="$(${_LSBLK} NAME,FSTYPE -s "${LUKSDEVICE}" | grep " crypto_LUKS$" | cut -d' ' -f1)"