Ubuntu: How to properly erase drive and start over after pv glitch?



Question:

I installed pv so I could check progress of a usb installation, and I began the process with sudo dd if= | pv | of=/dev/sdb.

Well, it's supposed to ask me for my sudo password, but when I pressed Enter, it started showing progress before I could enter the password. I went ahead and attempted to type the password, but it was mixed in with the progress text. So, then I decided to do Ctrl+C to stop it.

My question is: Can I just do "sudo dd if=/dev/urandom of=/dev/sdb" to erase any data and start over? I JUST bought this drive today, so this is frustrating. I'm definitely not doing that again.

Thanks.


Solution:1

If you will be writing another image onto it (Using dd or the graphical USB image writer included in Ubuntu, or some other tool), there is no need to erase anything first, just start over and write the new image directly onto it.

If you want to use it to store files, you can format it using the graphical "Disks" utility, again no need to erase anything first.

However, overwriting the contents with sudo dd if=/dev/urandom of=/dev/sdb won't do any harm either, although i'd recommend using if=/dev/zero, since it may be faster.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »