From aa6e5966a10a13acad0c86ae11b65a2544910d51 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Mon, 10 May 2021 11:17:02 +0200 Subject: [PATCH] wipe beginning so that grub-install doesn't complain --- lv-insert-part.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lv-insert-part.sh b/lv-insert-part.sh index 1911ed2..7941c24 100755 --- a/lv-insert-part.sh +++ b/lv-insert-part.sh @@ -7,6 +7,9 @@ test -z "$1" || test ! -e "$1" && echo "Usage: $0 /path/to/lv" && exit 1 lvs --noheadings -o vg_name,name,lv_size $1 | tee /dev/stderr | while read vg_name name lv_size ; do lvcreate -s -L $lv_size -n ${name}.snap /dev/$vg_name/$name + # wipe beginning so that grub-install doesn't complain + dd if=/dev/zero of=/dev/$vg_name/$name bs=1 count=2048 + # create partition echo '2048,+,L,*' | sfdisk --no-reread /dev/$vg_name/$name -- 2.20.1