mirror of
https://github.com/limine-bootloader/limine
synced 2025-01-14 00:29:19 +03:00
docs: Move usage to USAGE.md and install that instead of README.md
This commit is contained in:
parent
8d4b888580
commit
d83e03c1eb
@ -158,7 +158,7 @@ install: all
|
||||
$(INSTALL_DATA) '$(call SHESCAPE,$(SRCDIR))/CONFIG.md' '$(call SHESCAPE,$(DESTDIR)$(docdir))/'
|
||||
$(INSTALL_DATA) '$(call SHESCAPE,$(SRCDIR))/PROTOCOL.md' '$(call SHESCAPE,$(DESTDIR)$(docdir))/'
|
||||
$(INSTALL_DATA) '$(call SHESCAPE,$(SRCDIR))/PHILOSOPHY.md' '$(call SHESCAPE,$(DESTDIR)$(docdir))/'
|
||||
$(INSTALL_DATA) '$(call SHESCAPE,$(SRCDIR))/README.md' '$(call SHESCAPE,$(DESTDIR)$(docdir))/'
|
||||
$(INSTALL_DATA) '$(call SHESCAPE,$(SRCDIR))/USAGE.md' '$(call SHESCAPE,$(DESTDIR)$(docdir))/'
|
||||
$(INSTALL) -d '$(call SHESCAPE,$(DESTDIR)$(mandir))/man1'
|
||||
$(INSTALL_DATA) '$(call SHESCAPE,$(BUILDDIR))/man/man1/limine.1' '$(call SHESCAPE,$(DESTDIR)$(mandir))/man1/'
|
||||
$(INSTALL) -d '$(call SHESCAPE,$(DESTDIR)$(datarootdir))'
|
||||
@ -202,7 +202,7 @@ uninstall:
|
||||
rm -f '$(call SHESCAPE,$(DESTDIR)$(docdir))/CONFIG.md'
|
||||
rm -f '$(call SHESCAPE,$(DESTDIR)$(docdir))/PROTOCOL.md'
|
||||
rm -f '$(call SHESCAPE,$(DESTDIR)$(docdir))/PHILOSOPHY.md'
|
||||
rm -f '$(call SHESCAPE,$(DESTDIR)$(docdir))/README.md'
|
||||
rm -f '$(call SHESCAPE,$(DESTDIR)$(docdir))/USAGE.md'
|
||||
rm -f '$(call SHESCAPE,$(DESTDIR)$(mandir))/man1/limine.1'
|
||||
rm -f '$(call SHESCAPE,$(DESTDIR)$(bindir))/limine'
|
||||
rm -rf '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine'
|
||||
@ -315,6 +315,7 @@ dist:
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/.git"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/.gitignore"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/.github"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/README.md"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/autom4te.cache"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/test"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/test.mk"
|
||||
|
112
README.md
112
README.md
@ -145,117 +145,9 @@ To install Limine, run:
|
||||
make install # (or gmake where applicable)
|
||||
```
|
||||
|
||||
## How to use
|
||||
## Usage
|
||||
|
||||
### UEFI
|
||||
The `BOOT*.EFI` files are valid EFI applications that can be simply copied to
|
||||
the `/EFI/BOOT` directory of a FAT formatted EFI system partition. These files can
|
||||
be installed there and coexist with a BIOS installation of Limine (see below) so
|
||||
that the disk will be bootable on both BIOS and UEFI systems.
|
||||
|
||||
The boot device must contain the `limine.cfg` files in
|
||||
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
||||
partitions, formatted with a supported file system (the ESP partition is recommended).
|
||||
|
||||
### Secure Boot
|
||||
Limine can be booted with secure boot if the executable is signed and the key used to
|
||||
sign it is added to the firmware's keychain. This should be done in combination with enrolling
|
||||
the BLAKE2B hash of the Limine config file into the Limine EFI executable image itself for
|
||||
verification purposes.
|
||||
For more information see the `limine enroll-config` program and [the philosophy](PHILOSOPHY.md).
|
||||
|
||||
### BIOS/MBR
|
||||
In order to install Limine on a MBR device (which can just be a raw image file),
|
||||
run `limine bios-install` as such:
|
||||
|
||||
```bash
|
||||
limine bios-install <path to device/image>
|
||||
```
|
||||
|
||||
The boot device must contain the `limine-bios.sys` and `limine.cfg` files in
|
||||
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
||||
partitions, formatted with a supported file system.
|
||||
|
||||
### BIOS/GPT
|
||||
If using a GPT formatted device, there are 2 options one can follow for
|
||||
installation:
|
||||
* Specifying a dedicated stage 2 partition.
|
||||
* Letting `limine bios-install` attempt to embed stage 2 within GPT structures.
|
||||
|
||||
In case one wants to specify a stage 2 partition, create a partition on the GPT
|
||||
device of at least 32KiB in size, and pass the 1-based number of the partition
|
||||
to `limine bios-install` as a second argument; such as:
|
||||
|
||||
```bash
|
||||
limine bios-install <path to device/image> <1-based stage 2 partition number>
|
||||
```
|
||||
|
||||
In case one wants to let `limine bios-install` embed stage 2 within GPT's structures,
|
||||
simply omit the partition number, and invoke `limine bios-install` the same as one
|
||||
would do for an MBR partitioned device.
|
||||
|
||||
The boot device must contain the `limine-bios.sys` and `limine.cfg` files in
|
||||
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
||||
partitions, formatted with a supported file system.
|
||||
|
||||
### BIOS/UEFI hybrid ISO creation
|
||||
In order to create a hybrid ISO with Limine, place the
|
||||
`limine-uefi-cd.bin`, `limine-bios-cd.bin`, `limine-bios.sys`, and `limine.cfg` files
|
||||
into a directory which will serve as the root of the created ISO.
|
||||
(`limine-bios.sys` and `limine.cfg` must either be in the root, `limine`, `boot`, or
|
||||
`boot/limine` directory; `limine-uefi-cd.bin` and `limine-bios-cd.bin` can reside
|
||||
anywhere).
|
||||
|
||||
After that, create a `<ISO root directory>/EFI/BOOT` directory and copy the
|
||||
relevant Limine EFI executables over (such as `BOOTX64.EFI`).
|
||||
|
||||
Place any other file you want to be on the final ISO in said directory, then
|
||||
run:
|
||||
```
|
||||
xorriso -as mkisofs -b <relative path of limine-bios-cd.bin> \
|
||||
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||
--efi-boot <relative path of limine-uefi-cd.bin> \
|
||||
-efi-boot-part --efi-boot-image --protective-msdos-label \
|
||||
<root directory> -o image.iso
|
||||
```
|
||||
|
||||
*Note: `xorriso` is required.*
|
||||
|
||||
And do not forget to also run `limine bios-install` on the generated image:
|
||||
```
|
||||
limine bios-install image.iso
|
||||
```
|
||||
|
||||
`<relative path of limine-bios-cd.bin>` is the relative path of
|
||||
`limine-bios-cd.bin` inside the root directory.
|
||||
For example, if it was copied in `<root directory>/boot/limine-bios-cd.bin`,
|
||||
it would be `boot/limine-bios-cd.bin`.
|
||||
|
||||
`<relative path of limine-uefi-cd.bin>` is the relative path of
|
||||
`limine-uefi-cd.bin` inside the root directory.
|
||||
For example, if it was copied in
|
||||
`<root directory>/boot/limine-uefi-cd.bin`, it would be
|
||||
`boot/limine-uefi-cd.bin`.
|
||||
|
||||
### BIOS/PXE boot
|
||||
The `limine-bios-pxe.bin` binary is a valid PXE boot image.
|
||||
In order to boot Limine from PXE it is necessary to setup a DHCP server with
|
||||
support for PXE booting. This can either be accomplished using a single DHCP
|
||||
server or your existing DHCP server and a proxy DHCP server such as dnsmasq.
|
||||
|
||||
`limine.cfg` and `limine-bios.sys` are expected to be on the server used for boot.
|
||||
|
||||
### UEFI/PXE boot
|
||||
The `BOOT*.EFI` files are compatible with UEFI PXE.
|
||||
The steps needed to boot Limine are the same as with BIOS PXE,
|
||||
except that the `limine-bios.sys` file is not needed on the server.
|
||||
|
||||
### Configuration
|
||||
The `limine.cfg` file contains Limine's configuration.
|
||||
|
||||
An example `limine.cfg` file can be found in [`test/limine.cfg`](test/limine.cfg).
|
||||
|
||||
More info on the format of `limine.cfg` can be found in [`CONFIG.md`](CONFIG.md).
|
||||
See [USAGE.md](USAGE.md).
|
||||
|
||||
## Acknowledgments
|
||||
Limine uses a stripped-down version of [tinf](https://github.com/jibsen/tinf) for early GZIP decompression.
|
||||
|
109
USAGE.md
Normal file
109
USAGE.md
Normal file
@ -0,0 +1,109 @@
|
||||
# Usage
|
||||
|
||||
### UEFI
|
||||
The `BOOT*.EFI` files are valid EFI applications that can be simply copied to
|
||||
the `/EFI/BOOT` directory of a FAT formatted EFI system partition. These files can
|
||||
be installed there and coexist with a BIOS installation of Limine (see below) so
|
||||
that the disk will be bootable on both BIOS and UEFI systems.
|
||||
|
||||
The boot device must contain the `limine.cfg` files in
|
||||
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
||||
partitions, formatted with a supported file system (the ESP partition is recommended).
|
||||
|
||||
### Secure Boot
|
||||
Limine can be booted with secure boot if the executable is signed and the key used to
|
||||
sign it is added to the firmware's keychain. This should be done in combination with enrolling
|
||||
the BLAKE2B hash of the Limine config file into the Limine EFI executable image itself for
|
||||
verification purposes.
|
||||
For more information see the `limine enroll-config` program and [the philosophy](PHILOSOPHY.md).
|
||||
|
||||
### BIOS/MBR
|
||||
In order to install Limine on a MBR device (which can just be a raw image file),
|
||||
run `limine bios-install` as such:
|
||||
|
||||
```bash
|
||||
limine bios-install <path to device/image>
|
||||
```
|
||||
|
||||
The boot device must contain the `limine-bios.sys` and `limine.cfg` files in
|
||||
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
||||
partitions, formatted with a supported file system.
|
||||
|
||||
### BIOS/GPT
|
||||
If using a GPT formatted device, there are 2 options one can follow for
|
||||
installation:
|
||||
* Specifying a dedicated stage 2 partition.
|
||||
* Letting `limine bios-install` attempt to embed stage 2 within GPT structures.
|
||||
|
||||
In case one wants to specify a stage 2 partition, create a partition on the GPT
|
||||
device of at least 32KiB in size, and pass the 1-based number of the partition
|
||||
to `limine bios-install` as a second argument; such as:
|
||||
|
||||
```bash
|
||||
limine bios-install <path to device/image> <1-based stage 2 partition number>
|
||||
```
|
||||
|
||||
In case one wants to let `limine bios-install` embed stage 2 within GPT's structures,
|
||||
simply omit the partition number, and invoke `limine bios-install` the same as one
|
||||
would do for an MBR partitioned device.
|
||||
|
||||
The boot device must contain the `limine-bios.sys` and `limine.cfg` files in
|
||||
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
||||
partitions, formatted with a supported file system.
|
||||
|
||||
### BIOS/UEFI hybrid ISO creation
|
||||
In order to create a hybrid ISO with Limine, place the
|
||||
`limine-uefi-cd.bin`, `limine-bios-cd.bin`, `limine-bios.sys`, and `limine.cfg` files
|
||||
into a directory which will serve as the root of the created ISO.
|
||||
(`limine-bios.sys` and `limine.cfg` must either be in the root, `limine`, `boot`, or
|
||||
`boot/limine` directory; `limine-uefi-cd.bin` and `limine-bios-cd.bin` can reside
|
||||
anywhere).
|
||||
|
||||
After that, create a `<ISO root directory>/EFI/BOOT` directory and copy the
|
||||
relevant Limine EFI executables over (such as `BOOTX64.EFI`).
|
||||
|
||||
Place any other file you want to be on the final ISO in said directory, then
|
||||
run:
|
||||
```
|
||||
xorriso -as mkisofs -b <relative path of limine-bios-cd.bin> \
|
||||
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||
--efi-boot <relative path of limine-uefi-cd.bin> \
|
||||
-efi-boot-part --efi-boot-image --protective-msdos-label \
|
||||
<root directory> -o image.iso
|
||||
```
|
||||
|
||||
*Note: `xorriso` is required.*
|
||||
|
||||
And do not forget to also run `limine bios-install` on the generated image:
|
||||
```
|
||||
limine bios-install image.iso
|
||||
```
|
||||
|
||||
`<relative path of limine-bios-cd.bin>` is the relative path of
|
||||
`limine-bios-cd.bin` inside the root directory.
|
||||
For example, if it was copied in `<root directory>/boot/limine-bios-cd.bin`,
|
||||
it would be `boot/limine-bios-cd.bin`.
|
||||
|
||||
`<relative path of limine-uefi-cd.bin>` is the relative path of
|
||||
`limine-uefi-cd.bin` inside the root directory.
|
||||
For example, if it was copied in
|
||||
`<root directory>/boot/limine-uefi-cd.bin`, it would be
|
||||
`boot/limine-uefi-cd.bin`.
|
||||
|
||||
### BIOS/PXE boot
|
||||
The `limine-bios-pxe.bin` binary is a valid PXE boot image.
|
||||
In order to boot Limine from PXE it is necessary to setup a DHCP server with
|
||||
support for PXE booting. This can either be accomplished using a single DHCP
|
||||
server or your existing DHCP server and a proxy DHCP server such as dnsmasq.
|
||||
|
||||
`limine.cfg` and `limine-bios.sys` are expected to be on the server used for boot.
|
||||
|
||||
### UEFI/PXE boot
|
||||
The `BOOT*.EFI` files are compatible with UEFI PXE.
|
||||
The steps needed to boot Limine are the same as with BIOS PXE,
|
||||
except that the `limine-bios.sys` file is not needed on the server.
|
||||
|
||||
### Configuration
|
||||
The `limine.cfg` file contains Limine's configuration.
|
||||
|
||||
More info on the format of `limine.cfg` can be found in [`CONFIG.md`](CONFIG.md).
|
Loading…
Reference in New Issue
Block a user