Score:0

Create partition on SD card in ubuntu terminal

us flag

I inserted a new SD card on ubuntu. When i gave lsblk command to get to know the path for mounting, I got this

NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
mmcblk1      179:0    0  59.5G  0 disk

this disk is does not have any partition, how to create a partition like mmcblk1p1 and that partition will have the entire space of the SD card

thanks

mook765 avatar
cn flag
This is impossible since a partition must not use the space needed by the partition table, thus a partition can never have the entire space.
Hannu avatar
ca flag
Note that a single partition can be made under certain conditions (USB-stick?), but that might end up be a problematic device for some operating systems.
Score:1
ca flag

Please insert the FULL QUESTION in the QUESTION TEXT.

$ sudo fdisk /dev/mmcblk1
[sudo] password for *$USER*:           

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): m

The m Enter command lists the available commands.
l - list current partitions
d - delete partition, if you have one or more
G - create a GPT partition table
o - create a DOS partition table
n - add a NEW partition.

If there is no partition table nor partitions:
Do G, and then n for a FAT or exFAT partition, then
w to write that to the "disk" (SD-card).
q to quit fdisk


$ sudo apt install gparted # if not already installed.
$ gparted & # launch it
... then use the GUI.

First select /dev/mmcblk1 in the upper right corner.

Select a sequence of operations to do,
(i.e. create a partition table, a partition, format it, ...)
then click the green to actually do those operations.

Organic Marble avatar
us flag
The question asks for a *terminal* method, gparted is a GUI
Hannu avatar
ca flag
That detail is not in the QUESTION TEXT. Bummer.
Vishak Raj avatar
us flag
I tried gparted GUI, the options are not enabled, then using fdisk method works, thanks
Hannu avatar
ca flag
"not enabled" - hmm... did you select the "disk" to work on first? Or possibly; it doesn't allow a partition before there is a partition table.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.