1

I recently formatted my SD card after installing android image for raspberry pi on it. After formatting the SD card is not getting listed in fdisk. I did dmesg and gave me the following result:

[29329.965881] mmc0: new ultra high speed SDR50 SDHC card at address aaaa
[29329.968812] mmcblk0: mmc0:aaaa JULIE 29.7 GiB 
[29329.977085]  mmcblk0: p1
[29330.280006] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

then i ran fsck, gave me this output:

fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/mmcblk0

    The superblock could not be read or does not describe a valid ext2/ext3/ext4
    filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
    filesystem (and not swap or ufs or something else), then the superblock
    is corrupt, and you might try running e2fsck with an alternate superblock:
        e2fsck -b 8193 <device>
     or
        e2fsck -b 32768 <device>

I ran fdisk and the output was following:

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 5ED03E36-159D-481F-BFFF-FB1F690C6077

Device         Start       End   Sectors   Size Type
/dev/sda1       2048   1050623   1048576   512M EFI System
/dev/sda2  781461504 898648063 117186560  55.9G Linux swap
/dev/sda3    1050624 781461503 780410880 372.1G Linux filesystem

Partition table entries are not in disk order.

I want to write another image to it using etcher. But etcher checks only /dev hence it's not reading the card. Hence not able to proceed with burn.

The sd-card is getting loaded in /media. Which before it incurred problems wad loaded up in /dev. Even though its getting loaded in media i'm able to copy files and make changes to it. What can be done to make it work like it was before.

EDIT

output of mount | grep media:

/dev/mmcblk0p1 on /media/mi07/E type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
  • Your SD card gets mounted in /nedia, it's device file is created in /dev ... What are the output of mount | grep media ? – Soren A Jun 18 '18 at 12:22
  • @SorenA I have updated that in the question. – Midhun Jun 18 '18 at 12:25
  • What was the device you ran fsck against, /dev/mmcblk0 or /dev/mmcblk0p1? – doneal24 Jun 18 '18 at 12:27
  • @Doug O'Neal it was /dev/mmcblk0 – Midhun Jun 18 '18 at 12:30
0

First run the proper fsck

sudo umount /dev/mmcblk0p1
sudo fsck.fat -V /dev/mmcblk0p1
sudo fsck.fat -a /dev/mmcblk0p1

if this does not work, try fsck.vfat insteed of fsck.fat

At last
You do not need Etcher to 'burn' a new drive image on the sd card. You may launch a command like this:

sudo dd if=/path/to/image.img of=/dev/mmcblk0 bs=1M conv=notrunc
  • When using dd, be careful not to overwrite your own hard disk! – Nonny Moose Jun 18 '18 at 18:13
  • You can identify mass storage devices with this command lsblk | grep -v loop – cmak.fr Jun 18 '18 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.