Skip to content

Instantly share code, notes, and snippets.

@andrewzigerelli
Created January 14, 2019 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewzigerelli/5c0c82d5bc304ed28ac972c9254edb54 to your computer and use it in GitHub Desktop.
Save andrewzigerelli/5c0c82d5bc304ed28ac972c9254edb54 to your computer and use it in GitHub Desktop.
/home/andrew/Research/linux-kernel-module-cheat/out/qemu/default/x86_64-softmmu/qemu-system-x86_64 \
-device rtl8139,netdev=net0 \
-gdb tcp::55455 \
-kernel /home/andrew/Research/linux-kernel-module-cheat/out/linux/default/x86_64/arch/x86/boot/bzImage \
-m 256M \
-monitor telnet::55457,server,nowait \
-netdev user,hostfwd=tcp::55455-:55455,hostfwd=tcp::55456-:22,id=net0 \
-no-reboot \
-smp 1 \
-virtfs local,path=/home/andrew/Research/linux-kernel-module-cheat/data/9p,mount_tag=host_data,security_model=mapped,id=host_data \
-virtfs local,path=/home/andrew/Research/linux-kernel-module-cheat/out,mount_tag=host_out,security_model=mapped,id=host_out \
-virtfs local,path=/home/andrew/Research/linux-kernel-module-cheat/out/rootfs_overlay/x86_64,mount_tag=host_out_rootfs_overlay,security_model=mapped,id=host_out_rootfs_overlay \
-virtfs local,path=/home/andrew/Research/linux-kernel-module-cheat/rootfs_overlay,mount_tag=host_rootfs_overlay,security_model=mapped,id=host_rootfs_overlay \
-serial mon:stdio \
-trace enable=load_file,file=/home/andrew/Research/linux-kernel-module-cheat/out/run/qemu/x86_64/0/trace.bin \
-M pc \
-device edu \
-append 'root=/dev/sda2 nopat console_msg_format=syslog nokaslr norandmaps panic=-1 printk.devkmsg=on printk.time=y rw console=ttyS0' \
-nographic \
-serial tcp::55458,server,nowait \
-drive file=/home/andrew/Research/m5_system_2.0b3/disks/ubuntu-16.04.5_qemu.img \
;
@andrewzigerelli
Copy link
Author

Make sure to change -drive file, the first line (qemu executable), and change the -append line with the correct root location. You can also remove virtfs lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment