Can't wipe partition table after messing with dd
0
votes
1
answer
3301
views
Context:
Today I was trying to figure out how to install NixOS live usb with a writeable filesystem (
The disk utility sees the second partition but is unable to remove it or to format the entire drive.
My windows machine doesn't see the pendrive at all.
I also have tried
dd
-ing the iso results in read-only iso9660 fs).
I split my usb into two partitions, one empty and one formatted to ext4. I ran something like dd if=(nixos image).iso of=/dev/sdb1
. Then I realized that it probably won't work so I opened gparted to delete everything and try something else.
This is where I noticed that something strange is happening: gparted said that my 32GB pendrive has only about 1,4GB (size of first partition). It seems that /dev/sdb
is the same thing as /dev/sdb1
now.


wipefs /dev/sdb
How can I bring my pendrive back to usable state?
**Update:**
The problem is gone after restarting (now i'm embarrassed that I didn't try this earlier). I can't find a way to reproduce it. One thing I forgot to mention is that I've also mounted the iso as a loop device but I later unmounted it. As you can see on the gnome-disks
screenshot a loop device was still there, but I'm not sure if it was pointing to the iso or to the first partition on pendrive. So perhaps the loop mount somehow interfered with accessing /dev/sdb
?
Just to clarify, I have tried zeroing the entire drive as well as just the first megabyte. This didn't work because /dev/sdb
was _not_ pointing to what it should(at least that's my interpretation).
Asked by anonymous-ish
(1 rep)
Jun 9, 2018, 09:00 PM
Last activity: May 11, 2025, 07:03 AM
Last activity: May 11, 2025, 07:03 AM