php editor Yuzai brings you a practical U disk hard drive detection code. This code can help users quickly detect the status and available space of U disks and hard disks, allowing users to easily understand the status of storage devices. The code is concise and efficient, and easy to use. No complicated configuration and installation are required. You only need to copy the code to your own project to use it. Both developers and ordinary users can easily manage their own storage devices through this code and improve the efficiency of work and life.
The previous article introduced the method of using diskgenius to clone the hard disk. Under the premise that the hard disk is in MBR format, we can choose to copy all sectors or clone the file system structure as it is. Today we will use the file-by-file copy method to test whether the system can be booted correctly after the cloning is completed.
First of all, let’s introduce the current situation of computer hard drives.

Hard drive usage
Currently there are two hard drives, one is a 120G solid-state drive, which is used as the main boot disk and has the WIN10 operating system installed. The other is a 160G mechanical hard drive as a secondary drive. Our goal is to clone the system in the 120G solid state drive to a 160G mechanical hard drive.
Due to the cloning of the system disk, it is not suitable for operation in a running WIN10 system. Because the running system will have some files open, the system files may be incomplete during cloning, resulting in boot failure.

Set the USB boot in bios
We use the USB boot disk with PE to boot the system. First, set the U disk as the first boot disk in the motherboard's BIOS. Since different motherboards may have different setting methods, you can find the setting method for the specific motherboard by yourself.

Open disktenius and select hard disk clone
After entering the PE system, select diskgenius disk wizard.
Select the Tools menu and clone the hard drive.
First select a 120G solid-state drive as the source disk, and then select a 160G hard disk as the target disk.

Select clone by file copy method
After confirmation, there are three cloning methods to choose from. Copy all sectors and copy the file system structure as it is. We have tested it and it can start normally without any problems. Today I will test the third one, copy by file (which can eliminate fragmentation).
After completing the selection, press Start. Due to the large amount of data, it may take a long time.
After the cloning is completed, unplug the USB flash drive and solid-state drive, and only use the 160G mechanical hard drive to boot.

Error code 0xc000000e
It was found that the win10 system failed to boot, showing that the required device is not connected or cannot be accessed, prompting error code 0xc000000e.

File winload.exe error
The following prompts to press F8 to specify startup settings. After pressing F8, it says that the application or operating system cannot be loaded because the required files are missing or contain errors. File: \windows\system\windload.exe
Hard disk cloning, using the file-by-file copy method, did not boot the win10 system correctly. Because the system could not find the boot device, the system file winload was damaged or inaccessible. The reason is that the drive is not configured correctly.
Here are the repair methods.

Enter cmd in pe to enter the command mode
Use the USB disk to boot into the PE system, select Start, Run, enter CMD to enter the command mode. Enter the following command.

Repair the default boot device
c:
cd c:\windows\system32
bcdedit /set {default} osdevice boot
bcdedit /set {default} device boot
bcdedit /set {default} detecthal 1
exit
The above statement, first enter the C drive, Enter the system32 folder of the system, set the default boot device, and then exit the command mode.
Exit PE and reboot the system with a 160G hard drive. Win10 enters normally.

Commands to repair boot devices.
The above is the detailed content of USB hard disk detection code. For more information, please follow other related articles on the PHP Chinese website!

Learn about Chrome Web Store and use it to easily find and add useful extensions to your Google Chrome browser. Detailed instructions for how to install and manage Chrome Web Store extensions are provided.

Sometimes Microsoft Word opens files in read-only mode, which prevents you from editing the documents. This article from php.cn mainly introduces several ways to solve the problem “Microsoft Word opens files in read-only mode”.

RTX 3060 drivers download, installation, and update are simple tasks. If you have a new graphics card - NVIDIA GeForce RTX 3060 Ti, updating or installing the proper graphics card driver for it is important. Let’s read this post and php.cn will show
![[Answers Got] Google Sites Sign in – What Is Google Sites? - MiniTool](https://img.php.cn/upload/article/001/242/473/174646357029132.png?x-oss-process=image/resize,p_40)
What is Google Sites? Google has developed a variety of products covering different fields. Just like Gmail, Calendar, Drive, Docs, Sheets, and Slides, Google Sites is one of them but not that kind of commonly used in daily life. But Google Sites is

Sony has released a new app Firmware updater for DualSense wireless controller to help its users to update the PS5 DualSense controller on PC. In this post, php.cn will show you how to update the PS5 DualSense controller on a PC using this new app.

When you lost your mobile phone, you want to find its location and ping a phone in some way; or if your children have a long time to leave home, you need to locate them and ping their phone. But what’s the bottom line of pinging a phone? And how to p

Windows is Windows 11 Enterprise N? What is the difference between Windows 11 Enterprise and Enterprise N? How to download Windows 11 Enterprise N ISO and install it on your PC? In this post from php.cn, you can find answers to these questions, and l

What should you do if you want to create your own Tiny11 – a Windows 11 lightweight version? Tiny11Builder can help you to build a light version of Windows 11 with the official Windows 11 ISO file. See this post from php.cn and you can find much info


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Linux new version
SublimeText3 Linux latest version

Dreamweaver Mac version
Visual web development tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Notepad++7.3.1
Easy-to-use and free code editor
