Update Reformat_USB.md

main
$./Netrunner_& 1 year ago committed by GitHub
parent bfd369317e
commit a07b17f15b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,8 +1,11 @@
Here is the USB drive reformatting guide converted to Markdown:
# Guide for Reformatting USB Drives # Guide for Reformatting USB Drives
This guide provides instructions for reformatting USB drives on Linux and Windows platforms. This guide provides instructions for reformatting USB drives on Linux and Windows platforms.
## Table of Contents ## Table of Contents
- [Linux](#linux) - [Linux](#linux)
- [Identify the USB Drive](#identify-the-usb-drive) - [Identify the USB Drive](#identify-the-usb-drive)
- [Unmount the USB Drive](#unmount-the-usb-drive) - [Unmount the USB Drive](#unmount-the-usb-drive)
@ -17,9 +20,9 @@ This guide provides instructions for reformatting USB drives on Linux and Window
First, you need to identify the drive you want to reformat. You can list all the storage devices in your computer with the following command: First, you need to identify the drive you want to reformat. You can list all the storage devices in your computer with the following command:
\`\`\`bash ```bash
lsblk lsblk
\`\`\` ```
This will give you a list of devices along with their mount points. Your USB drive will usually be something like `/dev/sdb` or `/dev/sdc`. This will give you a list of devices along with their mount points. Your USB drive will usually be something like `/dev/sdb` or `/dev/sdc`.
@ -27,17 +30,17 @@ This will give you a list of devices along with their mount points. Your USB dri
Before reformatting, you should unmount the drive. This can be done with the following command: Before reformatting, you should unmount the drive. This can be done with the following command:
\`\`\`bash ```bash
sudo umount /dev/sdX sudo umount /dev/sdX
\`\`\` ```
### Format the USB Drive ### Format the USB Drive
Now you can start the process of reformatting. You can use `fdisk` to manage the partitions on your USB drive. Use the following command to start `fdisk` for your drive: Now you can start the process of reformatting. You can use `fdisk` to manage the partitions on your USB drive. Use the following command to start `fdisk` for your drive:
\`\`\`bash ```bash
sudo fdisk /dev/sdX sudo fdisk /dev/sdX
\`\`\` ```
Once you're in the `fdisk` utility, you can use the following commands: Once you're in the `fdisk` utility, you can use the following commands:
@ -51,23 +54,23 @@ Once you're in the `fdisk` utility, you can use the following commands:
Now that you have a new partition, you can format it with a file system. If you want a FAT32 file system, you can use the following command: Now that you have a new partition, you can format it with a file system. If you want a FAT32 file system, you can use the following command:
\`\`\`bash ```bash
sudo mkfs.vfat /dev/sdX1 sudo mkfs.vfat /dev/sdX1
\`\`\` ```
Or if you want an ext4 file system, use this command instead: Or if you want an ext4 file system, use this command instead:
\`\`\`bash ```bash
sudo mkfs.ext4 /dev/sdX1 sudo mkfs.ext4 /dev/sdX1
\`\`\` ```
### Mount the USB Drive ### Mount the USB Drive
Now you can mount the drive again: Now you can mount the drive again:
\`\`\`bash ```bash
sudo mount /dev/sdX1 /mnt sudo mount /dev/sdX1 /mnt
\`\`\` ```
Now your USB drive is reformatted and ready to use! Now your USB drive is reformatted and ready to use!
@ -77,57 +80,58 @@ Now your USB drive is reformatted and ready to use!
1. Open Windows PowerShell as an administrator. 1. Open Windows PowerShell as an administrator.
\`\`\`powershell ```powershell
diskpart diskpart
\`\`\` ```
2. List all the connected storage devices. 2. List all the connected storage devices.
\`\`\`powershell ```powershell
list disk list disk
\`\`\` ```
3. Identify your USB drive by its size and replace X with its disk number. 3. Identify your USB drive by its size and replace X with its disk number.
\`\`\`powershell ```powershell
select disk X select disk X
\`\`\` ```
4. Delete all data and partitions on the drive. 4. Delete all data and partitions on the drive.
\`\`\`powershell ```powershell
clean clean
\`\`\` ```
5. Create a new primary partition. 5. Create a new primary partition.
\`\`\`powershell ```powershell
create partition primary create partition primary
\`\`\` ```
6. Select the newly created partition. 6. Select the newly created partition.
\`\`\`powershell ```powershell
select partition 1 select partition 1
\`\`\` ```
7. Format the partition to FAT32 or NTFS (replace "fs=fat32" with "fs=ntfs" if you want NTFS file system). 7. Format the partition to FAT32 or NTFS (replace "fs=fat32" with "fs=ntfs" if you want NTFS file system).
\`\`\`powershell ```powershell
format fs=fat32 quick format fs=fat32 quick
\`\`\` ```
8. Assign a drive letter to the partition (replace "Y" with your desired drive letter). 8. Assign a drive letter to the partition (replace "Y" with your desired drive letter).
\`\`\`powershell ```powershell
assign letter=Y assign letter=Y
\`\`\` ```
9. Exit DiskPart. 9. Exit DiskPart.
\`\`\`powershell ```powershell
exit exit
\`\`\` ```
> This guide will completely erase all the data on your USB drive and prepare it for fresh use. Be sure to replace X with your disk number and Y with the desired letter for your drive. > This guide will completely erase all the data on your USB drive and prepare it for fresh use. Be sure to replace X with your disk number and Y with the desired letter for your drive.
Let me know if any changes need to be made!

Loading…
Cancel
Save