-
Notifications
You must be signed in to change notification settings - Fork 74
Using LUV Script modify_luv_netboot_efi.py
The modify_luv_netboot_efi.py script modifies the configuration parameters in an EFI binary. The parameters are used to configure features when booting LUV via a network. Two such features are network debugging via netconsole and sending test results to a centralized location (such as a web server),
Modifying the binary with a script could render it unreadable. For this reason, the script only let users modify the LUV configuration parameters and ensures that the bootable image continues to be usable.
Prerequisites of Usage
The script is written in python and is compatible with python versions 2.7 and 3. Confirm that one of these versions of python is installed on the machine where the script resides.
The two basic forms of the command to execute the script are shown below without arguments.
$ python modify_luv_netboot_efi.py
Or
$ ./modify_luv_netboot_efi.py
Note: Executing the script without arguments returns an error because you must specify the EFI binary.
Arguments can be provided in any order. A table of arguments and their meanings is shown below:
Usage: modify_luv_netboot_efi.py [-h] [-f FILENAME] [-n LUV_NETCONSOLE] [-u URL_LINK] [-v]
Argument Destination Explanation
-h --help - Show this help message and exit.
-f --file FILENAME Read data from FILENAME.
-n --netconsole LUV_NETCONSOLE The format of the netconsole: 10.11.12.13,64001
-u --url URL_LINK The format of URL_LINK is: http://ipaddress/cgi-bin/upload.php
-v --verbose - Use -v for verbose mode.
An example of correctly specifying the arguments is shown below.
$ ./modify_luv_netboot_efi.py -f /path/to/luv-netboot-image.efi -n 10.20.30.40,64001 -u http://ipaddress/cgi-bin/upload.php
In the example above, we assigned FILENAME to the --file argument, the IP address and port to the --netconsole argument, and the URL to the --url argument. The key part of this example is that the correct values were passed to the arguments. The arguments can appear in any order.
To see which parameters have changed or if the script is reading the correct EFI binary, use the verbose optional argument (-v or --verbose):
$ ./modify_luv_netboot_efi.py -u http://ipaddress/cgi-bin/upload.php -f /path/to/luv-netboot-image.efi -n 10.20.30.40,64001 -v
For information on how to get the correct URL for the web server if you already have or created one, refer to the documentation link. Also, refer to “Steps on how to get IP address and choose port number” under section IV in meta-luv/README if you are unsure of choosing the port number or the IP address.
Any questions or concerns? Ask us at [email protected].