Merge "Clear GPT and MBR data structures on disk before imaging"
This commit is contained in:
commit
3bcda73ca0
@ -35,8 +35,8 @@ DEVICE="$2"
|
||||
|
||||
# In production this will be replaced with secure erasing the drives
|
||||
# For now we need to ensure there aren't any old (GPT) partitions on the drive
|
||||
log "Erasing existing mbr from ${DEVICE}"
|
||||
dd if=/dev/zero of=$DEVICE bs=512 count=10
|
||||
log "Erasing existing GPT and MBR data structures from ${DEVICE}"
|
||||
sgdisk -Z $DEVICE
|
||||
|
||||
log "Imaging $IMAGEFILE to $DEVICE"
|
||||
qemu-img convert -t directsync -O host_device $IMAGEFILE $DEVICE
|
||||
|
Loading…
Reference in New Issue
Block a user