"timezone" : "UTC",
# Kernel Commandline
- "kernel-cmdline" : "quiet splash",
+ "kernel-cmdline" : ["quiet", "splash"],
# Serial Console
"serial-console" : False,
"""
log.debug("Writing GRUB Configuration:")
+ # Fetch the kernel commandline
+ kernel_cmdline = self.bricklayer.settings.get("kernel-cmdline", []).copy()
+
conf = {
# Tell GRUB who we are
"GRUB_DISTRIBUTOR" : "\"$(sed 's, release .*$,,g' /etc/system-release)\"",
"GRUB_SERIAL_COMMAND" : "\"serial --unit=%s --speed=%s\"" % (unit, baudrate),
}
+ # Append the serial console to the kernel commandline
+ kernel_cmdline.append("console=%s,%sn8" % (device, baudrate))
+
# Otherwise enable a generic VGA console
else:
conf["GRUB_TERMINAL_OUTPUT"] = "\"console\""
# Set the kernel commandline
- kernel_cmdline = self.bricklayer.settings.get("kernel-cmdline")
if kernel_cmdline:
- conf["GRUB_CMDLINE_LINUX"] = "\"%s\"" % kernel_cmdline
+ conf["GRUB_CMDLINE_LINUX"] = "\"%s\"" % " ".join(kernel_cmdline)
# Write everything to file
with self.bricklayer.open("/etc/default/grub", "w") as f: