]> git.openstreetmap.org Git - chef.git/blob - cookbooks/hardware/templates/default/grub.erb
Merge remote-tracking branch 'github/pull/225'
[chef.git] / cookbooks / hardware / templates / default / grub.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 # Boot the first entry by default, unless we have configured
4 # it to boot a specific version.
5 GRUB_DEFAULT="<%= @entry %>"
6
7 # Wait two seconds before booting the default entry
8 GRUB_TIMEOUT="2"
9
10 # Display the menu straight away
11 GRUB_HIDDEN_TIMEOUT="0"
12 GRUB_HIDDEN_TIMEOUT_QUIET="true"
13
14 # Set the distribution name
15 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
16
17 # Arguments to add to the kernel command line (all entries)
18 <% if @units.nil? -%>
19 GRUB_CMDLINE_LINUX="<%= node[:hardware][:grub][:cmdline].join(" ") %>"
20 <% else -%>
21 GRUB_CMDLINE_LINUX="console=tty0 <%= @units.sort.uniq.collect { |unit| "console=ttyS#{unit},115200n8" }.join(" ") %> <%= node[:hardware][:grub][:cmdline].join(" ") %>"
22 <% end -%>
23
24 # Arguments to add to the kernel command line (except recovery entries)
25 GRUB_CMDLINE_LINUX_DEFAULT="panic=30"
26
27 # Do not wait for infinite time on a failed boot
28 GRUB_RECORDFAIL_TIMEOUT=2
29
30 <% if @units.nil? -%>
31 # Send console output to the screen
32 GRUB_TERMINAL="console"
33 <% else -%>
34 # Send console output to the screen and serial port
35 GRUB_TERMINAL="console serial"
36
37 # Configure the serial console
38 GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=<%= @units.first %> --word=8 --parity=no --stop=1"
39 <% end -%>