readme,to_ram

This commit is contained in:
Marc Beninca 2023-11-21 14:29:08 +01:00
parent 4f563bcc20
commit 2ab2f2032e
6 changed files with 159 additions and 74 deletions

View file

@ -259,7 +259,10 @@ data_uuid=${DATA}
"
write_env "${GRUB_ENV}" "\
check_squashfs=enforce
grub_sleep=999
time_out=10
to_ram=enforce
"
# grub / fonts ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅

Binary file not shown.

View file

@ -10,6 +10,8 @@ menuentry '↑ cmd →' { menu 'cmd' }
menu_split
menuentry 'check_squashfs = enforce' { check_squashfs='enforce' }
menuentry 'check_squashfs = no' { check_squashfs='no' }
menuentry 'to_ram = enforce' { to_ram='enforce' }
menuentry 'to_ram = no' { to_ram='no' }
menu_split
menuentry 'bash / stable / tui' { debsquash '/boot/bash/stable/tui' }
menuentry 'bash / stable / gui' { debsquash '/boot/bash/stable/gui' }

View file

@ -23,6 +23,10 @@ function debsquash {
echo
echo 'linux'
echo "${linux_path}"
toram='toram'
if [ "${to_ram}" == 'enforce' ] ; then
toram="${toram}=${sfs}"
fi
linux \
"${linux_path}" \
boot="live" \
@ -30,7 +34,7 @@ elevator="deadline" \
ip="frommedia" \
live-media-path="${lmp}" \
live-media-uuid="${data_uuid}" \
toram="${sfs}"
"${toram}"
#
echo
echo 'initrd'

View file

@ -1,7 +1,7 @@
function env {
action="${1}"
setparams \
'check_squashfs' 'time_out'
'check_squashfs' 'grub_sleep' 'time_out' 'to_ram'
if [ "${action}" == 'load' ] ; then
load_env \
--skip-sig \
@ -49,5 +49,7 @@ function env_mod {
function env_set {
check_squashfs='enforce'
grub_sleep=999
time_out=10
to_ram='enforce'
}

218
readme.md
View file

@ -4,84 +4,79 @@ Build an ESP File System including:
* standalone EFI & BIOS GRUB images
* boot time dynamic GRUB menu
## Dependencies
* grub-common
* grub-mkimage
* grub-efi-amd64-bin
* x86_64-efi
* grub-efi-amd64-signed
* grubx64.efi.signed
* grub-pc-bin
* i386-pc
* boot.img
* grub-bios-setup
* shim-signed
* shimx64.efi.signed
* grub-theme-breeze
* themes/breeze
* grub-theme-starfield
* themes/starfield
## Project
* build.mod
* build.py
* build.sh
* images
* nightly.png
* license.md
* live
* env.sh
* main.sh
* menu
* cmd.sh
* env.sh
* gfx.sh
* main.sh
* menu.sh
* scan.sh
* util.sh
* var.sh
* menu
* main.sh
* todo.gv
```
├── __init__.py
├── __main__.py
├── build.mod
├── build.sh
├── doc.py
├── esp.py
├── grub.cfg.sh
├── grubx64.efi.signed.sh
├── images
│ └── nightly.png
├── license.md
├── live
│ ├── main.sh
│ ├── menu
│ │ ├── cmd.sh
│ │ ├── env.sh
│ │ ├── gfx.sh
│ │ ├── scan.sh
│ │ └── set.sh
│ └── source
│ ├── boot.sh
│ ├── env.sh
│ ├── menu.sh
│ ├── probe.sh
│ ├── scan.sh
│ └── util.sh
├── readme
│ └── grub.md
├── readme.md
├── todo.gv
└── todo.svg
```
* todo.svg
## Usage
## Build
* bios
* boot.img
* core.img
* setup.sh
* efi
* boot
* bootx64.efi
* grub
* fonts
* *.pf2
* grub.cfg
* i386-pc
* *.lst
* *.mod
* locale
* *.mo
* themes
* breeze
* starfield
* x86_64-efi
* *.lst
* *.mod
* grub.env
## Tasks
- [x] comply with secure boot
- [x] choose to check squashfs or not
- [ ] bash
- [ ] mimic grubx64.efi.signed ←
- [ ] efi
- [ ] include fonts/unicode
- [ ] bios
- [ ] find & setup bios device
- [ ] rewrite in python
![Graph](todo.svg)
### Later
- [ ] target arm
- [ ] make keyboard layouts
- [ ] make custom fonts
- [ ] target specific live-media
- [ ] -mount-opts?
### build
```
build.sh pgp_fingerprint /esp/mount/point [/data/mount/point]
```
#### example
```
/rwx/lsgm/build.sh 9C7613450C80C24F /media/ssd/esp /media/ssd/data
```
#### output
```
/esp
├── bios
│ ├── boot.img
│ ├── core.img
@ -137,3 +132,82 @@ Build an ESP File System including:
│ └── grubx64.efi
└── grub.env
```
### setup
```
setup.sh /dev/device
```
* example:
```
bash /media/ssd/esp/bios/setup.sh /dev/sda
```
## Roadmap
![Graph](todo.svg)
### BASH
#### build
* [ ] make custom
* [ ] fonts
* [ ] keyboard layouts
* [ ] make images
* [ ] mimic grubx64.efi.signed
* [ ] targets
* [ ] arm
* [x] i386-pc
* [x] x86_64-efi
* [x] x86_64-efi-signed
* [ ] embed extra
* [ ] fonts
* [ ] keyboard layouts
* [ ] locales
* [x] copy
* [x] fonts
* [x] locales
* [x] themes
* [x] sign files
* [ ] setup bios
* [x] write for manual call
* [x] boot image
* [x] core image
* [x] setup script
* [ ] auto
* [ ] find esp device
* [ ] write bios_grub partition
#### live
* [x] check signatures
* [ ] options
* [x] check signatures for *.squashfs
* [x] boot to ram
* [ ] locales
* [ ] themes
* [ ] target specific live-media
* [ ] try -mount-opts
### Python