Issue with obtaining Grub on Windows

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
nexos
Member
Member
Posts: 1081
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Issue with obtaining Grub on Windows

Post by nexos »

Hello,
I am currently porting my operating system, NexOS, from Linux to Windows for various technical reasons. However, I still want to use Grub. I was wondering what the best way to make a Grub2 hard disk image on Windows 10 is. Thank you for your help.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Issue with obtaining Grub on Windows

Post by iansjack »

Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: Issue with obtaining Grub on Windows

Post by Octocontrabass »

nexos wrote:I am currently porting my operating system, NexOS, from Linux to Windows for various technical reasons.
What reasons?
nexos wrote:I was wondering what the best way to make a Grub2 hard disk image on Windows 10 is.
WSL (or WSL 2 if you want to use a loop device to mount the disk image).
nexos
Member
Member
Posts: 1081
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: Issue with obtaining Grub on Windows

Post by nexos »

Ok thank you. The reason are because I like the PE format better then ELF, and I like the Visual Studio code editor which checks for syntax errors while editing. Also, MinGW for Linux didn't work at all.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: Issue with obtaining Grub on Windows

Post by PeterX »

nexos wrote:Ok thank you. The reason are because I like the PE format better then ELF, and I like the Visual Studio code editor which checks for syntax errors while editing. Also, MinGW for Linux didn't work at all.
You can, of course, do as you like. But MinGW means "Minimal GNU for Windows". You already have GNU, if and when you use Linux. You have bash, gcc, make, Unix-style file commands (ls, cp etc.) and many useful OS dev tools like dd. MinGW is for Windows only and kind of obsolete in Linux.

Greetings
Peter
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Issue with obtaining Grub on Win by bydows

Post by iansjack »

You can use Visual Code with Linux. You can even run it on Windows to edit and compile code in WSL or on a remote Linux computer.
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: Issue with obtaining Grub on Windows

Post by Octocontrabass »

nexos wrote:Also, MinGW for Linux didn't work at all.
Can you be more specific? Did you also try Mingw-w64?
nexos
Member
Member
Posts: 1081
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: Issue with obtaining Grub on Windows

Post by nexos »

I tried WSL and Grub2Win and neither worked
nexos
Member
Member
Posts: 1081
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: Issue with obtaining Grub on Windows

Post by nexos »

Ok I finally got it working
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
Post Reply