From 650f9369a0557992a09ffc8d798a81975f251ed0 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Tue, 15 Dec 2020 16:05:12 +0100 Subject: [PATCH] Add sleep 2 after parted command --- debian/chroot.install | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/chroot.install b/debian/chroot.install index bba9bf7..39a110c 100755 --- a/debian/chroot.install +++ b/debian/chroot.install @@ -55,11 +55,11 @@ apt install -y coreutils debootstrap e2fsprogs gawk ipcalc lvm2 thin-provisionin # }}} # Partitionning {{{ if [ "${manage_part}" -eq 0 ]; then - ## Remove all old partitions + ## Remove all old partitions {{{ for part_number in 1 2 3 4 5 6 7 8; do [ -b "${hdd}""${part_number}" ] && parted "${hdd}" rm "${part_number}" done - + ## }}} ## Recreate partition (/boot and LV) {{{ ### Partition type parted "${hdd}" mklabel msdos || exit 1 @@ -68,17 +68,20 @@ if [ "${manage_part}" -eq 0 ]; then ### /boot parted "${hdd}" mkpart primary 0% 512MB || exit 1 parted "${hdd}" set 1 boot on + sleep 2 mkfs.ext3 -F -L boot -- "${hdd}"1 || exit 4 ### LV root_part_id="2" parted "${hdd}" mkpart primary 512MB 100% || exit 1 parted "${hdd}" set "${root_part_id}" lvm on + sleep 2 else ### LV root_part_id="1" parted "${hdd}" mkpart primary 0% 100% || exit 1 parted "${hdd}" set "${root_part_id}" lvm on + sleep 2 fi if [ "${manage_luks}" -eq 0 ]; then @@ -114,7 +117,7 @@ if [ "${manage_part}" -eq 0 ]; then [ ! -b /dev/mapper/"${vgname}"-swap ] && lvcreate -n swap -L 4g "${vgname}" ## }}} ## Format Logical Volumes {{{ -### Format LVs in ext4 + ### Format LVs in ext4 cd -- /dev/"${vgname}" || exit 1 for lvname in *; do mkfs.ext4 -F -L "${lvname}" -- "${lvname}" || exit 4 @@ -130,8 +133,8 @@ if [ "${manage_part}" -eq 0 ]; then ### And format the swap mkswap -L sw01 -- /dev/mapper/"${vgname}"-swap || exit 4 ## }}} - fi + # }}} # Debootstrap {{{ ## Create and mount the system {{{