From: Anthony PERARD Date: Wed, 11 Oct 2023 11:02:55 +0000 (+0000) Subject: preseed_create: osstest-erase-other-disks: workaround creating /dev/sdXD files X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d623f7271cdfd80449e3cb3c5be8184fccba899f;p=osstest.git preseed_create: osstest-erase-other-disks: workaround creating /dev/sdXD files Sometime, it can happen that the erase-other-disks script fails and indicate that /dev/sda1 isn't a block device anymore. This happened when /dev/sda was erased before /dev/sda1. So to avoid this, we will zero the partitions of ${disk} first, and hopefully the error won't happen again. Signed-off-by: Anthony PERARD Acked-by: Roger Pau Monné --- diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 7d6f977..36c0555 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -1305,7 +1305,7 @@ for sd in sd hd; do udevadm settle log "\${sd} devices present after: `echo /dev/\${sd}*`" done -for dev in ${disk}*; do +for dev in ${disk}?* ${disk}*; do zero done echo ===