Linux* UEFI Validation Project
=============================

This is the live image for LUV 2.1, a Linux* distribution
designed for testing ACPI and UEFI firmware implementations. Included in
this image are the following test suites for testing ACPI and UEFI
firmware,

 - BITS-2079
 - Firmware Test Suite V17.06.00
 - CHIPSEC v1.3.1
 - NDCTL v56
 - Linux kernel v4.11 efivarfs selftests

This document also provides detailed instructions on how to flash the image
on the USB or other removable media.

If you are new to LUV(Linux* UEFI Validation) and want to know about it,
please visit https://01.org/linux-uefi-validation and explore different
sections in that page. This document can be very useful if you are trying
to flash LUV on to the USB stick for the very first time.

Flashing the .img on to the removable media in Microsoft® Windows®
****************************************************************

These steps help you create a bootable USB disk. Make sure your USB disk
has sufficient space to save luv.results and boot directory.

Note: Make sure you back up the data on the USB stick, as this procedure
results in erasing the entire drive.

There are many utilities that flashes the image on the USB disk. If you
want to flash this image in your machine running Windows® operating system,
try getting this utility http://sourceforge.net/projects/win32diskimager/
and install it.

Open win32diskimager and select the folder that has .img file and select
the appropriate letter (if you have many USB sticks inserted in your
machine running Windows® operating system) usually it is D or E and
then hit write. Once done, exit the win32diskimager and your USB stick is
good to go.

To know how to run LUV in a system, scroll down to this document and
follow the instructions.

Flashing the .img on to the removable media in Linux machine
**************************************************************

In Linux you can get the utilities like UNetbootin that flash the image just
like we have win32diskimager in machine running Windows® operating system.
If you prefer not to use utilities, then we have powerful 'dd' command in
Linux that does flash any image on to the USB stick.

Note: Backup your data in your SD card or USB stick.

However, there are risks involved in using dd command. If you cannot identify the
correct device/disk name for your USB stick, you might end up writing it to your
system's hard disk instead. To avoid confusion remove all other removable media
(USB/SD cards) from the system.

Check for disk names (i.e,find the x in /dev/sdx of your disk). Checking for disk
names vary from one Linux distribution to other.

Here is an example on how to do it in Ubuntu:

In order to identify the correct device name for your USB stick please do the
following.

1) Before you insert USB stick do 'df'(as a root) to know what all the
devices present

# df

Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/sda2      444445808 233457356 188388876  56% /
none                   4         0         4   0% /sys/fs/cgroup
udev             8006264         4   8006260   1% /dev
tmpfs            1617020      1580   1615440   1% /run
none                5120         0      5120   0% /run/lock
none             8085096      1060   8084036   1% /run/shm
none              102400        60    102340   1% /run/user
/dev/sda1         523248      3428    519820   1% /boot/efi

watch for /media/'name of your removable media' under "mounted on"
section when you do 'df' command.

2) Now insert the USB/SD card in to the system and do the same 'df' command and
watch for /media/name-of-your-removable-media and this time you should be
able to find it.

# df

Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/sda2      444445808 233456984 188389248  56% /
none                   4         0         4   0% /sys/fs/cgroup
udev             8006264         4   8006260   1% /dev
tmpfs            1617020      1572   1615448   1% /run
none                5120         0      5120   0% /run/lock
none             8085096      1088   8084008   1% /run/shm
none              102400        64    102336   1% /run/user
/dev/sda1         523248      3428    519820   1% /boot/efi
/dev/sdb1       15613952         8  15613944   1% /media/whoami/NEW VOLUME

Look out for /dev/sd 'whatever the letter you see' under filesystem on the same
line as you found the /media/whoami/name-of-your-removable-media. whoami is
hypothetical user name.

Once your identified the name of the your device under filesystem, we are all
set!. (example i.e /dev/sdb1 or /dev/sdc1 or /dev/sdd1)

3) Flash your .img on to your removable media.

# dd if=/path/to/luv-live-image.img of=/dev/sdx

x= represents the letter you identified under filesystem when you do 'df' command.
example : dd if=/home/path/to/luv-live-image.img of=/dev/sdb (if x=b)

Note: Do not provide the number (1 or 2). Providing the letter should be sufficient.
example: (sdb or sdc or sdd but not sdb1 or sdc1)

Once you are done flashing the image, you should identify two partitions of your
removable media. One is boot directory and luv-results. You can check this
using 'df' command

# df

Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/sda2      444445808 233455032 188391200  56% /
none                   4         0         4   0% /sys/fs/cgroup
udev             8006264         4   8006260   1% /dev
tmpfs            1617020      1576   1615444   1% /run
none                5120         0      5120   0% /run/lock
none             8085096      1100   8083996   1% /run/shm
none              102400        68    102332   1% /run/user
/dev/sda1         523248      3428    519820   1% /boot/efi
/dev/sdb1           8164         0      8164   0% /media/whoami/luv-results
/dev/sdb2          84838     83956       882  99% /media/whoami/boot

Watch for /media/whoami/luv-results and /media/whoami/boot.

Boot LUV in any platform
**************************
Once you are ready with USB stick flashed with .img, power off the test machine
and insert the USB stick.

Note: Some systems automatically boots LUV.

In some systems user is presented with a menu of bootable partitions or need to go
to boot options menu manually by hitting the appropriate key (usually it is F12,
F10 or F2) that user would see in startup screen. In the boot partitions menu,
select the second partition of removable media (identify that disk with the name)
and hit enter.

If your system has UEFI shell as one of the boot options, enter in to the shell and
identify the filesystem (example fs1, fs0 etc.,) that has LUV (EFI partition) in it.

1) Enter the filesystem that has LUV in it (example fs0:)

2) cd EFI

3) cd BOOT

4) bootx64.efi or grubx64.efi (whichever works for you)

Congratulations!, you are running LUV on your system :)

Alternatively, user can change the boot order and have the second partition in first
order if none of the above methods work.

More information
================

For further information on the Linux UEFI Validation project, please
visit,

  https://01.org/linux-uefi-validation

The source code for luv can be obtained by visiting,

  https://github.com/01org/luv-yocto

Alternatively, to discuss the development of luv or the results of
running the tests please send e-mail to,

  luv@lists.01.org


Ubuntu is a registered trademark of Canonical Ltd.
Microsoft, Encarta, MSN, and Windows are either registered trademarks or trademarks of
Microsoft Corporation in the United States and/or other countries.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
