Improve kernel regression handling.
This commit is contained in:
parent
c24ea63ed8
commit
00194514ab
2 changed files with 35 additions and 25 deletions
|
@ -111,25 +111,47 @@
|
|||
(ansible_board_name == "312D" or ansible_board_name == "312A")
|
||||
|
||||
## Temporarily fix boot order
|
||||
- name: Make sure kernel package -16 is available
|
||||
ansible.builtin.apt:
|
||||
name: linux-image-6.1.0-16-amd64
|
||||
state: present
|
||||
- name: Check for the buggy kernel
|
||||
stat:
|
||||
path: /boot/vmlinuz-6.1.0-17-amd64
|
||||
register: bug
|
||||
|
||||
- name: Set 6.1.0-16 as default kernel in grub
|
||||
- name: Check for the fixed kernel
|
||||
stat:
|
||||
path: /boot/vmlinuz-6.1.0-18-amd64
|
||||
register: fix
|
||||
|
||||
- name: Work around kernel with CIFS regression
|
||||
block:
|
||||
- name: Make sure kernel package -16 is available
|
||||
ansible.builtin.apt:
|
||||
name: linux-image-6.1.0-16-amd64
|
||||
state: present
|
||||
- name: Set 6.1.0-16 as default kernel in grub
|
||||
lineinfile:
|
||||
dest: /etc/default/grub
|
||||
regexp: '^(GRUB_DEFAULT=).*'
|
||||
line: '\g<1>"Debian GNU/Linux, with Linux 6.1.0-16-amd64"'
|
||||
backrefs: yes
|
||||
notify: Run update-grub
|
||||
when: bug.stat.exists and not fix.stat.exists
|
||||
|
||||
- name: Set latest kernel in grub
|
||||
lineinfile:
|
||||
dest: /etc/default/grub
|
||||
regexp: '^(GRUB_DEFAULT=).*'
|
||||
line: '\g<1>"Advanced options for Debian GNU/Linux>Debian GNU/Linux, with Linux 6.1.0-16-amd64"'
|
||||
line: '\g<1>0'
|
||||
backrefs: yes
|
||||
when: fix.stat.exists or not bug.stat.exists
|
||||
notify: Run update-grub
|
||||
|
||||
## Clean up stuff from obsolete/faulty tasks:
|
||||
- name: Remove "unattended-upgrades" package
|
||||
ansible.builtin.apt:
|
||||
name: unattended-upgrades
|
||||
state: absent
|
||||
purge: True
|
||||
|
||||
## Clean up stuff from obsolete/faulty tasks:
|
||||
- name: Remove virtiofs service
|
||||
file:
|
||||
path: /etc/systemd/system/virtiofs@.service
|
||||
|
|
|
@ -147,30 +147,18 @@
|
|||
firstmatch: true
|
||||
notify: Run update-grub
|
||||
|
||||
## FIXME
|
||||
#- name: Grub timeout
|
||||
# lineinfile:
|
||||
# dest: /etc/default/grub
|
||||
# line: 'GRUB_DISABLE_SUBMENU=true'
|
||||
# insertafter: '^GRUB_TIMEOUT=.*'
|
||||
# notify: Run update-grub
|
||||
#
|
||||
## then remove the task below:
|
||||
|
||||
## original line: echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
|
||||
- name: Allow switch to advanced menu
|
||||
replace:
|
||||
path: /etc/grub.d/10_linux
|
||||
# regexp: '^(\s+echo .+ \"Advanced options for %s\" \"\${OS}\" | grub_quote\).) (\\\$menuentry_id_option.+ {\")$'
|
||||
regexp: '^(\s+echo \"submenu .+ \"Advanced options for %s\".+ grub_quote\).) (..menuentry_id_option.+{\")$'
|
||||
replace: '\1 --unrestricted \2'
|
||||
- name: Disable Grub submenus
|
||||
lineinfile:
|
||||
dest: /etc/default/grub
|
||||
line: 'GRUB_DISABLE_SUBMENU=true'
|
||||
insertafter: '^GRUB_TIMEOUT=.*'
|
||||
notify: Run update-grub
|
||||
|
||||
- name: Grub timeout
|
||||
lineinfile:
|
||||
dest: /etc/default/grub
|
||||
regexp: '^(GRUB_TIMEOUT=).*'
|
||||
line: '\g<1>3'
|
||||
line: '\g<1>1'
|
||||
backrefs: yes
|
||||
notify: Run update-grub
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue