qubes-anaconda-addon: set default kernel

Since qubesd isn't running package kernel-qubes-vm package installation
time, this needs to be done here.

QubesOS/qubes-issues#2412
This commit is contained in:
Marek Marczykowski-Górecki 2017-05-31 02:24:06 +02:00
parent 1a527e5d05
commit 7104af5daa
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -414,6 +414,8 @@ class QubesOsSpoke(FirstbootOnlySpokeMixIn, NormalSpoke):
os.setgid(self.qubes_gid)
os.umask(0o0007)
self.configure_default_kernel()
# Finish template(s) installation, because it wasn't fully possible
# from anaconda (it isn't possible to start a VM there).
# This is specific to firstboot, not general configuration.
@ -483,6 +485,11 @@ class QubesOsSpoke(FirstbootOnlySpokeMixIn, NormalSpoke):
return (stdout, stderr)
def configure_default_kernel(self):
self.set_stage("Setting up default kernel")
default_kernel = sorted(os.listdir('/var/lib/qubes/vm-kernels'))[-1]
self.run_command(['/usr/bin/qubes-prefs', 'default-kernel', default_kernel])
def configure_dom0(self):
self.set_stage("Setting up administration VM (dom0)")