Results 1 to 8 of 8

Thread: How do I repair a corrupt sd card.

  1. #1

    Default How do I repair a corrupt sd card.

    I have an sd card for my dashcam that is corrupt.
    It had video clips on, I tried to delete the clips but it wouldn't.
    I then tried to format it but it still wouldn't de;ete the clips.
    I then connected it to a usd adapter & tried following instructions which I have used to recover a usb before.

    Code:
    How to recover the USB stick for "normal" use again
    
     After system installation, you may want to reuse the stick as you  would normally to write things on it. In that case you have to reformat  it. Often people complain that Windows fails to do it. 
    Typically, you would simply start fdisk: 
       # fdisk /dev/sdX
    and select: 
       o   create a new empty DOS partition table
    and then: 
       n   add a new partition
    (primary, number 1, default size to use the entire device) 
       t   change a partition's system id
    Use type 6, FAT16 
       w   write table to disk and exit
    Finally: 
       # mkfs.msdos -n SOME_NAME /dev/sdX1
    This last step is necessary, particularly the -n SOME_NAME, or the USB stick will mount with the iso name.
    Now if I run [code] fdisk -l [/code I can't see the sd card
    Opensuse 15.3

  2. #2

    Default Re: How do I repair a corrupt sd card.

    The sd card was formatted in fat format
    Opensuse 15.3

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,352
    Blog Entries
    15

    Default Re: How do I repair a corrupt sd card.

    Quote Originally Posted by Hermes14 View Post
    The sd card was formatted in fat format
    Hi
    I use the wipefs command to make sure it's all cleared out.... when you plug the device in, can you see it via the command;
    Code:
    lsblk
    Is it sdX or mmcxxx?

    If it's say sdc, then I would use the command;
    Code:
    wipefs -a /dev/sdc
    No partition number and this should clear out any filesystem remnants for you to use fdisk and create a new partition to format.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  4. #4

    Default Re: How do I repair a corrupt sd card.

    Previously it was
    Code:
    sdb
    Could it have changed to sr0 or is my pc not picking it up?

    Code:
    linux-ano2:/home/terri # lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 465.8G  0 disk 
    ├─sda1   8:1    0     6G  0 part [SWAP]
    ├─sda2   8:2    0    50G  0 part 
    ├─sda3   8:3    0     1K  0 part 
    ├─sda4   8:4    0 319.8G  0 part /home
    ├─sda5   8:5    0    36G  0 part 
    ├─sda6   8:6    0   390K  0 part 
    └─sda7   8:7    0    40G  0 part /
    sr0     11:0    1  1024M  0 rom
    Opensuse 15.3

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,352
    Blog Entries
    15

    Default Re: How do I repair a corrupt sd card.

    On Tue 08 May 2018 04:26:03 PM CDT, Hermes14 wrote:

    Previously it was
    Code:
    --------------------
    sdb
    --------------------

    Could it have changed to sr0 or is my pc not picking it up?


    Code:
    --------------------
    linux-ano2:/home/terri # lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 465.8G 0 disk
    ├─sda1 8:1 0 6G 0 part [SWAP]
    ├─sda2 8:2 0 50G 0 part
    ├─sda3 8:3 0 1K 0 part
    ├─sda4 8:4 0 319.8G 0 part /home
    ├─sda5 8:5 0 36G 0 part
    ├─sda6 8:6 0 390K 0 part
    └─sda7 8:7 0 40G 0 part /
    sr0 11:0 1 1024M 0 rom

    --------------------


    Hi
    It's not detecting it.... maybe it died....? Is the card reader
    internal or external?

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SLES 15 RC4 | GNOME Shell 3.26.2 | 4.12.14-18-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  6. #6

    Default Re: How do I repair a corrupt sd card.

    it's not detecting it.... maybe it died....? Is the card reader
    internal or external?
    External that connects to a usb port.
    I have checked it with another sd card & it works.

    This is another sd card
    Code:
    linux-ano2:/home/terri # lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 465.8G  0 disk 
    ├─sda1   8:1    0     6G  0 part [SWAP]
    ├─sda2   8:2    0    50G  0 part 
    ├─sda3   8:3    0     1K  0 part 
    ├─sda4   8:4    0 319.8G  0 part /home
    ├─sda5   8:5    0    36G  0 part 
    ├─sda6   8:6    0   390K  0 part 
    └─sda7   8:7    0    40G  0 part /
    sdc      8:32   1  58.9G  0 disk 
    └─sdc1   8:33   1  58.9G  0 part /run/media/terri/VOLUME1
    sr0     11:0    1  1024M  0 rom
    I was hoping I could fix it because it is a 64gb card which are fairly expensive in South Africa
    Maybe it is better to just replace it
    Thanks
    Opensuse 15.3

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,352
    Blog Entries
    15

    Default Re: How do I repair a corrupt sd card.

    Quote Originally Posted by Hermes14 View Post
    External that connects to a usb port.
    I have checked it with another sd card & it works.

    This is another sd card
    Code:
    linux-ano2:/home/terri # lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 465.8G  0 disk 
    ├─sda1   8:1    0     6G  0 part [SWAP]
    ├─sda2   8:2    0    50G  0 part 
    ├─sda3   8:3    0     1K  0 part 
    ├─sda4   8:4    0 319.8G  0 part /home
    ├─sda5   8:5    0    36G  0 part 
    ├─sda6   8:6    0   390K  0 part 
    └─sda7   8:7    0    40G  0 part /
    sdc      8:32   1  58.9G  0 disk 
    └─sdc1   8:33   1  58.9G  0 part /run/media/terri/VOLUME1
    sr0     11:0    1  1024M  0 rom
    I was hoping I could fix it because it is a 64gb card which are fairly expensive in South Africa
    Maybe it is better to just replace it
    Thanks
    Hi
    Well try the reader in a different computer or USB port with the working card and the suspect one, else it sounds like it's died
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,589

    Cool Re: How do I repair a corrupt sd card.

    Quote Originally Posted by Hermes14 View Post
    I was hoping I could fix it because it is a 64gb card which are fairly expensive in South Africa
    If it's a 64 GB SD card then, it's exFAT -- « Meaning, Redmond licensing issues and, for Linux a 'difficult' driver … »

    The only solution I can suggest is:
    • Use either Redmond's 10th operating system or, a recent Apple MAC, to reformat the exFAT SD Card.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •