1
0
Fork 0
mirror of https://gitlab.com/bztsrc/bootboot.git synced 2023-02-13 20:54:32 -05:00
bztsrc--bootboot/x86_64-bios/README.md

47 lines
2.3 KiB
Markdown
Raw Normal View History

2018-11-25 10:55:19 -05:00
BOOTBOOT BIOS / Multiboot / El Torito / Expansion ROM / Linux boot Implementation
=================================================================================
2018-06-05 14:34:03 -04:00
See [BOOTBOOT Protocol](https://gitlab.com/bztsrc/bootboot) for common details.
On [BIOS](http://www.scs.stanford.edu/05au-cs240c/lab/specsbbs101.pdf) based systems, the same image can be loaded via
[Multiboot](https://www.gnu.org/software/grub/manual/multiboot/multiboot.html),
2018-11-25 10:55:19 -05:00
chainload from MBR, VBR (GPT hybrid booting) or from CDROM boot record via __boot.bin__, run as a BIOS Expansion ROM
(so not only the ramdisk can be in ROM, but the loader as well), or can be loaded as a
2020-01-30 15:50:14 -05:00
[Linux kernel](https://www.kernel.org/doc/html/latest/x86/boot.html) (by ISOLINUX, LoadLin etc.).
2018-06-05 14:34:03 -04:00
Machine state
-------------
2019-02-07 18:41:34 -05:00
IRQs masked. GDT unspecified, but valid, IDT unset. SSE, SMP enabled. Code is running in supervisor mode in ring 0 on all cores.
2018-06-05 14:34:03 -04:00
Installation
------------
2018-07-23 18:10:35 -04:00
1. *BIOS disk / cdrom*: copy __bootboot.bin__ to **_FS0:\BOOTBOOT\LOADER_**. You can place it inside your INITRD partition
2018-06-05 14:34:03 -04:00
or outside of partition area as well (with `dd conv=notrunc oseek=x`). Finally install __boot.bin__ in the
2018-07-23 18:10:35 -04:00
El Torito Boot catalog with "no emulation" or in Master Boot Record (or in Volume Boot Record if you have a boot manager),
saving bootboot.bin's first sector's LBA number in a dword at 0x1B0. The [mkboot](https://gitlab.com/bztsrc/bootboot/blob/master/x86_64-bios/mkboot.c)
2018-06-05 14:34:03 -04:00
utility will do that for you.
2. *BIOS ROM*: install __bootboot.bin__ in a **_BIOS Expansion ROM_**.
2018-07-22 02:34:56 -04:00
3. *GRUB*: specify __bootboot.bin__ as a Multiboot "kernel" in grub.cfg, or you can also chainload __boot.bin__. You can load
2018-07-23 18:10:35 -04:00
the initrd and the environment file as modules (in this order). If no modules given, they will be loaded from disk as usual. Example:
2018-07-22 02:34:56 -04:00
```
menuentry "MyKernel" {
multiboot /bootboot/loader # bootboot.bin
module /bootboot/initrd # first module is the initrd (optional)
module /bootboot/config # second module is the environment file (optional)
boot
}
```
2018-06-05 14:34:03 -04:00
Limitations
-----------
- As it boots in protected mode, it only maps the first 4G of RAM.
- Compressed initrd in ROM is limited to ~96k.
- The CMOS nvram does not store timezone, so always GMT+0 returned in bootboot.timezone.
2018-11-09 06:43:03 -05:00
- Only supports SHA-XOR-CBC, no AES