Skip to content

Commit f55acf6

Browse files
authored
Add UEFI booting method documentation (#128)
* Add UEFI booting method documentation Fixes #127
1 parent ec0bde2 commit f55acf6

File tree

2 files changed

+100
-0
lines changed

2 files changed

+100
-0
lines changed

docs/booting/uefi.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
id: uefi
3+
title: Booting from a Local UEFI Executable
4+
sidebar_label: Boot from UEFI
5+
sidebar_position: 8
6+
description: "How to use a local UEFI executable to boot into netboot.xyz"
7+
hide_table_of_contents: true
8+
---
9+
10+
## Overview
11+
12+
This guide describes how to boot into netboot.xyz using a local UEFI executable. This method involves placing the UEFI executable on the EFI system partition and configuring the UEFI boot manager to boot from it.
13+
14+
## UEFI Boot Manager
15+
16+
The UEFI boot manager is responsible for managing the boot process on UEFI-based systems. It uses boot entries stored in NVRAM to determine the boot order and which bootloader to execute. The boot entries are identified by their boot numbers (e.g., Boot0001, Boot0002) and can be managed using the `efibootmgr` tool.
17+
18+
### BootOrder and BootNext Variables
19+
20+
The `BootOrder` variable defines the order in which the boot entries are attempted. The `BootNext` variable specifies a single boot entry to be used for the next boot only, after which the system reverts to the `BootOrder`.
21+
22+
## Using `efibootmgr` to Manage UEFI Boot Entries
23+
24+
The `efibootmgr` tool allows you to manage UEFI boot entries from within a running operating system. You can use it to create, delete, and modify boot entries, as well as change the boot order.
25+
26+
### Adding a Boot Entry
27+
28+
To add a new boot entry for the netboot.xyz UEFI executable, use the following command:
29+
30+
```bash
31+
sudo efibootmgr --create --disk /dev/sdX --part Y --label "netboot.xyz" --loader /EFI/netboot.xyz/netboot.xyz.efi
32+
```
33+
34+
Replace `/dev/sdX` with the disk containing the EFI system partition, and `Y` with the partition number of the EFI system partition.
35+
36+
### Changing the Boot Order
37+
38+
To change the boot order and make the new boot entry the first in the list, use the following command:
39+
40+
```bash
41+
sudo efibootmgr --bootorder XXXX,YYYY,ZZZZ
42+
```
43+
44+
Replace `XXXX` with the boot number of the new netboot.xyz entry, and `YYYY, ZZZZ` with the boot numbers of other entries in the desired order.
45+
46+
## Other Boot Methods
47+
48+
### GRUB
49+
50+
You can use GRUB to boot the netboot.xyz UEFI executable by adding a custom menu entry to the GRUB configuration file. Add the following entry to `/etc/grub.d/40_custom`:
51+
52+
```bash
53+
menuentry "netboot.xyz" {
54+
search --no-floppy --file --set=root /EFI/netboot.xyz/netboot.xyz.efi
55+
chainloader /EFI/netboot.xyz/netboot.xyz.efi
56+
}
57+
```
58+
59+
After adding the entry, update the GRUB configuration:
60+
61+
```bash
62+
sudo update-grub
63+
```
64+
65+
### systemd-boot
66+
67+
To add a boot entry for netboot.xyz in systemd-boot, create a new file in the `/boot/loader/entries/` directory with the following content:
68+
69+
```ini
70+
title netboot.xyz
71+
efi /EFI/netboot.xyz/netboot.xyz.efi
72+
```
73+
74+
### rEFInd
75+
76+
To add a boot entry for netboot.xyz in rEFInd, create a new file in the `/boot/EFI/refind/` directory with the following content:
77+
78+
```ini
79+
menuentry "netboot.xyz" {
80+
loader /EFI/netboot.xyz/netboot.xyz.efi
81+
}
82+
```
83+
84+
### UEFI Shell
85+
86+
You can also boot the netboot.xyz UEFI executable from the UEFI Shell. To do this, navigate to the directory containing the executable and run the following command:
87+
88+
```shell
89+
fsX:
90+
cd EFI\netboot.xyz
91+
netboot.xyz.efi
92+
```
93+
94+
Replace `fsX:` with the appropriate filesystem identifier for the EFI system partition.
95+
96+
## Vendor-Specific Boot Menu Options
97+
98+
Some vendors provide options in the boot menu to select an arbitrary UEFI executable to boot from. Consult your system's documentation for instructions on how to access and use these options.

docs/quick-start.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ chain --autofree http://boot.netboot.xyz/ipxe/netboot.xyz.efi
2424

2525
This will load the appropriate netboot.xyz kernel with all of the proper options enabled.
2626

27+
You can also boot into netboot.xyz using a local UEFI executable. This method involves placing the UEFI executable on the EFI system partition and configuring the UEFI boot manager to boot from it. For more details, refer to the [Booting from a Local UEFI Executable](https://netboot.xyz/docs/booting/uefi) guide.
28+
2729
:::info
2830

2931
If your version of iPXE has HTTPS support compiled in, you can retrieve those images over HTTPS. By default the upstream iPXE project does not compile in HTTPS support.

0 commit comments

Comments
 (0)