osdev with syslinux?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Timofeyka
Posts: 4
Joined: Sat Aug 07, 2021 6:46 am
Contact:

osdev with syslinux?

Post by Timofeyka »

Greetings.
For a month now I have been tormented by this question, but there is no information anywhere (at least I did not find it).

I am doing something similar to CosmosOS but in a different programming language. But I do it all on Windows. I could use WSL (if there was a 10 version of Windows) or another Linux emulation, but this negates the entire cross-platform of my "analog" CosmosOS.

If anyone is not difficult, I would like to see a "minimal guide" with syslinux: all you need is the bootloader code, a small kernel, and the command to compile them.

Very grateful in advance.
Octocontrabass
Member
Member
Posts: 5563
Joined: Mon Mar 25, 2013 7:01 pm

Re: osdev with syslinux?

Post by Octocontrabass »

Follow these instructions to install it.

Follow these instructions to configure it.

Use any Multiboot kernel. Here's one you can use.
Timofeyka wrote:I could use WSL (if there was a 10 version of Windows)
You can still install Windows 10 as a free upgrade to Windows 7 or 8, as long as your hardware is compatible. (Back up your files first!)
Timofeyka
Posts: 4
Joined: Sat Aug 07, 2021 6:46 am
Contact:

Re: osdev with syslinux?

Post by Timofeyka »

Octocontrabass wrote:Follow these instructions to install it.

Follow these instructions to configure it.

Use any Multiboot kernel. Here's one you can use.
Timofeyka wrote:I could use WSL (if there was a 10 version of Windows)
You can still install Windows 10 as a free upgrade to Windows 7 or 8, as long as your hardware is compatible. (Back up your files first!)
Unfortunately I can not. The hardware is not compatible. But thank you for your help!
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: osdev with syslinux?

Post by bzt »

Timofeyka wrote:If anyone is not difficult, I would like to see a "minimal guide" with syslinux: all you need is the bootloader code, a small kernel, and the command to compile them.
Syslinux uses the Linux x86 boot protocol. To support it, you need to place some specific values at specified offsets in your kernel file, that's all. There's no special command (save the one that installs syslinux of course).

Code: Select all

syslinux.exe --mbr --active --directory /boot/syslinux/ --install z:
(native Windows app, no need for WSL).

Cheers,
bzt
Timofeyka
Posts: 4
Joined: Sat Aug 07, 2021 6:46 am
Contact:

Re: osdev with syslinux?

Post by Timofeyka »

bzt wrote:
Timofeyka wrote:If anyone is not difficult, I would like to see a "minimal guide" with syslinux: all you need is the bootloader code, a small kernel, and the command to compile them.
Syslinux uses the Linux x86 boot protocol. To support it, you need to place some specific values at specified offsets in your kernel file, that's all. There's no special command (save the one that installs syslinux of course).

Code: Select all

syslinux.exe --mbr --active --directory /boot/syslinux/ --install z:
(native Windows app, no need for WSL).

Cheers,
bzt
Thanks to.

I hate to sound selfish, but could you provide a minimal example with syslinux?
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: osdev with syslinux?

Post by bzt »

Timofeyka wrote:I hate to sound selfish, but could you provide a minimal example with syslinux?
I don't think there's any. I'm afraid you'll have to write that yourself. But read carefully the links I've given, it shouldn't be hard.
You can take a look at my implementation. It is just a 127 bytes long struct at offset 0x1F1. (My loader is not a simple tutorial, but cutting out the linux boot protocol part should be simple. I just set the starting address right after the struct, and then it jumps to the same address other protocols use.)

Cheers,
bzt
Post Reply