added -P option to losetup

this fixes an issue that appeared on WSL2 recently(ish)
This commit is contained in:
2024-09-21 12:04:05 -04:00
parent 2a1b0f3b09
commit e859f5da13

View File

@@ -47,7 +47,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if [ -e $mbr_file ] && [ -e $vbr_file ]; then if [ -e $mbr_file ] && [ -e $vbr_file ]; then
# get next loop device and mount it # get next loop device and mount it
ld=$(losetup -f) ld=$(losetup -f)
losetup -b 512 $ld disk.img losetup -P -b 512 $ld disk.img
# create a DOS disk, with 1 FAT32 partition that is bootable, part1 starts at sector 2048 # create a DOS disk, with 1 FAT32 partition that is bootable, part1 starts at sector 2048
sfdisk $ld < scripts/loop_setup.sfdisk sfdisk $ld < scripts/loop_setup.sfdisk