Tuesday, June 6, 2017

Deleting all partitions when Gparted is stuck

Deleting all partitions when Gparted is stuck


Possible problem, here.

A longer discussion, here.

I noticed that "Disks" (`gnome-disk-utility, available in sources, default in Unity) was not only able to see the correct situation of the partitions, but also to create (backup) and restore disk images.


sudo apt-get install gnome-disk-utility

The command

 sudo dd if=/dev/zero of=/dev/sda bs=1M

 wipes the entire disk, not only the partition table. (tested)

To only wipe the partition table and Master Boot Record do

sudo dd if=/dev/zero of=/dev/sda bs=512 count=1



to see the progress of this, I opened a separate terminal window and did
watch -n5 sudo kill -USR1 `pgrep ^dd`
which every 5 secs reports the progress in the initial terminal window (source)
245423407104 bytes (245 GB) copied, 3430.82 s, 71.5 MB/s
234354+0 records in
234354+0 records out
245737979904 bytes (246 GB) copied, 3435.84 s, 71.5 MB/s
234655+0 records in
234655+0 records out
246053601280 bytes (246 GB) copied, 3440.88 s, 71.5 MB/s
234956+0 records in
234956+0 records out
246369222656 bytes (246 GB) copied, 3445.91 s, 71.5 MB/s

... it took 2 hours and thirty minutes for a 500GB HDD on a 4-year average laptop with 4GB ram.

After that use Gparted and create a new partition table and partition(s).


download more info

No comments:

Post a Comment