1 # DO NOT EDIT - This file is being maintained by Chef
3 # Boot the first entry by default, unless we have configured
4 # it to boot a specific version.
5 <% if node[:hardware][:grub][:kernel] == :latest %>
8 df = Mixlib::ShellOut.new("df /boot/grub/grub.cfg | tail -n 1 | awk '{print $1;}'")
13 blkid = Mixlib::ShellOut.new("blkid -o value -s UUID #{root}")
18 version="#{node[:hardware][:grub][:kernel]}-generic" %>
19 GRUB_DEFAULT="gnulinux-advanced-<%= uuid %>>gnulinux-<%= version %>-advanced-<%= uuid %>"
22 # Wait two seconds before booting the default entry
25 # Display the menu straight away
26 GRUB_HIDDEN_TIMEOUT="0"
27 GRUB_HIDDEN_TIMEOUT_QUIET="true"
29 # Set the distribution name
30 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
32 # Arguments to add to the kernel command line (all entries)
34 GRUB_CMDLINE_LINUX="<%= node[:hardware][:grub][:cmdline].join(" ") %>"
36 GRUB_CMDLINE_LINUX="console=tty0 console=ttyS<%= @unit %>,115200n8 <%= node[:hardware][:grub][:cmdline].join(" ") %>"
39 # Arguments to add to the kernel command line (except recovery entries)
40 GRUB_CMDLINE_LINUX_DEFAULT="panic=30"
42 # Do not wait for infinite time on a failed boot
43 GRUB_RECORDFAIL_TIMEOUT=2
46 # Send console output to the screen
47 GRUB_TERMINAL="console"
49 <% if node[:lsb][:release].to_f >= 12.04 -%>
50 # Send console output to the screen and serial port
51 GRUB_TERMINAL="console serial"
53 # Send console output to the serial port
54 GRUB_TERMINAL="serial"
57 # Configure the serial console
58 GRUB_SERIAL_COMMAND="serial --speed=<%= @speed %> --unit=<%= @unit %> --word=8 --parity=no --stop=1"