|
楼主 |
发表于 2012-9-4 15:10:42
|
显示全部楼层
6. Install Vista, 2008, Windows 7, 2008, Windows 8 32- and 64-bit to a virtual disk file from a physical cdrom First, boot your computer using the physical cdrom.
Once you see the Install button, on Vista/2008, you need to click it first, then you can press Shift F10 key to launch the command window. On Windows 7/2008R2, you can press Shift-F10 without clicking the Install button.
Once the command window appears, you need to run the following commands to create a virtual disk and the mount it:
32-bit:c:\vboot\tools\x86\vbootctl.exe createhd c:\win7.vhd /size 40 c:\vboot\tools\x86\vbootctl mount c:\win7.vhd /setup64-bit:c:\vboot\tools\amd64\vbootctl.exe createhd c:\win7.vhd /size 40 c:\vboot\tools\amd64\vbootctl mount c:\win7.vhd /setup (for 64-bit) After this, you proceed the installation as usual. At one step, you need to select a disk to install Windows, make sure you select the virtual disk, usually the last disk.
After reboot, your virtual disk is ready to go, and finally, you can boot to the virtual disk using this entry:
menuentry "Vista VHD" { vboot harddisk=(hd0,1)/vista.vhd}vbootedit.exe create title="Vista VHD" harddisk=c:\vista.vhd 7. Install Vista, Windows 7, Windows 8 and Windows 2008 to a virtual disk file using a simple command lineTo make the installation experience really simple, we have created a command line to help you. You can simply run this command line using your Windows CD/DVD or .ISO file as input, by the end, you will have a bootable virtual disk file that you can add to VBoot Loader, and boot to it.
For example, you can run the following commands to create a 80G Windows 7 VMDK file, then add a boot entry to VBoot Loader.
(1) vbootctl make c:\win7.vhd c:\en_windows_7_x86.iso /size 80(2) vbootedit.exe create title="Windows 7 VMDK Boot" harddisk=c:\win7.vhd After reboot, you should see an entry named as "Windows 7 VMDK Boot", and you select it to boot to Windows 7 VMDK.
Note that this command does not work for Windows 2000, Windows XP and Windows 2003.
It's recommended to run this command on Windows Vista and above hosts. If you run this command on Windows XP, you will have trouble booting to the virtual disk file, and you need to run "bootsect.exe" utility to correct the NTFS boot sectors.
The full syntax is described as follows:
D:\vboot\tools\x86>vbootctl.exe makeSYNTAX: vbootctl make diskfile source [/imageIndex index] [/size size_in_G] [/format VDI|VHD|VMDK] [/fixed]OPTIONS: diskfile Specify the path to the new virtual disk file to create. It can be a .vmdk, .vhd or .vdi file. source Specify the source of Windows OS. It can be an .iso file, or cdrom drive, or a .wim file. /imageIndex index Specify the 1-based index that identifies the image within the WIM file. /size size_in_G Specify the virtual disk size in giga bytes, e.g., 1.5. Default size is 16G if you don't specify any size. /format Specify virtual disk format: VDI, VHD or VMDK. Default is VHD format. /fixed The virtual disk is fixed, all space will be allocated.EXAMPLES: vbootctl make c:\win7.vhd en_windows_7_x86.iso /size 80 vbootctl make c:\win7.vhd E:\ /size 80 vbootctl make c:\win7.vhd E:\sources\install.wim /size 80 8. Converting virtual disk files to become bootable via VBoot If you already have a virtual disk file, such as Windows 7 or Windows 8 Native boot VHD file, you can run the following command to make it to become bootable using VBoot. This command will install the correct components to your existing virtual disk file.
For example, you can run the following command to prepare the vhd file so it can boot with VBoot.
vbootctl prepare c:\my-windows7.vhd 9. Virtual disk paths VBoot Loader is is the first software program that runs when your computer starts. It is responsible for loading and transferring control to the operating system kernel software. When VBoot first starts, Windows or Linux has not started yet, so you can't use Windows or Linux paths, such as c:\win7.vhd, or /boot/win7.vhd.
VBoot Loader is modified from the popular GRUB2 boot loader, in particular, VBoot Loader supports loading operating system from virtual disk files in various disk formats, including VHD, VMDK, VDI, ISO and raw images, and you can use the same format as GRUB2 for file paths.
There are three formats:
- (hdx,y)/path/file.ext
x is the disk number starting from 0, and y is the partition number starting from 1, the rest is the absolute path in UNIX format.
For example, the path (hd0,1)/vboot/win7.vhd indicates the file win7.vhd is inside /vboot folder on hard disk 0 and partition 1. - (UUID=16-hex-bytes)/path/file.ext UUID is a 16 bytes hex digit id for the volume. For example, you can use (UUID=c6803bae803ba439)/vboot/win7.vhd to represent the same file as mentioned above format.
Each volume usually has a unique id after it has been formated. If you perform a reformat on the volume, this id will change.
To find the uuid for a volume on Windows, you can run this command:
vbootedit uuid C: Inside VBoot Loader, you can enter this command to get the uuid for a volume:
probe -u (hd0,1) - (LABEL=volume-label)/path/file.ext
The label format is similar to UUID format. You can find a volume's label by right click the properties dialog on Windows host.
For example, you can use (LABEL=OS)/vboot/win7.vhd to represent the same file as discussed in (1) and (2) above.
Most of the time, you can choose your favorite format. However, when error occurs, you may want to try the others. In particular, when you boot from a USB drive, the first format may give you problems, because at boot time your USB drive is (hd0), but after Windows boots up, it becomes (hd1), so in this case, you always need to use UUID or LABEL formats.
10. Converting virtual disk files between different formats VBoot natively supports a variety of disk image formats that you can find from popular virtual machine software, including VHD, VMDK, VDI and Raw. If for some reason you want to convert from one format to the other, you can use the vbootctl program that ships with VBoot to convert virtual disk files between different formats.
For example, the following command converts VDI file to a VMDK file:
vbootctl convertvd c:\win7.vdi c:\win7.vmdk The full syntax of the command is listed below:
SYNTAX: vbootctl converthd src_diskfile dst_diskfile [/srcfmt format] [/dstfmt format]OPTIONS: src_diskfile Specify the path to the source virtual disk file. It can be a .vdi, .vmdk, or .vhd file. dst_diskfile Specify the path to the destination virtual disk file. It can be a .vdi, .vmdk, or .vhd file. [/srcfmt format] Specify the source format, "VDI", "VMDK" or "VHD". [/dstfmt format] Specify the destionation format, "VDI", "VMDK" or "VHD".EXAMPLES: vbootctl comvertvd disk1.vmdk disk1.vdi
|
|