Also, since /boot is readable only by root, sudo permission is required. This will boot your kernel within QEMU, but an error occurs immedialy: There is no filesystem to boot. Ubuntu users can try : $ sudo qemu-system-x86_64 -kernel /boot/vmlinuz-`uname -r` With that option, QEMU will boot the kernel binary provided as argument. But it has a very interesting option: -kernel. A complete distro can be installed into it. For kernel development, Virtualbox Guest additions have to be rebuilt often when the kernel is updated. Additionnaly exchanging files between Virtualbox and the host will involve some kind of networking or file sharing that have to be setup. But rebuilding the Ubuntu kernel is still a 30 minute cycle. Installation of a VirtualBox will be under the hour mark. VirtualBox is well known, very user friendly and supports a large amount of different OSes. The next step is to run the kernel inside a virtual machine. It is possible to build only the needed module and insmod/rmmod, but in case of a crash followed by a rebooting, the developer loses its work environment. On a decent computer (i7 5600U), the build/test cycle lasts about 30 minutes.
![kernel-qemu kernel-qemu](https://devarea.com/wp-content/uploads/2017/12/Screenshot-from-2017-12-30-22-32-19.png)
![kernel-qemu kernel-qemu](https://learningfromyoublog.files.wordpress.com/2016/11/linux_0-11.png)
But this method will quickly reach its limitations to write new kernel code.
#Kernel qemu install#
It works, and one can easily build a kernel and install it, with all peripheral working. For example, the Ubuntu kernel build instructions can be found at. So my second step was to use a distribution specific build procedure. After booting, I always had some non working peripherals. Before doing linux kernel development, I started by typing make in a kernel tree.