misc: Add limine subdir to stage3 and config search paths. Closes #225
This commit is contained in:
parent
6202148460
commit
a76691a930
|
@ -5,7 +5,8 @@
|
||||||
Limine scans for a config file on *the boot drive*. Every partition on the boot drive
|
Limine scans for a config file on *the boot drive*. Every partition on the boot drive
|
||||||
is scanned sequentially - first partition first (or, on UEFI, the partition containing the
|
is scanned sequentially - first partition first (or, on UEFI, the partition containing the
|
||||||
EFI executable of the booted Limine is scanned first), last partition last - for the presence
|
EFI executable of the booted Limine is scanned first), last partition last - for the presence
|
||||||
of either a `/limine.cfg`, `/boot/limine.cfg`, or a `/EFI/BOOT/limine.cfg` file, in that order.
|
of either a `/limine.cfg`, `/limine/limine.cfg`, `/boot/limine.cfg`, `/boot/limine/limine.cfg`,
|
||||||
|
or a `/EFI/BOOT/limine.cfg` file, in that order.
|
||||||
|
|
||||||
Once the file is located, Limine will use it as its config file. Other possible
|
Once the file is located, Limine will use it as its config file. Other possible
|
||||||
candidates in subsequent partitions or directories are ignored.
|
candidates in subsequent partitions or directories are ignored.
|
||||||
|
|
18
README.md
18
README.md
|
@ -127,9 +127,9 @@ the `/EFI/BOOT` directory of a FAT formatted EFI system partition. These files c
|
||||||
be installed there and coexist with a BIOS installation of Limine (see below) so
|
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.
|
that the disk will be bootable on both BIOS and UEFI systems.
|
||||||
|
|
||||||
The boot device must to contain the `limine.cfg` file in
|
The boot device must to contain the `limine.cfg` files in
|
||||||
either the root or the `boot` directory of one of the partitions, formatted
|
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
||||||
with a supported file system (the ESP partition is recommended).
|
partitions, formatted with a supported file system (the ESP partition is recommended).
|
||||||
|
|
||||||
### BIOS/MBR
|
### BIOS/MBR
|
||||||
In order to install Limine on a MBR device (which can just be a raw image file),
|
In order to install Limine on a MBR device (which can just be a raw image file),
|
||||||
|
@ -140,8 +140,8 @@ limine-deploy <path to device/image>
|
||||||
```
|
```
|
||||||
|
|
||||||
The boot device must to contain the `limine.sys` and `limine.cfg` files in
|
The boot device must to contain the `limine.sys` and `limine.cfg` files in
|
||||||
either the root or the `boot` directory of one of the partitions, formatted
|
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
||||||
with a supported file system.
|
partitions, formatted with a supported file system.
|
||||||
|
|
||||||
### BIOS/GPT
|
### BIOS/GPT
|
||||||
If using a GPT formatted device, there are 2 options one can follow for
|
If using a GPT formatted device, there are 2 options one can follow for
|
||||||
|
@ -162,15 +162,15 @@ simply omit the partition number, and invoke `limine-deploy` the same as one
|
||||||
would do for an MBR partitioned device.
|
would do for an MBR partitioned device.
|
||||||
|
|
||||||
The boot device must to contain the `limine.sys` and `limine.cfg` files in
|
The boot device must to contain the `limine.sys` and `limine.cfg` files in
|
||||||
either the root or the `boot` directory of one of the partitions, formatted
|
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
||||||
with a supported file system.
|
partitions, formatted with a supported file system.
|
||||||
|
|
||||||
### BIOS/UEFI hybrid ISO creation
|
### BIOS/UEFI hybrid ISO creation
|
||||||
In order to create a hybrid ISO with Limine, place the
|
In order to create a hybrid ISO with Limine, place the
|
||||||
`limine-cd-efi.bin`, `limine-cd.bin`, `limine.sys`, and `limine.cfg` files
|
`limine-cd-efi.bin`, `limine-cd.bin`, `limine.sys`, and `limine.cfg` files
|
||||||
into a directory which will serve as the root of the created ISO.
|
into a directory which will serve as the root of the created ISO.
|
||||||
(`limine.sys` and `limine.cfg` must either be in the root or inside a `boot`
|
(`limine.sys` and `limine.cfg` must either be in the root, `limine`, `boot`, or
|
||||||
subdirectory; `limine-cd-efi.bin` and `limine-cd.bin` can reside
|
`boot/limine` directory; `limine-cd-efi.bin` and `limine-cd.bin` can reside
|
||||||
anywhere).
|
anywhere).
|
||||||
|
|
||||||
Place any other file you want to be on the final ISO in said directory, then
|
Place any other file you want to be on the final ISO in said directory, then
|
||||||
|
|
|
@ -42,7 +42,9 @@ static bool stage3_init(struct volume *part) {
|
||||||
bool old_cif = case_insensitive_fopen;
|
bool old_cif = case_insensitive_fopen;
|
||||||
case_insensitive_fopen = true;
|
case_insensitive_fopen = true;
|
||||||
if ((stage3 = fopen(part, "/limine.sys")) == NULL
|
if ((stage3 = fopen(part, "/limine.sys")) == NULL
|
||||||
&& (stage3 = fopen(part, "/boot/limine.sys")) == NULL) {
|
&& (stage3 = fopen(part, "/limine/limine.sys")) == NULL
|
||||||
|
&& (stage3 = fopen(part, "/boot/limine.sys")) == NULL
|
||||||
|
&& (stage3 = fopen(part, "/boot/limine/limine.sys")) == NULL) {
|
||||||
case_insensitive_fopen = old_cif;
|
case_insensitive_fopen = old_cif;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,9 @@ could_not_match:
|
||||||
bool old_cif = case_insensitive_fopen;
|
bool old_cif = case_insensitive_fopen;
|
||||||
case_insensitive_fopen = true;
|
case_insensitive_fopen = true;
|
||||||
if ((f = fopen(volume_index[i], "/limine.cfg")) == NULL
|
if ((f = fopen(volume_index[i], "/limine.cfg")) == NULL
|
||||||
|
&& (f = fopen(volume_index[i], "/limine/limine.cfg")) == NULL
|
||||||
&& (f = fopen(volume_index[i], "/boot/limine.cfg")) == NULL
|
&& (f = fopen(volume_index[i], "/boot/limine.cfg")) == NULL
|
||||||
|
&& (f = fopen(volume_index[i], "/boot/limine/limine.cfg")) == NULL
|
||||||
&& (f = fopen(volume_index[i], "/EFI/BOOT/limine.cfg")) == NULL) {
|
&& (f = fopen(volume_index[i], "/EFI/BOOT/limine.cfg")) == NULL) {
|
||||||
case_insensitive_fopen = old_cif;
|
case_insensitive_fopen = old_cif;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -24,7 +24,9 @@ int init_config_disk(struct volume *part) {
|
||||||
bool old_cif = case_insensitive_fopen;
|
bool old_cif = case_insensitive_fopen;
|
||||||
case_insensitive_fopen = true;
|
case_insensitive_fopen = true;
|
||||||
if ((f = fopen(part, "/limine.cfg")) == NULL
|
if ((f = fopen(part, "/limine.cfg")) == NULL
|
||||||
|
&& (f = fopen(part, "/limine/limine.cfg")) == NULL
|
||||||
&& (f = fopen(part, "/boot/limine.cfg")) == NULL
|
&& (f = fopen(part, "/boot/limine.cfg")) == NULL
|
||||||
|
&& (f = fopen(part, "/boot/limine/limine.cfg")) == NULL
|
||||||
&& (f = fopen(part, "/EFI/BOOT/limine.cfg")) == NULL) {
|
&& (f = fopen(part, "/EFI/BOOT/limine.cfg")) == NULL) {
|
||||||
case_insensitive_fopen = old_cif;
|
case_insensitive_fopen = old_cif;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue