how to repair damaged sd card without formatting
Don't wanna be here? Send us removal request.
lindaiestrada123-blog · 6 years ago
Text
The method of creating two partitions by SD card (FAT32, EXT4).
Insert SD card in the computer, the device should be sdb1
1) Display the mount path, mount/dev/sdb1
The following information pops up:
Mount: /dev/sdb1 is already mounted or/run/media/root/B243-A3BC busy
/ dev/sdb1 is already mounted on/run/media/root/B243-A3BC
2) Unloading sdb1 equipment
Umount/run/media/root/B243-A3BC
3) mkfs.ext4/dev/sdb1
4) fdisk/dev/sdb, press’m’, enter command
First partition
Command (m for help): D // / If only one partition is deleted directly, if there are more than one partition, there will be a number, choose the partition you want to delete.
Command (m for help): n // / Add new partitions
Partition type:
P Primary (2 primary, 0 extended, 2 free)
E.extended
Command (m for help): P // / General Option p
Partition number (1-4, default 1): 1// Add by default from the first partition
First sector (2048-15523839, default 2048): // This is where the memory starts, such as 8G memory, there will be 11523839 sectors, starting from 2048, that is, 2048*512=1M. This is the SD card for storing information.
Last sector, +sectors or+size {K, M, G} (2048-15523839, default 15523839): +200M// divided 200M to the first partition.
Command (m for help): t // / Select a format for partitions, Linux or FAT32
Selected partition 1 // Select the first partition and format it
Hex code (type L to list codes): B // do FAT32
To the second partition
Command (m for help): n // / and then partitioned into Linux systems
Partition type:
P Primary (1 primary, 0 extended, 3 free)
E.extended
Select (default p): p
Partition number (1-4, default 2):
Use default value 2
First sector (6293504-15523839, default 6293504):
Use default value 6293504
Last sector, + sectors or +size {K, M, G} (6293504-15523839, default 15523839): // Size is returned directly and the rest is given to the Linux partition.
Use default value 15523839
Command (m for help): w//save
5) Reformatting after partitioning, mkfs.fat/dev/sdb1, mkfs.ext4/dev/sdb2
6) Pull out the U-disk and insert it back into the U-disk. View the partition [root@localhost~] # df-hT
Filesystem Type Size Used Avail Use% Mounted on
/ dev/mapper/cl-root XFS 37G 6.3G 30G 18%/
Devtmpfs 1.4 G 0 1.4 G 0%/dev
TMPFS 1.4 G 180K 1.4 G 1%/dev/shm
TMPFS 1.4 G 8.8 M 1.4 G 1%/run
Tmpfs, tmpfs, 1.4 G, 0.4 G, 0%/sys/fs/cgroup
/ dev/sda1 XFS 1014M 172M 843M 17%/boot
VBox SF 62G 52G 9.9G 84%/media/sf_share
TMPFS 285M 12K 285M 1%/run/user/0
/ dev/sr0) iso9660 57M 57M 0 100%/run/media/root/VBOXADDITIONS_5.1.26_117224
/ dev/sdb2 ext4 7.0G 33M 6.6G 1%/run/media/root/0e2dc96f-779f-41ca-b868-74e3f17b1948
/ dev/sdb1, vfat, 200M, 0%/run/media/root/3F47-F43D
Finish!
Ps:
FAT32: (i.e. Vfat) A 32-bit file allocation table supports 128GB maximum partition, 4GBext4 log file system, 1EB (1024*1024TB) and 16TB single file. Continuous writing can reduce file fragmentation. Rhel6 default file system.
you must to know how to repair damaged sd card without formatting. so you should create two partitions, It’s more safe.
1 note · View note