Child pages
  • Formatting a storage device for use with all Operating systems

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Complete for now, big file support should be checked out though

...

The following command line snippets for Linux should make any storage device usuable with all operating systems and most or all devices (like smartphones, digital cameras, media players, ...).

Disclaimer 1: Use at Your own risk

In case of certain problems (i.e. if the storage device is not detected at all) the following snippets can destroy all data even on your internal storage device (i.e. main hard disc resp. SSD).

So USE AT YOUR OWN RISK.

Disclaimer 2: 2 TB warning

If the storage devices provides more than 2 TB of storage better use gparted or the like after clearing the exisiting paritition table with dd.

Solution

For easier reading the following text will use "storage device" to refer to "USB memory stick or memory card".

...

Clean eventual partition table

TBD.

Create partition table

TBD.

Create partition

TBD.

Format partition

TBD.

TBD: Files > 4 GB?

TBD.

To get rid of any partition table Zero the first few blocks. 4096  0s should be satisfactory for devices over 2 TB too.

No Format
dd if=/dev/zero of=${SDDEV} bs=4096 count=1

Create and format partition with gparted

I recommend to use the X11 tool gparted for the remaining steps:

  • if you don't have gparted installed yet install it now
  • LC_ALL="C" gparted &
  • let it scan your devices (may take a bit)
  • At the right select the storage device to operate on (see above)
  • In the menu select "Device", "Create partition table", type msdos should be find, "Apply"
  • Select the "unallocated" line in the partition list
  • In the menu select "Partition", "New"
  • Change file system to fat32 (or NTFS for full large file support, locking out anything but Windows and Linux)
  • Optionally enter a lable
  • In the menu select "Edit", "Apply all operations"
  • Wait a bit
  • Close the success dialog, review the partition list
  • End gparted