Kernel Debugging with QEMU: Difference between revisions

imported>Luis-Hebendanz
mNo edit summary
imported>Luis-Hebendanz
mNo edit summary
Line 41: Line 41:
== Create a bootable debian image with replaceable kernel ==
== Create a bootable debian image with replaceable kernel ==
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
  $ nix-shell -p debootstrap
  $ nix-shell -p debootstrap qemu
  $ qemu-img create qemu-image.img
  $ qemu-img create qemu-image.img
  $ mkfs.ext2 qemu-image.img
  $ mkfs.ext2 qemu-image.img
Line 56: Line 56:


== Launch qemu ==
== Launch qemu ==
Discard the <code>-enable-kvm</code> flag if
<code> virtualisation.libvirtd.enable </code> is false.
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
  $ qemu-system-x86_64 -s -S \
  $ qemu-system-x86_64 -s -S \
Line 61: Line 63:
     -hda qemu-img.img \
     -hda qemu-img.img \
     -append "root=/dev/sda console=ttyS0 nokaslr" \
     -append "root=/dev/sda console=ttyS0 nokaslr" \
     --enable-kvm \
     -enable-kvm \
     -nographic
     -nographic
</syntaxhighlight>
</syntaxhighlight>