summaryrefslogtreecommitdiff
path: root/data/templates/grub/grub_options.j2
blob: c8a1472e16ba4f22e4699d01848cde056ea5e097 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
    }
}