Virtual environment for cracking the Linux kernel

This question is for practicing Linux hackers: As a rule, it is best to test / play with Linux kernel changes / hacks in a virtualized environment.

  • What virtual environment do you use to test your hacks?
  • How to create a minimalist file system (with basic utilities) for use with the environment. If you are using a ready-made file system, what are you using?
  • Useful heuristics that you use in your environment (for example, installing a new kernel, file sharing, etc.

Please provide a step-by-step procedure for setting up your environment, if possible. A collection of this information is not available on the Internet.

Thanks.

+6
source share
2 answers

Different people use different settings, I do not think there is one correct answer.

I am currently using VirtualBox as a Hypervisor with a file system created using Buildroot.

In addition to other virtual machines (kvm, qemu, vmware, etc.), you can also use User Linux mode for the same effect if your hacker is in the more β€œlogical” layers of the kernel.

+1
source

I am currently using the Fedora14 virtual machine running QEMU / KVM on the Fedora14 host to develop my network driver. I use a fairly standard installation with software development packages, and any web tools or network tools (such as wirehark) can be useful for this task. I usually install a serial console on a virtual machine and control it using the minicomputer on the host - this helps me track stack traces when I pursue an error. Usually I have the source environment and the editing environment on the main machine with the NFS file system files that are mounted by the VM - so I do not need to copy the files to and from the virtual machine. When the host is running the same kernel version, I can quickly compile the driver on the multicore node and test it on the virtual machine.

0
source

Source: https://habr.com/ru/post/895489/


All Articles