Skip to content

Commit a142cf4

Browse files
committed
Add grubby to handle latest grub2 changes
With latest grub2 installer, one should set the kernel to be booted explicitly after update or install of latest kernel Signed-off-by: Abdul Haleem <[email protected]>
1 parent 051b5e8 commit a142cf4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: testcases/InstallUpstreamKernel.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def is_url(path):
116116
con.run_command("make %s" % self.config)
117117
# Capture kernel version & release
118118
res = con.run_command("make kernelrelease")
119+
print(res)
119120
sha = con.run_command("git rev-parse HEAD")
120121
tcommit = con.run_command("export 'TERM=xterm-256color';git show -s --format=%ci")
121122
tcommit = re.sub(r"\x1b\[[0-9;]*[mGKHF]", "", tcommit[1])
@@ -128,8 +129,9 @@ def is_url(path):
128129
time.sleep(10)
129130
if not self.use_kexec:
130131
# FIXME: Handle distributions which do not support grub
131-
con.run_command(
132-
"grub2-mkconfig --output=/boot/grub2/grub.cfg")
132+
#con.run_command(
133+
# "grub2-mkconfig --output=/boot/grub2/grub.cfg")
134+
con.run_command("grubby --set-default /boot/vmlinuz-%s" % res[-1])
133135
log.debug("Rebooting after kernel install...")
134136
self.console_thread.console_terminate()
135137
con.close()

0 commit comments

Comments
 (0)