Contents
How do I change WSL to kernel?
Replacing the WSL Kernel
- Backstory. I had a dual boot Windows/Fedora machine, and I wanted to be able to run the Fedora install as a VM inside WSL.
- Prep work.
- gcc version.
- Building the kernel.
- Installing the kernel.
- Running the kernel.
- Final thoughts.
How do I update my WSL 2 to latest version?
To Install Linux Kernel Update for WSL 2
- Open the Settings app.
- Click on Update & recovery > Windows Update.
- Click on the Advanced options link.
- Enable the option Receive updates for other Microsoft products when you update Windows.
- Return to the previous page in Settings and click Check for updates.
How to build a Linux kernel from source?
To build the Linux kernel from source, you need several tools: git, make, gcc, libssl-dev and (optionally) ctags, cscope, and/or ncurses-dev. The tool packages may be called something else in your Linux distribution, so you may need to search for the package. The ncurses-dev tools are used if you “make menuconfig” or “make nconfig”.
Where do I find the / kernel switch?
The /kernel option applies to both the compiler and linker phases of a build and is set at the project level. Pass the /kernel switch to indicate to the compiler that the resulting binary, after linking, should be loaded into the Windows kernel.
Is it possible to build / kernel on x64?
Only /arch:IA32 is supported with /kernel on x86. /arch:AVX, /arch:AVX2, and /arch:AVX512 aren’t supported with /kernel on x64. Building with /kernel also passes /kernel to the linker. Here’s how the option affects linker behavior: Incremental linking is disabled. If you add /incremental to the command line, the linker emits this fatal error:
How do I install the kernel in Grub?
Installing the kernel. To install a kernel, you will need to either manually update your GRUB configuration file, or have an installkernel script. This script installs the kernel to /boot/, installs modules to /lib/modules/X.Y.Z/ (where X.Y.Z is something like 3.1.5), and updates file /boot/grub/grub.conf.