boot - Massage dloader.menu a bit more
[dragonfly.git] / sys / boot / dloader / dloader.menu
CommitLineData
116b7e3c
MD
1# Default menu
2#
3#
4
5menuclear
6unload
7
8unset boot_askname
9unset boot_cdrom
10unset boot_userconfig
11unset boot_ddb
12unset boot_gdb
13unset boot_single
14unset boot_verbose
15unset boot_vidcons
16unset boot_serial
17
18# Re-CD into the originally calculated base directory and set the
19# module_path.
20#
21# The module_path is a bit fragile, we want to set it to the current h
22# directory and ./modules subdirectory only, which is "<empty>;modules"
23#
24cd ${base}
25set module_path=";modules"
26
27acpi_load="YES"
28ahci_load="YES"
29ehci_load="YES"
30
5b31b6dc
MD
31# Default boot /boot/kernel/ is the user-installed kernel and
32# is always checked first. Otherwise fallback to generic kernels.
33#
e44e7900 34unset present64
5b31b6dc
MD
35ifset default_kernel
36 # already selected a kernel
37elseifexists kernel
38 set default_kernel=kernel
e44e7900 39 set present64=1
5b31b6dc
MD
40elseifexists kernel.GENERIC
41 set default_kernel=kernel.GENERIC
e44e7900 42 set present64=1
5b31b6dc
MD
43elseifexists kernel.GENERIC_SMP
44 set default_kernel=kernel.GENERIC_SMP
e44e7900 45 set present64=1
5b31b6dc
MD
46elseifexists kernel.X86_64_GENERIC
47 set default_kernel=kernel.X86_64_GENERIC
48elseifexists kernel.X86_64_GENERIC_SMP
49 set default_kernel=kernel.X86_64_GENERIC_SMP
50else
51 set default_kernel=kernel
52endif
53
54menuitem 1 "Boot DragonFly [${default_kernel}]"
55menuadd cd ${base}${default_kernel}
116b7e3c
MD
56menuadd optinclude loader.conf
57menuadd optinclude loader.conf.local
58menuadd lunsetif acpi_load hint.acpi.0.disabled
59menuadd lunsetif ehci_load hint.ehci.0.disabled
60menuadd lunsetif ahci_load hint.ahci.disabled
61menuadd loadall
62menuadd boot
63
64menuitem 2 "Boot DragonFly in Safe Mode"
5b31b6dc 65menuadd cd ${base}${default_kernel}
116b7e3c
MD
66menuadd optinclude loader.conf
67menuadd optinclude loader.conf.local
68menuadd set hint.acpi.0.disabled=1
69menuadd set loader.acpi_disabled_by_user=1
70menuadd set hint.ehci.0.disabled=1
71menuadd set loader.ehci_disabled_by_user=1
72menuadd set hw.ata.ata_dma=0
73menuadd set hw.ata.atapi_dma=0
74menuadd set hw.ata.wc=0
75menuadd set hw.eisa_slots=0
76menuadd lunsetif acpi_load hint.acpi.0.disabled
77menuadd lunsetif ehci_load hint.ehci.0.disabled
78menuadd lunsetif ahci_load hint.ahci.disabled
79menuadd loadall
80menuadd boot
81menuadd set autoboot_delay=NO
82
d92165fe 83menuitem 3 "Boot DragonFly without AHCI driver"
5b31b6dc 84menuadd cd ${base}${default_kernel}
116b7e3c
MD
85menuadd optinclude loader.conf
86menuadd optinclude loader.conf.local
d92165fe 87menuadd set hint.ahci.disabled=YES
116b7e3c
MD
88menuadd lunsetif acpi_load hint.acpi.0.disabled
89menuadd lunsetif ehci_load hint.ehci.0.disabled
90menuadd lunsetif ahci_load hint.ahci.disabled
91menuadd loadall
92menuadd boot
93menuadd set autoboot_delay=NO
94
d92165fe 95menuitem 4 "Boot DragonFly without ACPI driver"
5b31b6dc 96menuadd cd ${base}${default_kernel}
116b7e3c
MD
97menuadd optinclude loader.conf
98menuadd optinclude loader.conf.local
d92165fe
MD
99menuadd set hint.acpi.0.disabled=1
100menuadd set loader.acpi_disabled_by_user=1
116b7e3c
MD
101menuadd lunsetif acpi_load hint.acpi.0.disabled
102menuadd lunsetif ehci_load hint.ehci.0.disabled
103menuadd lunsetif ahci_load hint.ahci.disabled
104menuadd loadall
105menuadd boot
106menuadd set autoboot_delay=NO
107
d92165fe 108menuitem 9 "Escape to loader prompt (also ESC)"
5b31b6dc 109menuadd optcd ${base}${default_kernel}
d92165fe
MD
110menuadd set autoboot_delay=NO
111
5b31b6dc 112ifexists kernel.alt
d92165fe
MD
113menuitem a "Boot Backup kernel kernel.alt"
114menuadd cd ${base}kernel.alt
116b7e3c
MD
115menuadd optinclude loader.conf
116menuadd optinclude loader.conf.local
116b7e3c
MD
117menuadd lunsetif acpi_load hint.acpi.0.disabled
118menuadd lunsetif ehci_load hint.ehci.0.disabled
119menuadd lunsetif ahci_load hint.ahci.disabled
120menuadd loadall
121menuadd boot
122menuadd set autoboot_delay=NO
5b31b6dc 123endif
116b7e3c 124
5b31b6dc 125ifexists kernel.bak
d92165fe
MD
126menuitem b "Boot Backup kernel kernel.bak"
127menuadd cd ${base}kernel.bak
116b7e3c
MD
128menuadd optinclude loader.conf
129menuadd optinclude loader.conf.local
130menuadd lunsetif acpi_load hint.acpi.0.disabled
131menuadd lunsetif ehci_load hint.ehci.0.disabled
132menuadd lunsetif ahci_load hint.ahci.disabled
133menuadd loadall
134menuadd boot
135menuadd set autoboot_delay=NO
5b31b6dc 136endif
116b7e3c 137
5b31b6dc 138ifexists kernel.old
d92165fe 139menuitem o "Boot DragonFly using kernel.old"
116b7e3c
MD
140menuadd cd ${base}kernel.old
141menuadd optinclude loader.conf
142menuadd optinclude loader.conf.local
143menuadd lunsetif acpi_load hint.acpi.0.disabled
144menuadd lunsetif ehci_load hint.ehci.0.disabled
145menuadd lunsetif ahci_load hint.ahci.disabled
146menuadd loadall
147menuadd boot
148menuadd set autoboot_delay=NO
5b31b6dc 149endif
116b7e3c 150
d92165fe 151menuitem s "Boot DragonFly in single user mode"
5b31b6dc 152menuadd cd ${base}${default_kernel}
116b7e3c
MD
153menuadd optinclude loader.conf
154menuadd optinclude loader.conf.local
d92165fe 155menuadd set boot_single="YES"
116b7e3c
MD
156menuadd lunsetif acpi_load hint.acpi.0.disabled
157menuadd lunsetif ehci_load hint.ehci.0.disabled
158menuadd lunsetif ahci_load hint.ahci.disabled
159menuadd loadall
160menuadd boot
161menuadd set autoboot_delay=NO
162
d92165fe 163menuitem v "Boot DragonFly with verbose logging"
5b31b6dc 164menuadd cd ${base}${default_kernel}
fc350ba1
MD
165menuadd optinclude loader.conf
166menuadd optinclude loader.conf.local
d92165fe 167menuadd set boot_verbose=YES
fc350ba1
MD
168menuadd lunsetif acpi_load hint.acpi.0.disabled
169menuadd lunsetif ehci_load hint.ehci.0.disabled
170menuadd lunsetif ahci_load hint.ahci.disabled
171menuadd loadall
172menuadd boot
116b7e3c
MD
173menuadd set autoboot_delay=NO
174
5b31b6dc
MD
175ifexists ${default_kernel}_SMP
176menuitem m "Select SMP kernel"
177menuadd set default_kernel=${default_kernel}_SMP
178menuadd include ${base}defaults/dloader.menu
179menuadd optinclude ${base}dloader.menu
180menuadd menu
181endif
182
e44e7900 183ifset present64
5b31b6dc
MD
184ifexists ${base}kernel.X86_64_GENERIC
185menuitem x "Select 64-bit UP kernel"
186menuadd set default_kernel=kernel.X86_64_GENERIC
187menuadd include ${base}defaults/dloader.menu
188menuadd optinclude ${base}dloader.menu
189menuadd menu
190endif
e44e7900 191endif
5b31b6dc 192
e44e7900 193ifset present64
5b31b6dc
MD
194ifexists ${base}kernel.X86_64_GENERIC_SMP
195menuitem y "Select 64-bit SMP kernel"
196menuadd set default_kernel=kernel.X86_64_GENERIC_SMP
197menuadd include ${base}defaults/dloader.menu
198menuadd optinclude ${base}dloader.menu
199menuadd menu
200endif
e44e7900 201endif
5b31b6dc 202
116b7e3c
MD
203menuitem R "Reboot"
204menuadd reboot
e44e7900
MD
205
206unset present64