Why use VHD instead of using a real hard drive directly? Because - it's convenient. If you use VHD, as long as the hard disk space is enough, you can put 10 or 20 systems without having to consider the partition problem. Each system is just a VHD file. Uninstalling is also very convenient. Just delete the corresponding VHD and then delete the corresponding bcd boot item. Making another new mobile system is even simpler. Copy the VHD to another mobile hard drive, then rebuild the boot, and everything is OK.
For students who don’t like to use VHD, the method is the same for real hard drives. Just modify the bcd boot item to boot win7 from the mobile hard disk/U disk.
If installing to a USB flash drive, first the USB flash drive must be large enough! Secondly, after completion, you need to install fbwf that supports win7 (it must be installed! Otherwise the U disk will hang up soon. There is a download in the forum)
———————————————————————————————————————————
First, you need to install WIN7 into the VHD, then use this VHD to start the computer and run WIN7. This step is very easy, so I skipped it. There are related posts in the forum.
Continue below, transplant the VHD with WIN7 installed to the mobile hard disk, then use the mobile hard disk to start the computer and run WIN7 in the VHD.
The mobile version produced is very compatible with WIN7! I used this mobile version of WIN7 to start up two laptops, Lenovo Y450 and Dell's D630, without any problems at all; I also started up my old desktop computer from 2001, P4 1.5G, 512M memory, USB1.1, bios no USB boot options. The only trouble is reinstalling the drivers when starting a new computer for the first time. The performance of the mobile version of win7 is slightly lower than the local version. First, it is the speed limit of USB2.0. Second, the VHD read and write driver will slightly slow down the hard disk read and write speed, but not too much. At the end of this post, I I will post a performance comparison chart between local win7 and mobile win7.
Tool preparation
- Lenovo Y450 notebook, Windows 7 Ultimate Edition has been installed, used to boot mobile WIN7 and modify the contents of win7.vhd (win7 is not necessary, anyway, it can boot and modify mobile win7, such as WINPE3.0 version)
- Win7.vhd, 15G, located in Y450 D: drive
- The mobile hard disk is 80G divided into two partitions. The first partition is the system partition of other systems, and the second partition is the data disk.
step
1. Start Y450 to enter Win7, open the win7 disk management tool, attach the vhd file, and attach D:/win7.vhd to the system. After success, you can see a new partition in the computer. The drive letter I assigned to it is V:, so the V: drive contains the complete win7 system files that have been pre-installed.
2. Because of the USB driver, when win7 on this VHD is started from the mobile hard disk, a blue screen error will be reported: 007B! So the next step is to modify the USB driver of VHD win7.
2.1 Enter the V:windowsinf folder, find the following files, double-click to open them, find the corresponding parts, modify the content as follows (red characters are added content, pay attention to the red ; sign), and then save and overwrite the original file:
usb.inf
;[SignatureAttributes]
;usbccgp.sys=SignatureAttributes.DRM
;usbhub.sys=SignatureAttributes.DRM
[StandardHub.AddService]
DisplayName = %StandardHub.SvcDesc%
ServiceType = 1; SERVICE_KERNEL_DRIVER
;StartType = 3 ; SERVICE_DEMAND_START
StartType = 0; SERVICE_BOOT_START
ErrorControl = 1; SERVICE_ERROR_NORMAL
ServiceBinary = %12%usbhub.sys
;LoadOrderGroup = Base
LoadOrderGroup = System Bus Extender
[CommonClassParent.AddService]
DisplayName = %GenericParent.SvcDesc%
ServiceType = 1; SERVICE_KERNEL_DRIVER
;StartType = 3 ; SERVICE_DEMAND_START
StartType = 0; SERVICE_DEMAND_START
ErrorControl = 1; SERVICE_ERROR_NORMAL
ServiceBinary = %12%usbccgp.sys
;LoadOrderGroup = Base
LoadOrderGroup = Boot Bus Extender
————————————————————————————————————
usbport.inf
[ControlFlags]
;BasicDriverOk = *
;ExcludeFromSelect = *
;[SignatureAttributes]
;usbehci.sys=SignatureAttributes.DRM
;usbhub.sys=SignatureAttributes.DRM
;usbohci.sys=SignatureAttributes.DRM
;usbport.sys=SignatureAttributes.DRM
;usbuhci.sys=SignatureAttributes.DRM
;[SignatureAttributes.DRM]
;DRMLevel=1300
[EHCI.AddReg.NT]
HKR,,EnumPropPages32,,"usbui.dll,USBControllerPropPageProvider"
HKR,,Controller,1,01
;HKLM,SystemCurrentControlSetServicesusbehci,BootFlags,0x00010003,4
[EHCI.AddService]
DisplayName = %EHCIMP.SvcDesc%
ServiceType = 1; SERVICE_KERNEL_DRIVER
;StartType = 3 ; SERVICE_DEMAND_START
StartType = 0; SERVICE_BOOT_START
ErrorControl = 1; SERVICE_ERROR_NORMAL
ServiceBinary = %12%usbehci.sys
;LoadOrderGroup = Base
LoadOrderGroup = Boot Bus Extender
[OHCI.AddReg.NT]
HKR,,EnumPropPages32,,"usbui.dll,USBControllerPropPageProvider"
HKR,,Controller,1,01
;HKLM,SystemCurrentControlSetServicesusbohci,BootFlags,0x00010003,4
[OHCI.AddService]
DisplayName = %OHCIMP.SvcDesc%
ServiceType = 1; SERVICE_KERNEL_DRIVER
;StartType = 3 ; SERVICE_DEMAND_START
StartType = 0; SERVICE_BOOT_START
ErrorControl = 1; SERVICE_ERROR_NORMAL
ServiceBinary = %12%usbohci.sys
;LoadOrderGroup = Base
LoadOrderGroup = Boot Bus Extender
[UHCI.AddReg.NT]
HKR,,EnumPropPages32,,"usbui.dll,USBControllerPropPageProvider"
HKR,,Controller,1,01
;HKLM,SystemCurrentControlSetServicesusbuhci,BootFlags,0x00010003,4
[UHCI.AddService]
DisplayName = %UHCIMP.SvcDesc%
ServiceType = 1; SERVICE_KERNEL_DRIVER
;StartType = 3 ; SERVICE_DEMAND_START
StartType = 0; SERVICE_BOOT_START
ErrorControl = 1; SERVICE_ERROR_NORMAL
ServiceBinary = %12%usbuhci.sys
;LoadOrderGroup = Base
LoadOrderGroup = Boot Bus Extender
[ROOTHUB.AddReg.NT]
HKR,,EnumPropPages32,,"usbui.dll,USBHubPropPageProvider"
;HKLM,SystemCurrentControlSetServicesusbhub,BootFlags,0x00010003,4
[ROOTHUB.AddService]
DisplayName = %ROOTHUB.SvcDesc%
ServiceType = 1; SERVICE_KERNEL_DRIVER
;StartType = 3 ; SERVICE_DEMAND_START
StartType = 0; SERVICE_BOOT_START
ErrorControl = 1; SERVICE_ERROR_NORMAL
ServiceBinary = %12%usbhub.sys
;LoadOrderGroup = Base
LoadOrderGroup = System Bus Extender
——————————————————————————————————
usbstor.inf
[USBSTOR.AddService]
DisplayName = %USBSTOR.SvcDesc%
ServiceType = 1
;StartType = 3
StartType = 0
ErrorControl=1
ServiceBinary = %12%USBSTOR.SYS
LoadOrderGroup = System Bus Extender
2.2 Enter v:WindowsSystem32DriverStoreFileRepository,
Find the folder named usb.inf_..., and then copy the usb.inf file you just changed here to overwrite the original file;
Then continue to find the folder named usbport.inf_..., and overwrite the original file here with the modified usbport.inf file;
Continue to find the folder named usbstor.inf_... and overwrite the original file here with the modified usbstor.inf.
(Note: The ownership of the folders and files in this location belongs to TrustedInstaller. It is not possible to change it directly. You must first change the ownership to the logged-in user and grant full permissions before you can modify it. Please search online for modification steps.)
2.3 After the file has been modified, the next step is to modify the registry V:windows. There are many ways to modify the registry. The one I use below is the simplest one.
2.3.1 Open WordPad, copy the following code into WordPad, and save it as usb1.reg (note not usb1.reg.txt!)
REGEDIT4
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesUsbBootWatcherService]
"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000000
"ImagePath"=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,73,79,73,74,65,6d,33,
32,5c,55,73,62,42,6f,6f,74,57,61,74,63,68,65,72,2e,65,78,65,00
"DisplayName"="Usb Boot Watcher Service"
"ObjectName"="LocalSystem"
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSafeBootMinimalUsbBootWatcherService]
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSafeBootNetworkUsbBootWatcherService]
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicespciide]
"Start"=dword:00000000
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesintelide]
"Start"=dword:00000000
2.3.2 Open WordPad, copy the following code into WordPad, and save it as usb2.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesusbccgp]
"Group"="Boot Bus Extender"
"Start"=dword:00000000[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesusbehci]
"Group"="Boot Bus Extender"
"Start"=dword:00000000[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesusbhub]
"Group"="Boot Bus Extender"
"Start"=dword:00000000[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesusbohci]
"Group"="Boot Bus Extender"
"Start"=dword:00000000[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesUSBSTOR]
"Start"=dword:00000000
"Group"="Boot Bus Extender"[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesusbuhci]
"Group"="Boot Bus Extender"
"Start"=dword:00000000
2.4 Shut down and restart to enter Win7 on the V: disk, which is the local VHD Win7. Find the usb1.reg and usb2.reg files created in 2.3, double-click them to run them, and the contents of the files will be written to the VHD Win7 registry.
2.5 Restart and enter local Windows7.
3 In step 2, the USB driver has been changed, and now the system in win7.vhd can run on the mobile hard disk. Plug in the mobile hard disk and copy the D:win7.vhd file to G: (mobile hard disk data disk, prepare more than 15G of free space in advance)
4. Don’t rush to use the mobile hard disk to start the computer, because - the boot has not been established yet! Next we will manually create a boot for G:win7.vhd.
4.1 Completely copy the boot folder and bootmgr file in the local Windows 7 system disk to the root directory of the mobile hard disk F: (this is equivalent to the C drive of the mobile hard disk)
4.2 Enter the c:windowssystem32 folder and copy the following three files to the F:boot folder:
bootsect.exe - used to write boot information to the mobile hard disk MBR
bcdedit.exe - used to create and modify bcd boot items
bcdboot.exe - used to copy bcd boot items
4.3 Run cmd to enter the command line, and run the following commands in sequence:
bcdboot c:windows /sf: - Copy the local Windows 7 boot entry to the F: drive (i.e. the mobile hard disk)
bootsect /nt60 f: /mbr - This command will write the nt60 version of the boot information to the mbr of the mobile hard disk! So be careful not to get the wrong drive letter!
bcdedit /store f:bootbcd /copy {default} /d "Windows 7 VHD USB"
After pressing Enter, return the GUID in this format, {********-****-****-****-************}, follow up I use {GUID} instead in the command
bcdedit /store f:bootbcd /set {GUID} device vhd=[g:]win7.vhd
bcdedit /store f:bootbcd /set {GUID} osdevice vhd=[g:]win7.vhd
bcdedit /store f:bootbcd /set {GUID} detecthal on - Turn on the detecthal parameter, which is very important for the compatibility of mobile win7. Its function is to force detection of hal (commonly known as power management mode) at startup, and has been packaged in the system Everyone knows the importance of this thing). XP doesn’t have this feature…
bcdedit /store f:bootbcd /displayorder {GUID} /addlast
bcdedit /store f:bootbcd /timeout 5
I changed this and that, and finally everything was changed. OK, now everything is ready.
5 Shut down the machine and start Y450 using the mobile hard disk...
6 You can also use it to start Dell D630, hehe... Windows7 will automatically install the driver when it is started for the first time.
7 You can also use it to start the 2001 vintage machine, P4 1.5G, 512M memory, USB1.1, bios does not have a USB boot option. After I plug in the mobile hard disk, I can see the mobile hard disk from the hard disk item. After booting from it Successfully enter the WIN7 USB VHD system! Of course, because of USB1.1, the startup time is 5 minutes... As for the running speed, I can feel a clear sense of stagnation... There is no way, USB2.0 was not a thing when this old machine left the factory. There are also network cards, sound cards, and graphics card drivers that cannot be recognized... They are too old!
8 You can also use it to start next year's mainstream computers, USB3.0+SSD solid state drive, isn't it faster than a local hard drive? ! Drooling YY...
Note: Regarding the choice of Windows 7 version, first, you must choose the ultimate version, because only the ultimate version supports VHD! Second, you need to consider the issue of activating Windows 7, because when you start this system on other machines, Windows will ask you to reactivate it because the hardware has changed... If yours is a specific OEM version, it is likely that you will not be able to start another system. computer.