mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add force to mdadm cleaning
This commit is contained in:
parent
bf321c0011
commit
7073e47329
1 changed files with 2 additions and 2 deletions
|
@ -556,14 +556,14 @@ _stopmd()
|
||||||
if [[ "${DISABLEMD}" = "1" ]]; then
|
if [[ "${DISABLEMD}" = "1" ]]; then
|
||||||
DIALOG --infobox "Disabling all software raid devices..." 0 0
|
DIALOG --infobox "Disabling all software raid devices..." 0 0
|
||||||
for i in $(grep ^md /proc/mdstat | sed -e 's# :.*##g'); do
|
for i in $(grep ^md /proc/mdstat | sed -e 's# :.*##g'); do
|
||||||
wipefs -a "${i}" > ${LOG}
|
wipefs -a --force "${i}" > ${LOG}
|
||||||
mdadm --manage --stop "/dev/${i}" > ${LOG}
|
mdadm --manage --stop "/dev/${i}" > ${LOG}
|
||||||
done
|
done
|
||||||
DIALOG --infobox "Cleaning superblocks of all software raid devices..." 0 0
|
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
|
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.
|
# clear all magic strings/signatures - mdadm, lvm, partition tables etc.
|
||||||
sgdisk --zap "${i}" > ${LOG}
|
sgdisk --zap "${i}" > ${LOG}
|
||||||
wipefs -a "${i}" > ${LOG}
|
wipefs -a --force "${i}" > ${LOG}
|
||||||
dd if=/dev/zero of="${i}" bs=512 count=2048 > ${LOG}
|
dd if=/dev/zero of="${i}" bs=512 count=2048 > ${LOG}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue