diff --git a/build.sh b/build.sh index 3672890..1433d54 100755 --- a/build.sh +++ b/build.sh @@ -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 ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ diff --git a/images/nightly.png.sig b/images/nightly.png.sig deleted file mode 100644 index 37d99a2..0000000 Binary files a/images/nightly.png.sig and /dev/null differ diff --git a/live/main.sh b/live/main.sh index 2785aed..bcad76e 100644 --- a/live/main.sh +++ b/live/main.sh @@ -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' } diff --git a/live/source/boot.sh b/live/source/boot.sh index 0a78ded..23dc67f 100644 --- a/live/source/boot.sh +++ b/live/source/boot.sh @@ -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' diff --git a/live/source/env.sh b/live/source/env.sh index edc7e01..66ade13 100644 --- a/live/source/env.sh +++ b/live/source/env.sh @@ -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' } diff --git a/readme.md b/readme.md index 0ca2f40..39c64e9 100644 --- a/readme.md +++ b/readme.md @@ -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 + +…