And run the following command for check the mount name.
user@user:~$ sudo fdisk -l
Disk /dev/sdf: 28.8 GiB, 30908350464 bytes, 60367872 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5c8f34fa
Device Boot Start End Sectors Size Id Type
/dev/sdf1 * 8192 124927 116736 57M e W95 FAT16 (LBA)
/dev/sdf2 124928 60367871 60242944 28.7G 83 Linux
In my case SD card connected on the /dev/sdf1 and /dev/sdf2.
Checking that where the SD card connected, run the following command for delete a partition.
If there is no partition. you can skip this section.
Entering the m command ,you can see information about the command.
Now entering the d command for delete a partition.
and
Now, let's add a new partition. Entering the n command.
After add a new partition, you enter the p command for check the partition table.
Checking that where the SD card connected, run the following command for delete a partition.
If there is no partition. you can skip this section.
user@user:~$ sudo fdisk /dev/sdf
Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): m
Help:
DOS (MBR)
a toggle a bootable flag
b edit nested BSD disklabel
c toggle the dos compatibility flag
Generic
d delete a partition
l list known partition types
n add a new partition
p print the partition table
t change a partition type
v verify the partition table
Misc
m print this menu
u change display/entry units
x extra functionality (experts only)
Save & Exit
w write table to disk and exit
q quit without saving changes
Create a new label
g create a new empty GPT partition table
G create a new empty SGI (IRIX) partition table
o create a new empty DOS partition table
s create a new empty Sun partition table
Command (m for help):
Entering the m command ,you can see information about the command.
Now entering the d command for delete a partition.
Command (m for help): d
Partition number (1,2, default 2):
Partition 2 has been deleted.
Command (m for help):
and
Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
Command (m for help):
Now, let's add a new partition. Entering the n command.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-60367871, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-60367871, default 60367871):
Created a new partition 1 of type 'Linux' and of size 28.8 GiB.
Command (m for help):
Command (m for help): p
Disk /dev/sdf: 28.8 GiB, 30908350464 bytes, 60367872 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5c8f34fa
Device Boot Start End Sectors Size Id Type
/dev/sdf1 2048 60367871 60365824 28.8G 83 Linux
Command (m for help):
In my case, /dev/sdf1 type change to FAT32.
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): b
If you have created or modified any DOS 6.x partitions, please see the fdisk documentation for additional information.
Changed type of partition 'Linux' to 'W95 FAT32'.
After working, you should write the current partition information.
If you just shutdown the partition information is not stored.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
File system format
Through the following command to format the partition.
Format is complete.
user@user:~$ sudo mkfs.ext4 /dev/sdf1
mke2fs 1.42.12 (29-Aug-2014)
Creating filesystem with 7545728 4k blocks and 1888656 inodes
Filesystem UUID: 2d9c8a57-b752-4cc5-875f-139a56696572
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
Format is complete.
![]() |
| Formatted SD card |

0 개의 댓글:
댓글 쓰기