Skip to content

Commit c3b1d0c

Browse files
Geoffroy Van Cutsemjren1
authored andcommitted
Getting Started Guide: update to reflect the new boot flow
The boot process has changed a bit and the ACRN hypervisor is now directly loaded by the platform EFI firmware. This commit reflects those changes and also reference a newer version of Clearlinux that includes the ACRN hypervisor that has these changes in. Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com> Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
1 parent 85716e8 commit c3b1d0c

File tree

4 files changed

+77
-72
lines changed

4 files changed

+77
-72
lines changed
115 KB
Loading
7.45 KB
Loading
-24.9 KB
Loading

doc/getting_started/index.rst

Lines changed: 77 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -45,51 +45,32 @@ need to setup a base Clear Linux OS to bootstrap ACRN on the NUC. You'll
4545
need a network connection for your NUC to complete this setup.
4646

4747
.. note::
48-
ACRN requires Clear Linux version 21260 or newer. The instructions below
49-
have been validated with version 21260 and need some adjustment to work
48+
ACRN requires Clear Linux version 22140 or newer. The instructions below
49+
have been validated with version 22140 and need some adjustment to work
5050
with newer versions. You will see a note when the instruction needs to be
5151
adjusted.
5252

53-
1. Follow this `Clear Linux installation guide
53+
#. Download the compressed Clear installer image from
54+
https://download.clearlinux.org/releases/22140/clear/clear-22140-installer.img.xz
55+
and follow the `Clear Linux installation guide
5456
<https://clearlinux.org/documentation/clear-linux/get-started/bare-metal-install>`__
55-
as a starting point for installing Clear Linux onto your NUC. Download the
56-
``clear-21260-installer.img.xz`` from the https://download.clearlinux.org/releases/21260/clear/
57-
folder to get Clear Linux version 21260.
57+
as a starting point for installing Clear Linux onto your NUC. Follow the recommended
58+
options for choosing an **Automatic** installation type, and using the NUC's
59+
storage as the target device for installation (overwriting the existing data
60+
and creating three partitions on the NUC's SSD drive).
5861

59-
2. At the "Choose Installation Type" screen, choose the "< Automatic >"
60-
option. This will install the minimum Clear Linux components.
62+
#. After installation is complete, boot into Clear Linux, login as
63+
**root**, and set a password.
6164

62-
3. At the "Choose target device for installation" screen, select your
63-
NUC's storage device to delete all existing content and create
64-
partitions automatically. The installer will
65-
create three partitions as shown in :numref:`CL-partitions`
66-
for the recommended 120GB SSD drive.
67-
68-
.. table:: Clear Linux Partitions
69-
:widths: auto
70-
:name: CL-partitions
71-
72-
+-------------+----------+-----------------------+
73-
| Partition | Size | Type |
74-
+=============+==========+=======================+
75-
| /dev/sda1 | 511M | EFI System |
76-
+-------------+----------+-----------------------+
77-
| /dev/sda2 | 32M | Linux swap |
78-
+-------------+----------+-----------------------+
79-
| /dev/sda3 | 111.3G | Linux root (x86-64) |
80-
+-------------+----------+-----------------------+
81-
82-
4. After installation is complete, boot into Clear Linux, login as
83-
root, and set a password.
84-
85-
5. Clear Linux is set to automatically update itself. If you do not want
86-
it to autoupdate, issue this command:
65+
#. Clear Linux is set to automatically update itself. We recommend that you disable
66+
this feature to have more control over when the updates happen. Use this command
67+
to disable the autoupdate feature:
8768

8869
.. code-block:: none
8970
9071
# swupd autoupdate --disable
9172
92-
6. Use the ``swupd bundle-add`` command and add these Clear Linux bundles:
73+
#. Use the ``swupd bundle-add`` command and add these Clear Linux bundles:
9374

9475
.. code-block:: none
9576
@@ -123,80 +104,101 @@ partition. Follow these steps:
123104

124105
.. code-block:: none
125106
126-
127107
# mount /dev/sda1 /mnt
128108
129109
# ls -1 /mnt/EFI/org.clearlinux
130110
bootloaderx64.efi
131-
kernel-org.clearlinux.native.4.15.7-536
132-
kernel-org.clearlinux.pk414-sos.4.14.23-19
133-
kernel-org.clearlinux.pk414-standard.4.14.23-19
111+
kernel-org.clearlinux.native.4.16.6-563
112+
kernel-org.clearlinux.pk414-sos.4.14.34-28
113+
kernel-org.clearlinux.pk414-standard.4.14.34-28
134114
loaderx64.efi
135115
136-
.. note::
137-
Take note of the exact kernel versions (``*-sos`` and ``*-standard``)
138-
as you will need them later.
116+
.. note::
117+
The Clear Linux project releases updates often, sometimes
118+
twice a day, so make note of the specific kernel versions (``*-sos``
119+
and ``*-standard``) listed on your system,
120+
as you will need them later.
121+
122+
#. Put the ``acrn.efi`` hypervisor application (included in the Clear
123+
Linux release) on the EFI partition with:
139124

125+
.. code-block:: none
126+
127+
# mkdir /mnt/EFI/acrn
128+
# cp /usr/share/acrn/acrn.efi /mnt/EFI/acrn/
140129
141-
#. Copy the ``acrn.efi`` hypervisor application (included in the Clear
142-
Linux release) to the EFI partition.
130+
#. Configure the EFI firmware to boot the ACRN hypervisor by default
131+
132+
The ACRN hypervisor (``acrn.efi``) is an EFI executable
133+
loaded directly by the platform EFI firmware. It then in turns loads the
134+
Service OS bootloader. Use the ``efibootmgr`` utility to configure the EFI
135+
firmware and add a new entry that loads the ACRN hypervisor.
143136

144137
.. code-block:: none
145138
146-
# cp /usr/share/acrn/acrn.efi /mnt/EFI/org.clearlinux
139+
# efibootmgr -c -l "\EFI\acrn\acrn.efi" -d /dev/sda1 -p 1 -L ACRN
140+
# cd /mnt/EFI/org.clearlinux/
141+
# cp bootloaderx64.efi bootloaderx64_origin.efi
142+
143+
.. note::
144+
Be aware that a Clearlinux update that includes a kernel upgrade will
145+
reset this. A Clearlinux update could happen automatically (if you have
146+
not disabled it as described above), if you later install a new
147+
bundle to your system or simply if you decide to trigger an update
148+
manually. Whenever that happens, double-check the platform boot order
149+
using ``efibootmgr -v`` and modify it if needed.
147150
148-
#. Create a boot entry for ACRN. It must contain these settings:
151+
#. Create a boot entry for the ACRN Service OS by copying a provided ``acrn.conf``
152+
and editing it to account for the kernel versions noted in a previous step.
153+
154+
It must contain these settings:
149155

150156
+-----------+----------------------------------------------------------------+
151157
| Setting | Description |
152158
+===========+================================================================+
153159
| title | Text to show in the boot menu |
154160
+-----------+----------------------------------------------------------------+
155-
| efi | Executable EFI image |
161+
| linux | Linux kernel for the Service OS (\*-sos) |
156162
+-----------+----------------------------------------------------------------+
157-
| options | Options to pass to the EFI program or kernel boot parameters |
163+
| options | Options to pass to the Service OS kernel (kernel parameters) |
158164
+-----------+----------------------------------------------------------------+
159165

160-
A sample `acrn.conf
166+
A starter acrn.conf configuration file is included in the Clear Linux release and is
167+
also available in the acrn-hypervisor GitHub repo as `acrn.conf
161168
<https://github.com/projectacrn/acrn-hypervisor/tree/master/bsp/uefi/clearlinux/acrn.conf>`__
162-
is included in the Clear Linux release, and is also available in the
163-
acrn-hypervisor GitHub repo (in the bsp/uefi/clearlinux
164-
folder) as shown here:
169+
as shown here:
165170

166171
.. literalinclude:: ../../acrn-hypervisor/bsp/uefi/clearlinux/acrn.conf
167172
:caption: acrn-hypervisor/bsp/uefi/clearlinux/acrn.conf
168173

169-
Copy the ``acrn.conf`` file to the EFI partition we mounted earlier:
174+
On the NUC, copy the ``acrn.conf`` file to the EFI partition we mounted earlier:
170175

171176
.. code-block:: none
172177
173178
# cp /usr/share/acrn/demo/acrn.conf /mnt/loader/entries/
174179
175-
If you're following
176-
the instructions above, the partition (``root=/dev/sda3``) and image
177-
locations used in the ``arcn.conf`` file will match.
180+
You will need to edit this file to adjust the kernel version (``linux`` section)
181+
and also insert the ``PARTUUID`` of your ``/dev/sda3`` partition
182+
(``root=PARTUUID=<><UUID of rootfs partition>``) in the ``options`` section.
178183

179-
.. note::
180-
Please make sure that the kernel version and root filesystem image (``clear-<version>-kvm.img``)
181-
match your set-up.
184+
Use ``blkid`` to find out what your ``/dev/sda3`` ``PARTUUID`` value is.
182185

183186
#. Add a timeout period for Systemd-Boot to wait, otherwise it will not
184187
present the boot menu and will always boot the base Clear Linux
185-
kernel.
186188

187189
.. code-block:: none
188190
189191
# clr-boot-manager set-timeout 20
190192
# clr-boot-manager update
191193
192-
#. Reboot and select "The ACRN Hypervisor" to boot, as shown in
194+
#. Reboot and select "The ACRN Service OS" to boot, as shown in
193195
:numref:`gsg-bootmenu`:
194196

195197
.. figure:: images/gsg-bootmenu.png
196198
:align: center
197199
:name: gsg-bootmenu
198200

199-
ACRN Hypervisor Boot menu
201+
ACRN Service OS Boot menu
200202

201203
#. After booting up the ACRN hypervisor, the Service OS will be launched
202204
automatically by default, as shown in :numref:`gsg-sos-console`:
@@ -240,35 +242,38 @@ directory. Run it to create a network bridge:
240242
Set up Reference UOS
241243
====================
242244

243-
#. Download the pre-built reference Clear Linux UOS image.
245+
#. On your NUC, download the pre-built reference Clear Linux UOS image into your
246+
(root) home directory:
244247

245248
.. code-block:: none
246249
247-
# curl -O https://download.clearlinux.org/releases/21260/clear/clear-21260-kvm.img.xz
250+
# cd ~
251+
# curl -O https://download.clearlinux.org/releases/22140/clear/clear-22140-kvm.img.xz
248252
249253
.. note::
250254
In case you want to use or try out a newer version of Clear Linux as the UOS, you can
251255
download the latest from http://download.clearlinux.org/image. Make sure to adjust the steps
252256
described below accordingly (image file name and kernel modules version).
253257

254-
#. Uncompress it.
258+
#. Uncompress it:
255259

256260
.. code-block:: none
257261
258-
# unxz clear-21260-kvm.img.xz
262+
# unxz clear-22140-kvm.img.xz
259263
260-
#. Deploy the UOS kernel modules to UOS virtual disk image
264+
#. Deploy the UOS kernel modules to UOS virtual disk image (note: you'll need to use
265+
the same **standard** image version number noted in step 1 above):
261266

262267
.. code-block:: none
263268
264-
# losetup -f -P --show /root/clear-21260-kvm.img
265-
# ls /dev/loop0*
269+
# losetup -f -P --show /root/clear-22140-kvm.img
266270
# mount /dev/loop0p3 /mnt
267-
# cp -r /usr/lib/doc/modules/4.14.23-19.pk414-standard /mnt/lib/doc/modules/
271+
# cp -r /usr/lib/doc/modules/4.14.34-28.pk414-standard /mnt/lib/doc/modules/
268272
# umount /mnt
269273
# sync
270274
271-
#. Run the launch_uos.sh script to launch the UOS.
275+
#. Edit and Run the launch_uos.sh script to launch the UOS.
276+
272277
A sample `launch_uos.sh
273278
<https://github.com/projectacrn/acrn-devicemodel/tree/master/samples/launch_uos.sh>`__
274279
is included in the Clear Linux release, and
@@ -282,14 +287,14 @@ Set up Reference UOS
282287

283288
.. note::
284289
In case you have downloaded a different Clear Linux image than the one above
285-
(``clear-21260-kvm.img.xz``), you will need to modify the Clear Linux file name
290+
(``clear-22140-kvm.img.xz``), you will need to modify the Clear Linux file name
286291
and version number highlighted above (the ``-s 3,virtio-blk`` argument) to match
287292
what you have downloaded above. Likewise, you may need to adjust the kernel file
288293
name on the second line highlighted (check the exact name to be used using:
289294
``ls /usr/lib/doc/kernel/org.clearlinux*-standard*``).
290295

291296
By default, the script is located in the ``/usr/share/acrn/demo/``
292-
directory. Run it directly to launch the User OS:
297+
directory. You can edit it there, and then run it to launch the User OS:
293298

294299
.. code-block:: none
295300

0 commit comments

Comments
 (0)