Browse Source

added partprobe before mkfs

Toastie 6 months ago
parent
commit
523975010b
1 changed files with 8 additions and 2 deletions
  1. 8 2
      bootstrap-bookworm.sh

+ 8 - 2
bootstrap-bookworm.sh

@@ -78,8 +78,11 @@ then
   # Prepare disks with a single partition
   parted $disk --script \
   mklabel msdos \
-  mkpart primary ext4 512M 100% toggle 1 boot
-  fdisk -l $disk
+  mkpart primary ext4 512M 100% toggle 1 boot \
+  print
+  
+  # Inform OS about partition table change
+  partprobe $disk --summary
 
   # Format disks -- pkg: e2fsprogs dosfstools and to file system check
   mkfs.ext4 $disk1 && e2fsck $disk1
@@ -105,6 +108,9 @@ then
   unit MiB                                           \
   print
   
+  # Inform OS about partition table change
+  partprobe $disk --summary
+  
   # Format disks -- pkg: e2fsprogs dosfstools and to file system check
   mkfs.fat  -F 32 -n EFIBOOT $disk0 && fsck $disk0
   mkfs.ext4 $disk1 && fsck $disk1