Full cat /proc/partitions + lsblk + fdisk -l output is here: http://pastebin.com/jYCCmwsU
I just bought my new class10 16GB SDCard and I started to restore the Raspbian system for the Raspberry with this command:
sudo dd bs=4M if=~/raspbian.img of=/dev/sdb
I accidentally pressed and ejected the SDCard physically after a few seconds. Since then, I experience the following:
- The size of raspbian.img is 14.9 GB
- The size of sdb is shown as 1.91 GB in KDE partition manager
- First sector: 34
- Last sector: 4 012 526
- Number of sectors: 4 012 493
The SDCard is "unknown media" in Kubuntu partition manager, but I can create GPT or MS-Dos partition table, BUT I can not create any file systems using the partition manager:
Create a new partition (1,91 GiB, ext3) on ‘/dev/sdb’ Job: Create new partition on device ‘/dev/sdb’ Create new partition ‘/dev/sdb1’: Success
Job: Create file system ‘ext3’ on partition ‘/dev/sdb1’ Command: mkfs.ext3 -q /dev/sdb1 Create file system ‘ext3’ on partition ‘/dev/sdb1’: Error Create a new partition (1,91 GiB, ext3) on ‘/dev/sdb’: Error
After this I can not create file system again, I have to delete the unknown first. If I connect this SD Card to the latest Windows 10 PC, it will freeze and GUI will crash.
Is there any mkfs / dd magic to write the inaccessible sectors?
Update1:
I tried this: dd if=/dev/zero of=/dev/sdb bs=1M count=1
Now the KDE partition manager in Linux shows 1 MB unknown device as sdb, and I can't even create a partition table.
I never seen anything like this, but sdb disappeared from fdisk and tons of /dev/ram appeared.
sudo fdisk -l:
Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Full cat /proc/partitions + lsblk + fdisk -l output is here: http://pastebin.com/jYCCmwsU
The raspbian.img is 14.9 GB: -rw-r--r-- 1 root root 16009658368 sept 12 18:56 raspbian.img
Update 2:
I still can't write the 14.9 GB iso into the 16GB card: dd will still stop where I accidentally ejected the card
zs@deneb:~$ sudo dd bs=1M if=~/raspbian.img of=/dev/sdb
dd: error writing ‘/dev/sdb’: No space left on device
1960+0 records in
1959+0 records out
2054430720 bytes (2,1 GB) copied, 34,2516 s, 60,0 MB/s
zs@deneb:~$
dd if=/dev/zero of=/dev/sdb
and start over?dd
,/dev/sdb
would have continued to exist. If you promptly reinserted it, it would now be/dev/sdc
, If you then tried writing to/dev/sdb
, you would wind up making a file. This could easily give you the "No space left on device" error, and might look like a fake sd card. So, any time you insert media, identify what its device is before trying to use it.