Add option to allow setting grub menu visibility and timeout

Bug #1898957 reported by Drew Freiberger
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-sysconfig
Won't Fix
Medium
Unassigned

Bug Description

During recovery of a CDK cluster on top of vmware, we were unable to catch a grub prompt to alter kernel boot flags, as the cloud image does not stop at a grub menu.

This needs to be configurable via sysconfig charm such that we can set a 30 or 60 second boot timer and make the grub menu visible on cloud images, whether hosted on Openstack, AWS, Google, or VMware.

Tags: bseng-133
Jose Guedez (jfguedez)
Changed in charm-sysconfig:
status: New → Triaged
importance: Undecided → Medium
Andrea Ieri (aieri)
tags: added: bseng-133
Revision history for this message
JamesLin (jneo8) wrote :

question: About grub-config-flags config

There is `grub-config-flags` in the sysconfig config. Can we use this config to set the timer?

Revision history for this message
JamesLin (jneo8) wrote :

Update: I test sysconfig on my local virtual-maas with this command

```
juju config sysconfig update-grub=true grub-config-flags='GRUB_TIMEOUT=10
GRUB_TIMEOUT_STYLE=menu
GRUB_SERIAL_COMMAND="serial --speed=115200"
GRUB_TERMINAL="console serial"
'
```

And deploy on ubuntu(focal)

The `/etc/default/grub.d/90-sysconfig.cfg` will be config as

```
# Juju generated file - do not edit manually

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

# Evaluate grub-config-flags first, in case it uses $GRUB_CMDLINE_LINUX_DEFAULT.
# However, if grub-config-flags is not specified, ignore that (current behavior.)
# config-flags
GRUB_TIMEOUT=10
GRUB_TIMEOUT_STYLE=menu
GRUB_SERIAL_COMMAND="serial --speed=115200"
GRUB_TERMINAL="console serial"
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT console=ttyS0,115200 console=tty0"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
GRUB_TERMINAL=serial
```

The `GRUB_TERMINAL` will be override by default `GRUB_TERMINAL=serial`(Not sure why two config not merge), which make `console` be disabled and grub can't view on `virt-viewer`

(I tried to comment `GRUB_TERMINAL=serial` manual, and grub showed on `virt-viewer`)

I am not sure which TERMINAL type Openstack, AWS, Google, or VMware need.

But maybe is because `GRUB_TERMINAL`?

JamesLin (jneo8)
Changed in charm-sysconfig:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.