Delete the Linux system in the dual system (summarize and restore the original U disk)

1. How to delete the Linux system in the dual system (the dual system here is win+Linux)

first step

First open the Disk Manager , right-click the primary partition of the Linux system to be deleted, and then close the Disk Manager after deletion.

second step

Search for cmd in the search box on your computer, then right-click and select Run cmd as an administrator.

third step

1. Enter diskpart  (Enter)
2. After entering diskpart, continue to enter  list disk  (Enter)
   . Under normal circumstances, only one disk 0 will be displayed here. At this time, we can only select this disk for operation.

3. Next, continue to enter select disk 0 (Enter) to enter the selected disk.

4. After entering the selected disk, continue to enter list partition (press Enter), and you can see the partitions of all disks.

5. Then we enter the partition whose type is system, and enter  select partition + partition number (for example: if the system partition number is 1, then it is: select partition 1 , if it is 0, then it is: select partition 0 )

6. After entering the selected partition, we can set a label for this partition to facilitate subsequent entry, enter: assign letter=label to be set . (Example: I label the system partition as: x , command: assign letter=x ).

7. Exit: exit

8. Then we enter  x:    so that we can enter the partition we just set the label, and then use the input: dir   to view all directories  

9. Then continue to enter: cd efi   This file is the boot guide for the system.

10. Then enter dir    to see the system you installed.

11. Next, select the linux system to be deleted, and enter  rd {the system file name to be deleted} /S #Note that the S here is capitalized  (for example: if the ubunts system is to be deleted, then enter: rd ubuntu /S    ( Enter) Here you will be asked to confirm whether to delete, we enter Y , and then press Enter, so that the system will be deleted.) After restarting the computer, the boot interface will not appear, and it will directly enter the Windows system.

2. Put the recovery U disk back to its original state

Reminder: Before this operation, confirm that the information in the USB flash drive is not needed! ! !


1. Win10 enters "Computer Management" --> "Storage" -----> "Disk Management".

2. Check the U disk you inserted, how many disks are displayed in the "Disk Management"? (The disk name should be: disk+number)

3. After confirming the disk number, press "win+R" on the keyboard at the same time to enter the operation, enter : cmd in the input box , and enter the command window after pressing Enter.

4. Enter: diskpart   and press Enter to enter a new command line window.

5. In the new command line window, first enter: list disk,   you can see how many disks there are, and find the disk number of your U disk. Then enter: select disk disk number (for example, my U disk is displayed as "disk 2" in my computer disk, then the command I entered is "select disk 2" and you have to enter it according to your actual situation.)

6. After inputting the above command and pressing Enter, enter the command: clean and press Enter, and it will prompt "The disk was successfully cleared".

7. At this time, go back to "Computer Management" —> "Storage" -----> "Disk Management", check and select the disk where the U disk is located, right click —> "Create New Partition", and then default to the next step , until the prompt is complete.

8. After such a wave of operations, the U disk has been restored.


 

Guess you like

Origin blog.csdn.net/weixin_54509457/article/details/129497636