aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@kernel.org>2018-06-25 08:51:41 -0700
committerAndy Lutomirski <luto@kernel.org>2018-06-25 08:51:41 -0700
commit60100bea82183b5d32ed9fca6534cd0fc60d5eb2 (patch)
treeb9e457fa3292a8c6c3259f4058fb4aef2ae3f27a
parent69a7ac11c8a0cd3c442ac20de83717e1987411a3 (diff)
downloadvirtme-60100bea82183b5d32ed9fca6534cd0fc60d5eb2.tar.gz
virtme-run: Look for installed-kernel images in /usr/lib/modules
On Fedora, /usr/lib/modules contains vmlinuz files. Since /boot access is always a little bit dicey, try /usr/lib/modules first. Signed-off-by: Andy Lutomirski <luto@kernel.org>
-rw-r--r--virtme/commands/run.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/virtme/commands/run.py b/virtme/commands/run.py
index 113b99f..7836aed 100644
--- a/virtme/commands/run.py
+++ b/virtme/commands/run.py
@@ -119,7 +119,9 @@ def find_kernel_and_mods(arch, args):
modfiles = modfinder.find_modules_from_install(
virtmods.MODALIASES, kver=kver)
moddir = os.path.join('/lib/modules', kver)
- kimg = '/boot/vmlinuz-%s' % kver
+ kimg = '/usr/lib/modules/%s/vmlinuz' % kver
+ if not os.path.exists(kimg):
+ kimg = '/boot/vmlinuz-%s' % kver
dtb = None # For now
elif args.kdir is not None:
kimg = os.path.join(args.kdir, arch.kimg_path())