Results 1 to 7 of 7

Thread: Formatting MicroSD/SD cards to EXT in Linux | Best Practice?

  1. #1
    neu5eeCh is offline Grande Half-n-Half Cinnamon Ubuntu
    Join Date
    Dec 2009
    Beans
    912
    Distro
    Ubuntu

    Formatting MicroSD/SD cards to EXT in Linux | Best Practice?

    So, my daughter is having occasional troubles (copying/moving) with her MicroSD card and my guess is that it has to do with the exfat file system being a non-native file system (in linux).

    I've been reading about reformatting SD cards to ext4 that come with a number of provisos -- most notably turning off journaling. I was just wondering if any of you have reformatted their SD card, have already thought through all this, and what's best practice?

    Switching off journaling:

    http://superuser.com/questions/79923...icrosd-to-ext4

    Try formatting without journaling and it should work:
    Code:
      mke2fs -t ext4 -O ^has_journal /dev/sdf1
    Being an SD card, you probably don't want journaling enabled.
    This site:

    https://blogofterje.wordpress.com/20...fs-on-sd-card/

    Goes a step further:


    Code:
    mkfs.ext4 -O ^has_journal -E stride=2,stripe-width=1024 -b 4096 -L [Volume Name]  /dev/[directory]
    Any other thoughts?

  2. #2
    Join Date
    Feb 2008
    Location
    Land of fire and drought
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Formatting MicroSD/SD cards to EXT in Linux | Best Practice?

    Just to the MicroSD card issue firstly. Do you have exfat-utils and exfat-fuse installed? I use sd cards all the time without issue (but I have found it was only necessary to install the exfat stuff mentioned for sdxc cards).

    To format them, I simply use Gparted. Works for me just like making a partition on any other drive. Be aware that if you are using sdxc cards you may need to stick with exfat for them to operate at all.

    You may find this of interest, from here:

    What is SDXC?

    SDXC™ (SD Extended Capacity) is an SD™ memory card format that is based on the SDA 3.0 specification. Today, SD and SDHC™ cards, which are based on the SDA 2.0 specification, can reach capacities up to 32GB. The SDA 3.0 specification, on the other hand, enables SD cards to "extend" beyond this 32GB capacity limit and reach higher capacities: from 32GB up to 2TB.

    SDXC memory cards use the newer "exFAT" file system that is more efficient for SDXC's large capacities, while SD and SDHC memory cards use the FAT32 file system. This difference is the reason that the new SDXC format is NOT backwards compatible with host devices that only take SD (128MB to 2GB) or SDHC (4GB to 32GB) cards.
    Last edited by Bucky Ball; May 8th, 2016 at 06:25 PM.

  3. #3
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Formatting MicroSD/SD cards to EXT in Linux | Best Practice?

    If you use the SD card for an installed system you had better switch off journaling. If you use it only to store files and move files between computers, you will probably not read and write too often, and you can consider to keep the journaling, which makes the system more robust.

    I think the first method you describe (the simpler command line) should be enough.

    If you have an ext4 file system already, you can turn journaling on and off with tune2fs. There are also other tweaks, that are worthwhile. See this link

    Installation/UEFI-and-BIOS#Final_system_tweaks

  4. #4
    neu5eeCh is offline Grande Half-n-Half Cinnamon Ubuntu
    Join Date
    Dec 2009
    Beans
    912
    Distro
    Ubuntu

    Re: Formatting MicroSD/SD cards to EXT in Linux | Best Practice?

    Great! My thanks to both of you. I'll follow up your links.

    Edit: And, yes, thanks, exfat-utils and fuse are installed. The problem occurs when copying from a Fat32 USB to the SD card. She gets an input/output error. I can successfully copy the files from the USB to SD card using Windows. (But it's only a handful of files that are problematic -- PDFs being among them).
    Last edited by neu5eeCh; May 8th, 2016 at 10:03 PM.

  5. #5
    Join Date
    Jun 2007
    Beans
    17,337

    Re: Formatting MicroSD/SD cards to EXT in Linux | Best Practice?

    If having permissions on the card is desired then ext* would be fine. Otherwise it could be a hassle to use, I'd just use FAT myself

  6. #6
    neu5eeCh is offline Grande Half-n-Half Cinnamon Ubuntu
    Join Date
    Dec 2009
    Beans
    912
    Distro
    Ubuntu

    Re: Formatting MicroSD/SD cards to EXT in Linux | Best Practice?

    Quote Originally Posted by mc4man View Post
    If having permissions on the card is desired then ext* would be fine. Otherwise it could be a hassle to use, I'd just use FAT myself
    The trouble is that she's getting input/output errors and it only happens when using her Linux laptop (the same files copy without errors on Windows). This makes me think Linux would be happier with a native file system.

  7. #7
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Formatting MicroSD/SD cards to EXT in Linux | Best Practice?

    If you don't want journalling, then just format the device as ext2.
    Code:
    sudo mkfs -t ext2 /dev/sdb1
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

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
  •