diff options
author | zsdc <taras@vyos.io> | 2023-01-19 20:18:42 +0200 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-12-16 20:37:10 -0600 |
commit | c1d02ab5a2594d945e3f7aed18a1c18f296d65e2 (patch) | |
tree | a9551ce1e9aa0eb8db99f2ae60567134bc2e6974 /data/templates/grub/grub_options.j2 | |
parent | d5375ce02376a91c07ec68f8d410a08dcdc57ef9 (diff) | |
download | vyos-1x-c1d02ab5a2594d945e3f7aed18a1c18f296d65e2.tar.gz vyos-1x-c1d02ab5a2594d945e3f7aed18a1c18f296d65e2.zip |
image: T4516: Added system image tools
This commit adds the whole set of system image tools written from the scratch in
Python that allows performing all the operations on images:
* check information
* perform installation and deletion
* versions management
Also, it contains a new service that will update the GRUB menu and keep tracking
its version in the future.
WARNING: The commit contains non-reversible changes. Because of boot menu
changes, it will not be possible to manage images from older VyOS versions after
an update.
(cherry picked from commit 8f94262e8fa2477700c50303ea6e2c6ddad72adb)
Diffstat (limited to 'data/templates/grub/grub_options.j2')
-rw-r--r-- | data/templates/grub/grub_options.j2 | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/data/templates/grub/grub_options.j2 b/data/templates/grub/grub_options.j2 new file mode 100644 index 000000000..c8a1472e1 --- /dev/null +++ b/data/templates/grub/grub_options.j2 @@ -0,0 +1,52 @@ +submenu "Boot options" { + submenu "Select boot mode" { + menuentry "Normal" { + set bootmode="normal" + export bootmode + configfile ${prefix}/grub.cfg.d/*vyos-menu*.cfg + } + menuentry "Password reset" { + set bootmode="pw_reset" + export bootmode + configfile ${prefix}/grub.cfg.d/*vyos-menu*.cfg + } + menuentry "System recovery" { + set bootmode="recovery" + export bootmode + configfile ${prefix}/grub.cfg.d/*vyos-menu*.cfg + } + menuentry "Load the whole root filesystem to RAM" { + set boot_toram="yes" + export boot_toram + configfile ${prefix}/grub.cfg.d/*vyos-menu*.cfg + } + } + submenu "Select console type" { + menuentry "tty (graphical)" { + set console_type="tty" + export console_type + configfile ${prefix}/grub.cfg.d/*vyos-menu*.cfg + } + menuentry "ttyS (serial)" { + set console_type="ttyS" + export console_type + setup_serial + configfile ${prefix}/grub.cfg.d/*vyos-menu*.cfg + } + menuentry "ttyUSB (USB serial)" { + set console_type="ttyUSB" + export console_type + setup_serial + configfile ${prefix}/grub.cfg.d/*vyos-menu*.cfg + } + } + menuentry "Enter console number" { + read console_num + export console_num + setup_serial + configfile ${prefix}/grub.cfg.d/*vyos-menu*.cfg + } + menuentry "Current: boot mode: ${bootmode}, console: ${console_type}${console_num}" { + echo + } +} |