← Back to team overview

fuel-dev team mailing list archive

cleaning partition table

 

Hi all,

I have 2 cents to add in pre-script in a kickstart file.
Instead of using dd if=/dev/zero of=/dev/sda bs=1M count=10
we can use the following commands:
# sgdisk --zap-all /dev/sda
# parted -s /dev/sda mklabel gpt

from man sgdisk: Zap (destroy) the GPT and MBR data structures and then
exit. This option works much like -z, but as it wipes the MBR as well as
the GPT, it's more suitable if you want to  repartition a disk after using
this option

from man parted: mklabel Create a new disklabel (partition table) of
label-type.
Thank you.

Best Regards,
Aleksandr Dobdin.

Follow ups