Jump to content

Building Linux on Windows

Go to solution Solved by GardeningWithSilicon,

You can build it in a docker container. Microsoft approved this pull request: https://github.com/microsoft/WSL2-Linux-Kernel/pull/9/commits/3644c56b57c2333be0d395b4575608ab744bf308#diff-78c3810a2141413c93a1f8aebed2eff4 which allows their version of the Linux kernel to be built in a docker container. 

 

For a more generalized build: https://github.com/moul/docker-kernel-builder 

 

 

Hey,

 

So after a lot of googling and failing to find anything that will actually work I thought I would ask for assistance to check it was even possible before going any further. I want to test a theory, but for that I need to try modify Linux. I'm a native Windows user and I don't have the hardware to install Linux on a seperate machine nor do I want to dual boot. What I would like to do is download, modify and then compile the Linux kernel on my Windows machine and then use the binaries as the OS for a virtual machine.

 

At this point I'm having trouble even finding out if you can build Linux on Windows, I know that Windows now ships with the subsystem for Linux or whatever it is so I would hope that there would be some hidden functionality to be able to build the Linux source

 

Any help is appreciated

Link to comment
https://linustechtips.com/topic/1080061-building-linux-on-windows/
Share on other sites

Link to post
Share on other sites

28 minutes ago, BattleFrogue said:

That might work, as long as I can get access to the binaries it makes from Windows. I don't want nested VMs :D

You can either setup a shared folder in the VM or SCP/SFTP it out

Link to post
Share on other sites

28 minutes ago, BattleFrogue said:

That might work, as long as I can get access to the binaries it makes from Windows. I don't want nested VMs :D

 

You could just install the newly built kernel on the os in your existing vm...

 

May I ask what you're trying to achieve? Also please quote people when you answer to them

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to post
Share on other sites

You can build it in a docker container. Microsoft approved this pull request: https://github.com/microsoft/WSL2-Linux-Kernel/pull/9/commits/3644c56b57c2333be0d395b4575608ab744bf308#diff-78c3810a2141413c93a1f8aebed2eff4 which allows their version of the Linux kernel to be built in a docker container. 

 

For a more generalized build: https://github.com/moul/docker-kernel-builder 

 

 

Link to post
Share on other sites

19 hours ago, Sauron said:

May I ask what you're trying to achieve?

I just had some ideas what I wanted to mess around in the OS source with.

19 hours ago, GardeningWithSilicon said:

You can build it in a docker container. Microsoft approved this pull request: https://github.com/microsoft/WSL2-Linux-Kernel/pull/9/commits/3644c56b57c2333be0d395b4575608ab744bf308#diff-78c3810a2141413c93a1f8aebed2eff4 which allows their version of the Linux kernel to be built in a docker container. 

 

For a more generalized build: https://github.com/moul/docker-kernel-builder 

 

 

Thanks I'll give this a go

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×