Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: [SOLVED] Check Disk on SD/MicroSD Card?

  1. #1
    Join Date
    Aug 2008
    Beans
    71
    Distro
    Ubuntu 8.04 Hardy Heron

    [SOLVED] Check Disk on SD/MicroSD Card?

    I have a microSD in my Blackberry that somehow got corrupted. My Blackberry says that I need to run a disc check for errors and try to fix them. I am not sure how to do this in Ubuntu (Ibex).

    Any help?

  2. #2
    Join Date
    Oct 2007
    Location
    Chennai, India
    Beans
    3,804
    Distro
    Ubuntu Development Release

    Re: Check Disk on SD/MicroSD Card?

    Quote Originally Posted by anxiousdog View Post
    I have a microSD in my Blackberry that somehow got corrupted. My Blackberry says that I need to run a disc check for errors and try to fix them. I am not sure how to do this in Ubuntu (Ibex).
    If the card is using FAT/FAT32/VFAT filesystem (Most likely), plug it into a card reader/writer, plug that into your Ubuntu system (or enable Disk / USB Mass Storage Device mode in the Blackberry, if such an option is available).

    Your card should now be visible on the desktop; right click it and unmount it.

    Open a terminal (Applications-Accessories-Terminal) and give the command
    Code:
    sudo fsck -a /dev/sdd1
    (Replace /dev/sdd1 with the actual partition device for the micro sd card). fsck = File Systen ChecKer.

    Note that there is a (small) chance that you can lose data by this; it _may_ delete corrupted file entries.

    If you have any doubts about which device or file type or so on, the following information (with the card plugged in) will be helpful for a quick response when you post back
    Code:
    sudo fdisk -l
    mount
    dmesg | tail -20
    If the fsck is successful, it will not return any output.

    Post back with more details (as above) if you have any questions.
    Cheers,PRShah
    Make your own: Ubuntu, Kubuntu, Xubuntu, Mythbuntu All-in-One Live DVD
    "I never make mistakes; I thought I did, once.. but I was wrong."

  3. #3
    Join Date
    Aug 2008
    Beans
    71
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Check Disk on SD/MicroSD Card?

    Thanks!

    This is the error I get with the fsck:

    anxiousdog@ubuntu1:~$ sudo fsck -a /dev/sdg
    fsck 1.41.3 (12-Oct-2008)
    fsck.ext2: Bad magic number in super-block while trying to open /dev/sdg
    /dev/sdg:
    The superblock could not be read or does not describe a correct ext2
    filesystem. If the device is valid and it really contains an ext2
    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>

  4. #4
    Join Date
    Oct 2007
    Location
    Chennai, India
    Beans
    3,804
    Distro
    Ubuntu Development Release

    Re: Check Disk on SD/MicroSD Card?

    Quote Originally Posted by anxiousdog View Post
    This is the error I get with the fsck:
    Try
    Code:
    sudo fsck -a /dev/sdg1
    Usually, the device will be /dev/sdg, and the partition /dev/sdg1.
    Cheers,PRShah
    Make your own: Ubuntu, Kubuntu, Xubuntu, Mythbuntu All-in-One Live DVD
    "I never make mistakes; I thought I did, once.. but I was wrong."

  5. #5
    Join Date
    Oct 2007
    Location
    Chennai, India
    Beans
    3,804
    Distro
    Ubuntu Development Release

    Re: Check Disk on SD/MicroSD Card?

    Quote Originally Posted by anxiousdog View Post
    This is the error I get with the fsck:
    Try
    Code:
    sudo fsck -a /dev/sdg1
    Usually, the device will be /dev/sdg, and the partition /dev/sdg1.
    Cheers,PRShah
    Make your own: Ubuntu, Kubuntu, Xubuntu, Mythbuntu All-in-One Live DVD
    "I never make mistakes; I thought I did, once.. but I was wrong."

  6. #6
    Join Date
    Oct 2007
    Location
    Chennai, India
    Beans
    3,804
    Distro
    Ubuntu Development Release

    Re: Check Disk on SD/MicroSD Card?

    Quote Originally Posted by anxiousdog View Post
    This is the error I get with the fsck:
    Try
    Code:
    sudo fsck -a /dev/sdg1
    Usually, the device will be /dev/sdg, and the partition /dev/sdg1.
    Cheers,PRShah
    Make your own: Ubuntu, Kubuntu, Xubuntu, Mythbuntu All-in-One Live DVD
    "I never make mistakes; I thought I did, once.. but I was wrong."

  7. #7
    Join Date
    Aug 2008
    Beans
    71
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Check Disk on SD/MicroSD Card?

    Quote Originally Posted by prshah View Post
    Try
    Code:
    sudo fsck -a /dev/sdg1
    Usually, the device will be /dev/sdg, and the partition /dev/sdg1.
    That was it! It repaired 8 bad sectors and deleted the offending file(s). It's working great now!! Thanks so much.

  8. #8
    Join Date
    Feb 2009
    Beans
    29

    Re: [SOLVED] Check Disk on SD/MicroSD Card?

    Hello,

    I am also needing to do the same thing but am not sure which device is the SD card. Would you be able to help me out? Would be very much appreciated.
    The only external hardware device that I is plugged in is the SD card.

    Device Boot Start End Blocks Id System
    /dev/sda1 1 6 48163+ de Dell Utility
    /dev/sda2 * 7 9054 72678060 7 HPFS/NTFS
    /dev/sda3 9055 9315 2096482+ f W95 Ext'd (LBA)
    /dev/sda4 9316 9729 3325455 db CP/M / CTOS / ...
    /dev/sda5 9055 9315 2096451 dd Unknown

    Many thanks in advance.
    Max

  9. #9
    Join Date
    Oct 2007
    Location
    Chennai, India
    Beans
    3,804
    Distro
    Ubuntu Development Release

    Re: [SOLVED] Check Disk on SD/MicroSD Card?

    Quote Originally Posted by Max Avion View Post
    The only external hardware device that I is plugged in is the SD card.
    Unfortunately, I can't see it either. Try the below commands in the terminal (Applications-Accessories-Terminal)

    a) Unplug the device
    b) wait 10 seconds
    c) plug the device back in, then give this command, and post back the output
    Code:
    sleep 10 && dmesg | tail -23
    d) Also post the output of the command
    Code:
    sudo fdisk -l
    (That's small letter "L", not "1")
    Cheers,PRShah
    Make your own: Ubuntu, Kubuntu, Xubuntu, Mythbuntu All-in-One Live DVD
    "I never make mistakes; I thought I did, once.. but I was wrong."

  10. #10
    Join Date
    Feb 2009
    Beans
    29

    Re: [SOLVED] Check Disk on SD/MicroSD Card?

    Thank you very much for the reply PRShah. Sorry for taking so long to reply. Here is the information that you asked for.

    Code:
    $ sleep 10 && dmesg | tail -23 
    
    [  253.768149] wlan0: no IPv6 routers present
    [  613.534011] CPU0 attaching NULL sched-domain.
    [  613.534041] CPU1 attaching NULL sched-domain.
    [  613.540295] CPU0 attaching sched-domain:
    [  613.540317]  domain 0: span 0-1 level MC
    [  613.540324]   groups: 0 1
    [  613.540346]   domain 1: span 0-1 level CPU
    [  613.540352]    groups: 0-1
    [  613.540363] CPU1 attaching sched-domain:
    [  613.540379]  domain 0: span 0-1 level MC
    [  613.540385]   groups: 1 0
    [  613.540394]   domain 1: span 0-1 level CPU
    [  613.540410]    groups: 0-1
    [  927.484026] CE: hpet increasing min_delta_ns to 15000 nsec
    [  927.484026] CE: hpet increasing min_delta_ns to 22500 nsec
    [  927.484026] CE: hpet increasing min_delta_ns to 33750 nsec
    [  927.484026] CE: hpet increasing min_delta_ns to 50624 nsec
    [ 1195.747189] type=1505 audit(1240031879.459:5): operation="profile_replace" name="/usr/share/gdm/guest-session/Xsession" name2="default" pid=8451
    [ 1195.995670] type=1505 audit(1240031879.706:6): operation="profile_replace" name="/usr/lib/cups/backend/cups-pdf" name2="default" pid=8456
    [ 1195.997291] type=1505 audit(1240031879.710:7): operation="profile_replace" name="/usr/sbin/cupsd" name2="default" pid=8456
    [ 1872.157284] mmc0: new high speed SD card at address b368
    [ 1872.519013] mmcblk0: mmc0:b368 SMI   1997312KiB 
    [ 1872.519118]  mmcblk0:
    Code:
    $ sudo fdisk -l 
    
    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xd0f4738c
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1           6       48163+  de  Dell Utility
    /dev/sda2   *           7        9054    72678060    7  HPFS/NTFS
    /dev/sda3            9055        9315     2096482+   f  W95 Ext'd (LBA)
    /dev/sda4            9316        9729     3325455   db  CP/M / CTOS / ...
    /dev/sda5            9055        9315     2096451   dd  Unknown
    FYI: It is a 2GB MicroSD card plugged into the computer via SD adapter card.

    Thank you again for your help, I really appreciate it.

    Cheers,

    Max

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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