eaksel / packer-Debian10

Packer configuration files for Debian 10
MIT License
10 stars 14 forks source link

Disable Grub startup timeout #11

Closed Erriez closed 2 years ago

Erriez commented 2 years ago

Grub boot menu is started by default with a timeout value of 5 seconds. This can be changed to value 0 and is useful to speed-up the boot process for running automated tests. Probably nobody uses Grub boot menu in a VM.

scripts/setup.yml

  - name: Disable quiet boot mode and set timeout
    lineinfile:
      path: /etc/default/grub
      regexp: "{{ item.regexp }}"
      line: "{{ item.line }}"
      state: present
    with_items:
      - {regexp: 'GRUB_CMDLINE_LINUX_DEFAULT="quiet"', line: 'GRUB_CMDLINE_LINUX_DEFAULT=""'}
      - {regexp: 'GRUB_TIMEOUT="5"', line: 'GRUB_TIMEOUT="0"'}

Screenshot from 2021-09-01 23-16-57

@eaksel Do you like this idea? Do you want me to create a PR?

PS: Sorry to bother you with PR's, this is a very useful project. :-)

eaksel commented 2 years ago

@Erriez,

Thanks for the suggestion, I like the idea however I wouldn't completely suppress it, I like having a second or two to be able to easily edit it as I mainly use this for labs.

If that's alright with you go ahead and send a PR with a timeout of 1 or 2 seconds.

Erriez commented 2 years ago

Here is a PR for 1 second. A user can change the timeout to 0 or higher value.