CREATING VIRTUAL WINDOWS 7 IN FLASHDISK
INSTALLING VIRTUAL WINDOWS 7 IN FLASHDISK
1.Burning windows 7 installer iso into an installer flashdisk with rufus.
2.Switch to Linux.
3.First, plug in the installation-target flashdisk to computer, so it will get the sdb port. Then plug in the windows 7 installer flashdisk (sdc port).
4.Format the installation-target flashdisk (sdb) with gparted and make 2 partitions:.
DSWIN partition: 20gb minimum, ntfs, boot flag.
DSGRB partition: 50mb minimum, fat32.
5.Create 2 vmdks:
Installer flashdisk (sdc) and give it name "win7_iso.vmdk".
Installation-target flashdisk (sdb) and give it name "win7_sys.vmdk".
6.Open virtualbox and set the harddisk as follows:
AHCI controller.
Insert win7_iso.vmdk as SATA0.
Insert win7_sys.vmdk as SATA1.
7.Install windows 7 on DSWIN.
TEMPORARY BOOT WINDOWS 7
8.Turn off virtual machine.
9.Mount DSWIN and DSGRB.
10.Copy "bootmgr", "bootsec", and the entire "boot" folder from installer flashdisk (sdc) to DSWIN.
11.Create folder "master" on DSWIN partition and copy bootice, net-framework-4 installer, winrar, and vbox-addition into that folder.
12.Install grub into the MBR of installation-target flashdisk (sdb) with target folder: DSGRB partition.
13.Create new file name "grub/grub.cfg" in DSGRB partition and fill it with this text:
set root=(hd0,msdos1)
ntldr /bootmgr
boot
14.Unmount DSWIN and DSGRB.
15.Delete win7_iso.vmdk from virtualbox.
16.Booting windows 7.
CREATE PERMANENT BOOTING
17.Fix bootmgr's bcd with command: "C:/boot/bootsect.exe /nt60 ALL /force".
18.Change sdbs MBR from GRUB to Win-NT6 using bootice.
19.Restart windows 7.
20.Check the bcdedit. If boot table exists, delete “INSTALL WINDOWS 7” option from bootmgr using bcdedit /delete.
21.Restart windows 7.