1

If I run the following command on Ubuntu 14.10:

sudo dd if=/dev/zero of=/dev/sdb bs=1M count=100

It effectively erases my SD card.

If I run the exact same command on Ubuntu 16.10 (or 16.04), nothing happens. I've tried it on two different Ubuntu 16 machines. Literally nothing happens. I see the same dd output, but when I unplug and plug the SD card back in all the folders are still there, the partition is still there, everything.

Does anyone have insights as to how this could happen?

Edit:

As per request:

user@cobalt:~/Desktop$ sudo parted /dev/sdb print
Model: Generic- SD Card (scsi)
Disk /dev/sdb: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  7948MB  7947MB  primary  ext4
  • 5
    First of all, both 14.10 and 16.10 are no longer supported. You should switch to supported releases like 14.04 LTS, 16.04 LTS or 17.04. Second, have you verified that /dev/sdb really corresponds to your SD card in the second case? Otherwise you might have accidentally overwritten your secondary hard disk or something like that. – Byte Commander Aug 9 '17 at 23:03
  • 2
    To backup @ByteCommander second point, you should always run lsblk or something similar to ensure your SD Card is mounted at the location you expect. – WinEunuuchs2Unix Aug 10 '17 at 1:10
  • @ByteCommander I'll check whether it happens in 16.04 or not, but it definitely works in 14. Yes, I have verified that /dev/sdb really corresponds to my SD card. Here, I'll prove it: imgur.com/a/95YP1 – Gillespie Aug 10 '17 at 15:13
  • 1
    @ByteCommander I've confirmed this issue is also present in 16.04 – Gillespie Aug 10 '17 at 15:31
  • 2
    @ByteCommander I figured it out. The card reader I am using has an internal plastic notch that flips a write protection switch on the side of the SD card when I insert it and unswitches write protection when I remove the card. Ubuntu 14 seems to completely ignore that switch on the side of the SD card, while Ubuntu 16 respects it. I filed off the notch so the reader doesn't flip it anymore and it seems to be working now. – Gillespie Aug 10 '17 at 15:54

Browse other questions tagged or ask your own question.