- DHCP server serving PXE information
- TFTP server
- IPXE(
undionly.kpxe
and/oripxe.efi
) memdisk
(From Syslinx, can be found on Ubuntu live/usr/lib/syslinux/memdisk
) on TFTP root- A Win7 installation ISO, I'm using
23572_ENTERPRISE-7-SP1_X64_ZH-CN_PIP.iso
(Google or Baidu it!), it is a special minimal Chinese x64 version created by a Russian guy. - Download this tool: VHD_W7_Compact and extract to
VHD_W7C_88
.
- Install Win7
- Enable Administrator and delete the user created during installation
- Reboot and delete the unused user folder in
C:\Users
- Disable UAC
- Adjust preferences
- Install necessary software (As few as possible, as they also use memory for storage!)
- Install FiraDisk driver, goto
VHD_W7C_88\makebt\firadisk-driver-0.0.1.30
, right clickfiradisk.inf
and clickInstall
.
- Reboot VM into a WinPE environment.
- Run
VHD_W7C_x64.exe
- Choose User path:
C:\User\Administrator
. In some WinPE, the open file dialogs does not work! Switch to another WinPE if you encounter this problem! - In settings, select
Portable
version,Defrag VHD
,NTFS compression
andMake boot menu
. - Boot device is the location of
bootmgr
andBCD
in your VM, normallyC:
. - System drive is the place to put the VHD that is going to be generated, in this case,
C:
. - Set VHD size to 3.9 or 3.0. Normally the image will be much less than 3.0G, in my case, it only takes 1.5G after everything is done, however, without sufficient VHD space, image creation may fail!
- Hit "Go" and start Mini Win7 VHD creation.
- When it prompts done, for Chinese Kapanese Korean users, you have to copy your fonts from "Windows\Fonts" to the VHD, otherwise wide-char won't display.
Reboot and choose Grub4Dos then RAMDISK. You should be able to boot into the RamOS. Check if there is a 3.9G partition after startup.
- In RamOS or WinPE, mount the RamOS VHD in "Disk Management", shrink the windows partition to 2000MB and detach the VHD.
- Use VHD Resizer to resize the VHD file to something like 2020MB (less than 2048MB).
- Upload the 2000MB VHD file to a http server Memdisk or IPXE seem to have an limitation on the maximum size of the image loaded into the memory, 2GB seems to be fine, but 3.9GB VHD no longer works!
On the TFTP server, append the following lines to the ipxe menu file:
:windows7_ramos
kernel memdisk raw harddisk
initrd ${http-root}/W764CNP1.vhd
boot
goto start
Make sure memdisk
is in the TFTP root
Run as admin:
mkdir mnt
Dism /Mount-Image /ImageFile:W764CNP1.vhd /Index:1 /MountDir:mnt
DISM /Image:mnt /Add-Driver /Driver:e1e6232e.inf /ForceUnsigned
Dism /Unmount-Image /MountDir:mnt /Commit
Make sure files in [SourceDisksFiles]
are in the same folder as W764CNP1.vhd and the inf files.
:windows7_ramos_bios
kernel wimboot
initrd ${http-root}/win7_ramos/bootmgr
initrd ${http-root}/win7_ramos/boot/bcd
initrd ${http-root}/win7_ramos/boot/boot.sdi
initrd ${http-root}/win7_ramos/boot.wim
boot
goto start
:windows7_ramos_uefi
kernel wimboot
initrd ${http-root}/win7_ramos/bootmgr.efi
# Disable integrity check
initrd ${http-root}/win7_ramos/efi/microsoft/boot/bcd
initrd ${http-root}/win7_ramos/boot/boot.sdi
initrd ${http-root}/win7_ramos/boot.wim
boot
This seems to be a better solution, it only needs one WIM file for booting. Wim has much better compression rate than NTFS.
http://bbs.wuyou.net/forum.php?mod=viewthread&tid=408544
Can someone download the attachments in the above link and share it?