Skip to content

Commit

Permalink
pi/common: partprobe needs to run as root
Browse files Browse the repository at this point in the history
Signed-off-by: Luis Banuelos <[email protected]>
Reviewed-by: Christian Stewart <[email protected]>
  • Loading branch information
luisbc92 authored and paralin committed May 1, 2021
1 parent c7eda8f commit c37a8d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions configs/pi/common/scripts/format_sd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ echo "Making persist partition..."
sudo parted -a optimal $PI_SD -- mkpart primary ext4 700MiB "-1s"

echo "Waiting for partprobe..."
partprobe $PI_SD || true
sudo partprobe $PI_SD || true
sleep 2
partprobe $PI_SD || true
sudo partprobe $PI_SD || true

echo "Formatting rootfs partition..."
mkfs.ext4 -F -L "rootfs" -O ^64bit ${PI_SD_SFX}2
Expand All @@ -69,4 +69,4 @@ mkfs.vfat -n BOOT -F 32 ${PI_SD_SFX}1
echo "Formatting persist partition..."
mkfs.ext4 -F -L "persist" -O ^64bit ${PI_SD_SFX}3

partprobe $PI_SD || true
sudo partprobe $PI_SD || true

0 comments on commit c37a8d1

Please sign in to comment.