Format an sd card in linux

Steps to format SD Card in Linux [100% Working]

Working with Linux can get a little complicated, especially if you are a new user migrating from a platform like Windows. Getting yourself familiar with the new file manager, file system permissions, and even the numerous Terminal commands can be a little challenging for a start. However, that shouldn’t scare you away. Linux is an excellent platform with many advantages over other platforms. When working with drives on your Linux system (USB, SD cards, external Hard drives, etc.), you might find yourself in a situation where you need to format them. Linux has multiple methods that you can apply.

In this article, we are going to explore how you can format an SD card on Linux using three different methods:

Method-1: Format SD Card Using the File Manager

It is one of the easiest methods to format an SD card since you don’t need to launch any third-party utilities or execute any Terminal commands. However, it comes with limited options and features compared to utilities like Gparted or Fdisk, which we will look at further in this post.

This method cannot format a bootable SD card or USB drive used to install an operating system. You will likely see the error «Can’t Format USB Disk because of Error Formatting Volume.»

To get started, insert your SD card in the SD card and launch the file manager. You should see your SD card listed on the left, as shown in the image below.

Steps to format SD Card in Linux [100% Working]

Right-click on the SD card and select the Format option as shown in the image below.

Steps to format SD Card in Linux [100% Working]

That will open the «Format volume» window, which contains several options you can use:

  • Volume Name: Here, you can enter the name you wish to call your SD card
  • Erase: This is an optional feature that overwrites all the existing data. This option is meant to prevent any data recovery procedure but takes much longer.
  • EXT4: For use with Linux systems
  • NTFS: For use with Windows systems
  • FAT: For use with all systems and devices
  • Password protect volumes (LUKS): This option allows you to encrypt your SD card using LUKS, the standard disk encryption in Linux systems.

Steps to format SD Card in Linux [100% Working]

After selecting your options, click Next. You will see a warning screen showing all the choices you have chosen. If you are unsure of anything, you can click the Previous button to go back. Otherwise, click the red Format button to start the formatting process.

Steps to format SD Card in Linux [100% Working]

After the format process is complete, you should see the SD card appear on the file manager with the new name you assigned it.

Читайте также:  Запуск криптопро в линуксе

Steps to format SD Card in Linux [100% Working]

Method-2: Format SD Card Using Gparted

Gparted is a free, open-source graphical partition editor. With GParted, you can create, modify, delete, unmount, Format, and perform many more actions on partitions and any connected drives. Gparted is a cross-platform utility available for Kali Linux, Windows, and macOS operating systems. Follow the steps below to get started with GParted.

Step 1: Install GParted.

Gparted comes pre-installed in distribution like Kali Linux; however, for other Linux distributions, you will need to install it manually by executing the command below on the Terminal.

Insert the SD card into the memory card reader, then insert it to the USB port of your pc or laptop. Now launch GParted by using either Terminal or Application menu. For the Terminal, you can use the command below.

While for Application Menu, search for Gparted in the applications menu, then click on it to launch the application. A window will pop up requiring you to enter the root password to authenticate Gparted. Type the password and click Authenticate.

Steps to format SD Card in Linux [100% Working]

Step 2: Gparted Window

On starting GParted, you will see a window similar to the image below. By default, Gparted will select the internal hard drive of the computer.

Steps to format SD Card in Linux [100% Working]

Refresh Devices

The first thing to do after starting Gparted is to search for available Devices. On the menu bar, Click on GParted.A drop-down menu will appear. Click Refresh Devices.

Steps to format SD Card in Linux [100% Working]

Selecting Storage device to Format

To select your SD card, go to the top-right corner, select SD card. The devices will be displayed based on their storage sizes; in my case, my SD card, which I want to format, is 16 gigabytes.

Steps to format SD Card in Linux [100% Working]

Before you format your sd card, ensure you have a backup copy of your essential data since all data will be wiped up permanently.

After making sure you have a backup copy of your data, proceed by Right-Clicking on the sd card then choosing Format to set up the file system. You can select the disk file format you want according to your preferences. In my case, I will choose fat32. If the format option is greyed out, you will first need to unmount the SD card on your system by selecting the unmount option.

Steps to format SD Card in Linux [100% Working]

At the bottom of the window, you can see all the pending operations. Click at the tick (✔) sign at the top of the window to apply all the pending operations. A dialog box will pop up, warning against the operations you are about to take. To proceed, click Apply.

Steps to format SD Card in Linux [100% Working]

The formatting process will start. Wait for a few seconds. When done, you should the message «All operations successfully completed.» Click Close.

Steps to format SD Card in Linux [100% Working]

That’s it! You can now close the Gparted window and check the formatted SD card on your file manager window.

Steps to format SD Card in Linux [100% Working]

Method-3: Format SD Card Using Fdisk

The two ways we have looked above are both graphical methods. Now, we will look at one powerful command-line utility which you can use to format your SD card and any other drives connected to your PC — fdisk. The Fdisk utility, also commonly referred to as «format disk,» is a Linux command-line tool for formatting and carrying out other disk operations. Luckily, it comes pre-installed in most Linux distributions.

Читайте также:  Файловая система linux пути

Execute the command to list all the available drives connected to your system and their partitions to get started.

Steps to format SD Card in Linux [100% Working]

You will see a long list of all devices on your system, and it can get quite confusing at times to point out your target device. However, there is a trick. Linux will list all connected drives as /dev/sda , /dev/sdb , /dev/sdc and so on. /dev/sda is always the internal drive of your system or the drive which contains the running OS. SD cards might be listed with a different name from /sda.

From the image above, you can see our SD card is listed as /dev/mmcblk0 .

To get started formatting your SD card, use the syntax below.

sudo fdisk [sd-card-label]
e.g
sudo fdisk /dev/mmcblk0

You will see an interactive window similar to the image below.

Steps to format SD Card in Linux [100% Working]

To list all the available options, type «m» and hit enter.

Steps to format SD Card in Linux [100% Working]

At this point, we need to enter the available options to format our SD card.

  • d: To delete all existing partitions
  • n: To create a new partition
  • w: To write the changes and exit

Steps to format SD Card in Linux [100% Working]

That’s it. When you navigate to the file manager window, you should see your newly formatted SD card listed on the left.

Conclusion

We have looked at three different methods you can use to format your SD card. From experience, I highly recommend Gparted because it comes with so many options, and it also features an easy-to-use user interface. Additionally, Gparted has an ISO file that you can use to boot your PC and manipulate the drives and partitions. That can come quite in handy if you are dealing with a crashed system. Please feel free to share your experience and hit the comments below if you encounter any issues.

Didn’t find what you were looking for? Perform a quick search across GoLinuxCloud

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can either use the comments section or contact me form.

Thank You for your support!!

Источник

How to Format a USB or SD Card in Ubuntu Linux

Formatting removable media like a USB disk or an SD card is a pretty simple task on Ubuntu Linux. No, I won’t be using the terminal here although you can always use the command line on Linux. I’m going to show you how to format a USB on Ubuntu or other Linux distributions graphically.

Format USB disks on Ubuntu & other Linux distributions

I’m using Ubuntu with the GNOME desktop environment in this tutorial, but it should be applicable to other Linux distributions and other desktop environments as well.

Plug in your USB or SD card. Now go to the File manager. You should see your USB or SD Card here.

Right click on it and you should see the format option.

Format option for USB in Ubuntu

When you hit the format option, it will give you the option to name the device and choose the filesystem.

When you’ve selected the appropriate options, hit the Next button in the top right corner.

Читайте также:  Команда синхронизация времени linux

Format Usb Ubuntu

You’ll see a warning that all the data on the USB disk/SD card will be erased. That’s obvious.

Just hit the format button in the top right corner.

Format Usb Ubuntu

Your USB disk will be formatted in a few seconds or a couple of minutes at the most.

Once it’s formatted, you’ll see that it has reappeared in the file manager with the new name you gave it.

That’s it. That’s the standard way of formatting a USB drive on Ubuntu Linux.

Troubleshooting when you cannot format the USB disk on Ubuntu Linux

I never thought I would have trouble formatting a simple SD card or USB/pen drive until I encountered this problem on Ubuntu. When I looked at the options available by right clicking on the mounted removable disk, I found none for formatting.

So I tried using the default disk utility of Ubuntu: Disks. But it failed and gave me the following error:

Error formatting disk – Error synchronizing after initial wipe: Timed out waiting for object (udisks-error-quark, 0)

Error Formatting The Disk

The above mentioned error is a known bug which has been unresolved for months – despite this, Disks is still being served as the default disk utility program (why?).

I had to go around and format the removable disk with the help of GParted. And thus I came up with this tutorial to help others learn how to format a SD card or USB key in Ubuntu.

Step 1:

Install GParted. It’s a free and open source partition manager for Linux. You can install it using the terminal (Ctrl+Alt+T):

sudo apt-get install gparted

Step 2:

Insert the SD card or USB key. Now launch GParted. To do that, go to the Unity dash and search for GParted. It takes some time to search for all the disks present on the system. Have some patience. When it’s recognized the drives, you’ll see a screen as below. By default it goes to the hard drive of your computer. To access removable media, go to the top-right corner of the application and choose the removable media. You can see the size of the removable media to identify the right one :

GParted-Format-USB-Disk-Ubuntu-1

Step 3:

Now you’ll see a screen like the one below. This shows the partitions of the removable disk. Before you go for formatting, unmount the disk by right-clicking on the partition in the following manner:

Step 4:

Once you have it unmounted, right-clicking on it will show you the Format To option. You can choose whatever type of file system you want on the disk. Once you’ve selected the drive to format, click on the Tick sign at the top to start the process:

GParted-Format-Disk-USB-Ubuntu-4

Step 5:

Nothing more needs to be done now. You will see a couple of warnings and then the format procedure will start.

GParted-Format-Disk-USB-Ubuntu-5

GParted-Format-Disk-USB-Ubuntu-6

There is another possible formatting related issue. I’ve written another tutorial to fix this ‘error formatting volume’ issue in Ubuntu.

Was the tutorial helpful to you and were you able to format a USB key in Ubuntu? Any questions? Feel free to go to the comments section of the page.

Источник

Оцените статью
Adblock
detector