You are not logged in.
Pages: 1
At: https://wiki.archlinux.org/index.php/US … _USB_drive
It clearly reads that with:
dd count=1 bs=512 if=/dev/zero of=/dev/sdx && sync
the media will be restore to it's full capacity after creating a new partition table. But, when USB flash drive media is prepared with dd to boot Arch Linux liveCD, a GPT is created. The previous code is for MBR, so I did the following to clear GPT:
BLOCKS=$(cat /sys/block/sdb/size)
dd if=/dev/zero of=/dev/sdb bs=512 count=34
dd if=/dev/zero of=/dev/sdb bs=512 count=34 seek=$((${BLOCKS}-34))
But some GPT information remains in the media.
What do you recommend to clear GPT information without wiping the flash drive, just with dd and no other tool?
Last edited by 103 (2014-01-10 16:28:52)
Offline
Use GParted to re-format the drive to whatever filesystem you like.
I don't understand "without wiping the drive". You will have to change the partition table which means the drive will be wiped.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
This command:
dd count=1 bs=512 if=/dev/zero of=/dev/sdx && sync
just removes the partitions, bootstrap and signature when MBR partitioning is used, so no need to erase every device block. That is what I'm asking for. I just want to remove/clear GPT information. And I prefer to use dd.
Regards
Last edited by 103 (2014-01-10 21:03:30)
Offline
This command:
dd count=1 bs=512 if=/dev/zero of=/dev/sdx && sync
just removes the partitions, bootstrap and signature when MBR partitioning is used, so no need to erase every device block. That is what I'm asking for. I just want to remove/clear GPT information. And I prefer to use dd.
Regards
sgdisk --zap-all /dev/sdx
Offline
sgdisk --zap-all /dev/sdx
Thanks, that worked flawlessly but, no way doing this using dd?
Why dd? I like it and portability.
Offline
Pages: 1