One of three things could be happening here (I'm not too familiar with Raspian):
The SD card is interfering with the boot sequence
It's possible that for some reason the boot process is picking up the partitions/files on the SD card and causing it to fail booting, try simply removing the SD card and reboot. I believe that should do the trick, if not you might have some trouble.
You fried your partition
If that command that you have above is the actual command you used, there shouldn't have been a problem. However, if you instead typed something along the lines of of=/dev/sdX#
or of=/dev/sdX
, then that would have friend the beginning of the partition number # or the beginning of the disk respectively.
If you did, in fact, somehow manage to fry your partition, then there's really not a lot you can do to recover the data aside from using a tool like testdisk
(which may or may not work depending on whether all backup superblocks were wiped) or, worst case, scalpel
to recover the files. Otherwise, simply reformat and try again.
dd
can potentially be a very destructive program. It has no warnings that would tell you "Hey buddy, are you really sure you want to do this? It's probably a bad idea" -- it just goes. Therefore, you need to be sure that the command you type is the command you really want. For example, you might ensure that /dev/mmcblk is the correct device by first mounting the SD card (or a partition on it) and then finding the device listed in the mount
command. However, from the command you typed it should have worked as expected...
There is an error in the boot sequence
I've seen this happen while creating custom ISOs and it tends to happen when the root filesystem can't be found (or it's corrupted). If you have a separate /home partition, then there still may be problem with with the root partition while your /home partition remained untouched.
As described here, remove the kernel options quiet
and splash
and append the kernel option debug
while in GRUB (the bootloader). To do this, press E while you have a boot option selected. Once the line is edited, press Ctrl+X to boot.
This will write a /tmp/initramfs.debug file. After the system fails to boot, you can then use the httpd
command to allow another computer to access the filesystem via a browser, or you can simply reboot with a LiveCD and examine the file. What you may be looking for is a line that says something similar to "Unable to find root partition."
It is also possible that the root filesystem is corrupt and needs to be fixed with a filesystem check. In order to do this, first boot from a LiveCD/USB.
- Open a console
- Find the partition in question using
gparted-pkexec
. If you suddenly have a big block of free space on your drive, it's very possible that the root partition got overwritten and may not be recoverable. If that's not the case, continue to step 3.
e2fsck -p /dev/sdX#
(where /dev/sdX# is the device and partition of your root filesystem (possibly /dev/sda4 or /dev/sda5, but you you'll want to verify that with gparted-pkexec
from the LiveCD/USB)