Formatting SD card in xubuntu

12,970

Solution 1

I didn't completely solve my problem, but I suspect that my SD card was faulty, I tried several different operating systems and devices, but none of them was able to format my SD card. I bought a new one and it worked flawlessly.

Solution 2

Insert the SD card into your card reader and allow it to be recognized and mounted by Ubuntu.

Click the "Applications" menu at the top of the screen, then click "Accessories" and "Terminal" to open the command prompt.

Type df and press Enter. This displays a list of every storage device currently in use by the computer. Locate the device name of your SD card. It might be something like /dev/mmcblk0, or, if you're using a USB card reader, /dev/sdxN (with x being a letter, and N a number; for instance: /dev/sdb1(.

Type umount followed by the device name that you found in Step 1. For example, the completed command might be umount /dev/sdb1. Press Enter after typing the command. This command unmounts the SD card from the system.

Type mkdosfs -F 32 -v <device name as explained above> and press Enter. For example, the completed command might be mkdosfs -F 32 -v /dev/sdb1. The -F 32 portion of the command formats the SD card using the FAT32 file system. Leave this part out if you would rather format the card using FAT16. The -v portion of the command gives a verbose (full) summary of the operation.

Remove and reconnect the SD card to remount it when the operation is complete.

Share:
12,970

Related videos on Youtube

Qurben
Author by

Qurben

Updated on September 18, 2022

Comments

  • Qurben
    Qurben over 1 year

    I just bought a new 8Gb SDHC card, but I am not able to create partitions on it. Not when I am using GParted, nor when I am using mkfs.

    When I insert the SD card the following shows up in dmesg:

    ...
    [ 8488.662181] mmc0: card lacks mandatory switch function, performance might suffer.
    [ 8488.839524] mmc0: new SDHC card at address b368
    [ 8488.839870] mmcblk0: mmc0:b368 SMI-S 7.54 GiB 
    [ 8488.842163]  mmcblk0: unknown partition table
    

    But when I try to use dd to write an .img file to the SD card a lot of I/O errors show up:

    ...
    [ 8639.446903] mmcblk0: error -123 sending status command, aborting
    [ 8639.446905] end_request: I/O error, dev mmcblk0, sector 460672
    [ 8639.446910] end_request: I/O error, dev mmcblk0, sector 460680
    [ 8639.446915] end_request: I/O error, dev mmcblk0, sector 460688
    ...
    

    When I try to create a partition table in GParted the following error also shows up:

    ...
    [ 8840.084006] mmc0: Timeout waiting for hardware interrupt.
    [ 8840.084252] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0xe00
    

    Does anyone have a clue on what to do to make this work?

  • Qurben
    Qurben almost 12 years
    The SD card is not mounted because there is no filesystem on it to mount. I know that the SD card is /dev/mmcblk0, but interacting with it only results in errors.