Skip to content

Commit be44e13

Browse files
committed
doc: update WaaG doc
Update batch script documentation and add reference to source of material. Also some grammar cleanup in a few places. Include an updated install_by_vga_gsg.tar.gz with an updated script with copyright/licensing added. Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
1 parent a4abeaf commit be44e13

File tree

4 files changed

+103
-103
lines changed

4 files changed

+103
-103
lines changed

doc/scripts/Virtio-Inject.bat

Lines changed: 0 additions & 45 deletions
This file was deleted.

doc/scripts/mkisofs_both_legacy_and_uefi.bat

Lines changed: 0 additions & 6 deletions
This file was deleted.
-16.1 KB
Binary file not shown.

doc/tutorials/using_windows_as_uos.rst

Lines changed: 103 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Hardware setup
99
The following Intel Kaby Lake NUCs are verified:
1010

1111
.. csv-table::
12-
:header: "Platform Model", "Bios Version", "Download Link"
12+
:header: "Platform Model", "BIOS Version", "BIOS Download Link"
1313

1414
"NUC7i7DNHE", "DNKBLi7v.86A.0052.2018.0808.1344", "`link <https://downloadcenter.intel.com/download/28886?v=t>`__"
1515
"NUC7i5DNHE", "DNKBLi5v.86A.0060.2018.1220.1536", "`link <https://downloadcenter.intel.com/download/28885?v=t>`__"
@@ -131,53 +131,83 @@ Pre-install drivers and re-generate Windows ISO
131131
#. Create a folder on the ``C:`` drive called ``Mount``, so you have a folder ``C:\Mount``
132132

133133
#. Right click the downloaded ``virtio-win-0.1.141.iso`` and select ``Mount``. The ISO will be mounted to a drive;
134-
in my case, it is ``D:``
134+
for example, drive ``D:``
135135

136-
#. Unzip the downloaded Windows graphics driver ``dch_win64_25.20.100.6444.exe`` to a folder,
137-
in my case, it is unzipped to ``C:\Dev\Temp\wim\dch_win64_25.20.100.6444``
138-
139-
.. note:: We use ``7-zip`` to unzip this ``dch_win64_25.20.100.6444.exe`` driver.
136+
#. Use ``7-zip`` or similar utility to unzip the downloaded Windows graphics driver
137+
``dch_win64_25.20.100.6444.exe`` to a folder,
138+
for example, to ``C:\Dev\Temp\wim\dch_win64_25.20.100.6444``
140139

141140
#. Right click the downloaded Windows ISO, for example, ``windows10-17763-107-LTSC.iso``, select ``Mount``,
142-
the ISO will be mounted to a drive; in my case, it is ``E:``
141+
the ISO will be mounted to a drive; for example, drive ``E:``
143142

144-
#. Copy ``E:\sources\boot.wim and E:\sources\install.wim`` to ``C:\WIM``
143+
#. Copy ``E:\sources\boot.wim`` and ``E:\sources\install.wim`` to ``C:\WIM``
145144

146-
#. Depending on your Windows ISO image, varying amounts of images may be included in the ``WIM``.
145+
#. Depending on your Windows ISO image, more than one image may be included in the ``WIM``.
147146
Run ``dism /get-wiminfo /wimfile:C:\WIM\install.wim`` with administrator privileges.
148147
Select the ``Index`` you want. For ``windows10-17763-107-LTSC.iso``,
149148
there is only one ``Index``; it is ``1``
150149

151150
.. figure:: images/install_wim_index.png
152151
:align: center
153152

154-
#. Download the `Virtio-Inject.bat
155-
<https://raw.githubusercontent.com/projectacrn/acrn-hypervisor/master/doc/scripts/Virtio-Inject.bat>`_
156-
to a folder in your Windows PC.
157-
158-
.. note:: If ``virtio-win-0.1.141.iso`` is mounted to a different drive than ``D:``, you need to change the
159-
``driver:d`` in the script according to your case.
160-
161-
.. note:: If you unzipped the Windows graphics driver to a different folder, you must change
162-
``c:\Dev\Temp\wim\dch_win64_25.20.100.6444`` according to your case.
163-
164-
#. Open a command prompt as administrator and go to the folder in which you saved the above ``Virtio-Inject.bat``
165-
and run ``Virtio-Inject.bat``. Make sure no errors occur during the script execution.
166-
167-
.. note:: The execution of the script will take several minutes depending on your working Windows performance.
168-
It will take about 8 minutes on a (KBL NUCi5 + 16G memory) Windows 10 machine.
169-
170-
.. note:: You can split the script above into two parts; one injects drivers into ``boot.wim``,
171-
and the other injects drivers into ``install.wim``. Execute them one at a time if you return
172-
one of the following errors:
173-
174-
- *0xc1420113*: The user attempted to mount to a directory that already contained a mounted image.
175-
This is not supported.
176-
177-
- *0xc1420127*: The specified image in the specified wim is already mounted for read/write access.
178-
179-
#. ``C:\WIM\boot.wim`` and ``C:\WIM\install.wim`` will be updated after you have executed ``Virtio-Inject.bat``
180-
successfully. The following drivers have been pre-installed into the image:
153+
#. Create a batch file named ``virtio-inject-boot.bat`` [1]_ to modify
154+
``boot.wim`` to inject drivers (using the mounted Windows ISO drive
155+
(``D:``), image Index (``1``), and folder where the unzipped Windows
156+
graphics drivers were placed, from the previous steps (update this
157+
batch file as needed)::
158+
159+
REM virt-inject-boot
160+
Set IDX=1
161+
162+
REM Modify boot.wim file to inject drivers
163+
dism /Mount-Wim /WimFile:C:\Wim\boot.wim /Index:%IDX% /MountDir:C:\mount
164+
dism /image:C:\mount /Add-Driver "/driver:d:\balloon\w10\amd64\balloon.inf" /forceunsigned
165+
dism /image:C:\mount /Add-Driver "/driver:d:\NetKVM\w10\amd64\netkvm.inf" /forceunsigned
166+
dism /image:C:\mount /Add-Driver "/driver:d:\viorng\w10\amd64\viorng.inf" /forceunsigned
167+
dism /image:C:\mount /Add-Driver "/driver:d:\vioscsi\w10\amd64\vioscsi.inf" /forceunsigned
168+
dism /image:C:\mount /Add-Driver "/driver:d:\vioserial\w10\amd64\vioser.inf" /forceunsigned
169+
dism /image:C:\mount /Add-Driver "/driver:d:\viostor\w10\amd64\viostor.inf" /forceunsigned
170+
dism /image:C:\mount /Add-Driver "/driver:d:\vioinput\w10\amd64\vioinput.inf" /forceunsigned
171+
dism /image:C:\mount /Add-Driver "/driver:c:\Dev\Temp\wim\dch_win64_25.20.100.6444\Graphics\cui_dch.inf"
172+
dism /image:C:\mount /Add-Driver "/driver:c:\Dev\Temp\wim\dch_win64_25.20.100.6444\Graphics\HdBusExt.inf"
173+
dism /image:C:\mount /Add-Driver "/driver:c:\Dev\Temp\wim\dch_win64_25.20.100.6444\Graphics\iigd_dch.inf"
174+
dism /image:C:\mount /Add-Driver "/driver:c:\Dev\Temp\wim\dch_win64_25.20.100.6444\Graphics\IntcDAud.inf"
175+
dism /image:C:\mount /Add-Driver "/driver:c:\Dev\Temp\wim\dch_win64_25.20.100.6444\Graphics\msdk.inf"
176+
dism /unmount-wim /mountdir:c:\mount /commit
177+
178+
Run this ``virtio-inject-boot.bat`` script in a command prompt
179+
running as administrator. It may take 4-5 minutes to run, depending on
180+
your Windows system performance.
181+
182+
#. Similarly, create another batch file named
183+
``virtio-inject-install.bat`` [1]_ to modify ``install.wim`` to inject
184+
drivers (and verify the ISO drive, image Index, and drivers folder)::
185+
186+
REM virt-inject-install
187+
Set IDX=1
188+
189+
REM Modify install.wim to inject drivers
190+
dism /Mount-Wim /WimFile:C:\WIM\install.wim /Index:%IDX% /MountDir:C:\mount
191+
dism /image:C:\mount /Add-Driver "/driver:d:\balloon\w10\amd64\balloon.inf" /forceunsigned
192+
dism /image:C:\mount /Add-Driver "/driver:d:\NetKVM\w10\amd64\netkvm.inf" /forceunsigned
193+
dism /image:C:\mount /Add-Driver "/driver:d:\viorng\w10\amd64\viorng.inf" /forceunsigned
194+
dism /image:C:\mount /Add-Driver "/driver:d:\vioscsi\w10\amd64\vioscsi.inf" /forceunsigned
195+
dism /image:C:\mount /Add-Driver "/driver:d:\vioserial\w10\amd64\vioser.inf" /forceunsigned
196+
dism /image:C:\mount /Add-Driver "/driver:d:\viostor\w10\amd64\viostor.inf" /forceunsigned
197+
dism /image:C:\mount /Add-Driver "/driver:d:\vioinput\w10\amd64\vioinput.inf" /forceunsigned
198+
dism /image:C:\mount /Add-Driver "/driver:c:\Dev\Temp\wim\dch_win64_25.20.100.6444\Graphics\cui_dch.inf"
199+
dism /image:C:\mount /Add-Driver "/driver:c:\Dev\Temp\wim\dch_win64_25.20.100.6444\Graphics\HdBusExt.inf"
200+
dism /image:C:\mount /Add-Driver "/driver:c:\Dev\Temp\wim\dch_win64_25.20.100.6444\Graphics\iigd_dch.inf"
201+
dism /image:C:\mount /Add-Driver "/driver:c:\Dev\Temp\wim\dch_win64_25.20.100.6444\Graphics\IntcDAud.inf"
202+
dism /image:C:\mount /Add-Driver "/driver:c:\Dev\Temp\wim\dch_win64_25.20.100.6444\Graphics\msdk.inf"
203+
dism /unmount-wim /mountdir:c:\mount /commit
204+
205+
Run this script in a command prompt running as administrator. It may also
206+
take 4-5 minutes to run, depending on your Windows system performance.
207+
208+
209+
#. After running these two scripts the files ``C:\WIM\boot.wim`` and ``C:\WIM\install.wim``
210+
will be updated to install these drivers into the image:
181211

182212
- Virtio-balloon
183213
- Virtio-net
@@ -188,7 +218,7 @@ Pre-install drivers and re-generate Windows ISO
188218
- Virtio-input
189219
- Windows graphics drivers
190220

191-
#. Use 7-zip to unzip the downloaded Windows ISO to a folder; in my case, it is unzipped to
221+
#. Use 7-zip to unzip the downloaded Windows ISO to a folder; for example, into
192222
``C:\Dev\Temp\wim\windows10-17763-107-LTSC``
193223

194224
#. Delete ``C:\Dev\Temp\wim\windows10-17763-107-LTSC\sources\boot.wim`` and
@@ -197,17 +227,28 @@ Pre-install drivers and re-generate Windows ISO
197227
#. Copy ``C:\WIM\boot.wim`` and ``C:\WIM\install.wim`` to ``C:\Dev\Temp\wim\windows10-17763-107-LTSC\sources``
198228

199229
#. Download and unzip `cdrtools-3.01.a23-bootcd.ru-mkisofs.7z
200-
<http://reboot.pro/index.php?app=core&module=attach&section=attach&attach_id=15214>`_ to a folder; in my case,
201-
it is unzipped to ``C:\Dev\Temp\wim\cdrtools-3.01.a23-bootcd.ru-mkisofs``
202-
203-
#. Download the `mkisofs_both_legacy_and_uefi.bat
204-
<https://raw.githubusercontent.com/projectacrn/acrn-hypervisor/master/doc/scripts/mkisofs_both_legacy_and_uefi.bat>`_
205-
to a folder in your Windows PC.
206-
207-
.. note:: Change these parameters to your case: ``inputdir``, ``outputiso``,
208-
``mkisofs.exe path``
209-
210-
#. The ISO will be generated in ``outputiso`` to the location you specified in the script above.
230+
<http://reboot.pro/index.php?app=core&module=attach&section=attach&attach_id=15214>`_ to a folder;
231+
for example, to ``C:\Dev\Temp\wim\cdrtools-3.01.a23-bootcd.ru-mkisofs``
232+
233+
#. Create a batch file named ``mkisofs_both_legacy_and_uefi.bat``
234+
containing (update folder names as needed to reflect where the
235+
referenced files are located on your system, and ``inputdir``,
236+
``outputiso`` and ``mkisofs.exe`` path, downloaded by the previous
237+
step)::
238+
239+
set inputdir=C:\Dev\Temp\wim\windows10-17763-107-LTSC
240+
set outputiso=C:\Dev\Temp\wim\mkisofs_iso\windows10-17763-107-LTSC-Virtio-Gfx.iso
241+
set label="WIN10_17763_107_LTSC_VIRTIO_GFX"
242+
set biosboot=boot/etfsboot.com
243+
set efiboot=efi/microsoft/boot/efisys.bin
244+
C:\Dev\Temp\wim\cdrtools-3.01.a23-bootcd.ru-mkisofs\mingw\mkisofs.exe \
245+
-iso-level 4 -l -R -UDF -D -volid %label% -b %biosboot% -no-emul-boot \
246+
-boot-load-size 8 -hide boot.catalog -eltorito-alt-boot \
247+
-eltorito-platform efi -no-emul-boot -b %efiboot% -o %outputiso% \
248+
%inputdir%
249+
250+
Run this ``mkisofs_both_legacy_and_uefi.bat`` script. The resulting
251+
ISO will be generated in ``outputiso`` location you specified.
211252

212253
Create Raw Disk
213254
---------------
@@ -220,9 +261,11 @@ Run these commands on the Service OS::
220261

221262
Install Windows 10
222263
------------------
223-
Currently, the ACRNGT OVMF GOP driver is not ready; thus, a special VGA version is used to install Windows 10
224-
on ACRN from scratch. The ``acrn.elf``, ``acrn-dm`` and ``OVMF`` binaries are included in the
225-
`tarball <https://raw.githubusercontent.com/projectacrn/acrn-hypervisor/master/doc/tutorials/install_by_vga_gsg.tar.gz>`_
264+
Currently, the ACRNGT OVMF GOP driver is not ready; thus, a special VGA
265+
version is used to install Windows 10 on ACRN from scratch. The
266+
``acrn.elf``, ``acrn-dm`` and ``OVMF`` binaries are included in the
267+
`tarball
268+
<https://raw.githubusercontent.com/projectacrn/acrn-hypervisor/master/doc/tutorials/install_by_vga_gsg.tar.gz>`_
226269
together with the script used to install Windows 10.
227270

228271
#. Uncompress ``install_by_vga_gsg.tar.gz`` to the Service OS::
@@ -372,4 +415,12 @@ Device configurations of acrn-dm command line
372415
to install the virtio Windows driver later. Make sure it points to your VirtIO ISO path.
373416

374417
* *--ovmf /root/bios/OVMF.fd*:
375-
Make sure it points to your OVMF binary path.
418+
Make sure it points to your OVMF binary path
419+
420+
References
421+
**********
422+
423+
.. [1]
424+
These virtio drivers injecting batch script are based on Derek Seaman's IT blog about
425+
`injecting VirtIO Drivers into Windows
426+
<https://www.derekseaman.com/2015/07/injecting-kvm-virtio-drivers-into-windows.html>`_.

0 commit comments

Comments
 (0)