From: Dobrica Pavlinusic Date: Mon, 10 May 2021 09:17:02 +0000 (+0200) Subject: wipe beginning so that grub-install doesn't complain X-Git-Url: http://git.rot13.org/?p=gnt-info;a=commitdiff_plain;h=aa6e5966a10a13acad0c86ae11b65a2544910d51 wipe beginning so that grub-install doesn't complain --- 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