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.
thehardcoreOS wrote:I don't like Linux because GRUB overwrites MBR and then I need to use GRUB to boot Windows. Also if I don't use my keyboard and select Windows, Linux boots. Linux is not really fun to install since you need to create 3 partitions for it... I will consider installing Ubuntu if that will make any difference, but then I need to find a way to recover MBR.
Back up your MBR before installing Linux, or use GRUB4DOS which can be chainloaded by the Windows MBR
Set Windows as your default bootloader entry
Use a swapfile inside your main Linux partition, that means you only need to create 1 extra partition not 2 extra partitions, or find a distro that you can install inside your Windows partition
Problem solves. Or you can set up a persistent Linux flash drive, which is probably all that you need for OSdev.
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.
Installing Linux is the fanboy's answer, it's not necessary. Your real error is mixing 101 concepts you don't understand and then insist using them all together at the same time. Learn to split up your problem.
There are the Babysteps you can work from. Bootloaders are sufficiently challenging that you do not want to use C for a loooong time. At least until your bootloader itself is actually capable of loading a binary from disk. If you decide not to write your own bootloader and use GRUB after all, there's also tutorials in the wiki for that.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Combuster wrote:Installing Linux is the fanboy's answer, it's not necessary.
That's a ridiculous statement (the first part of it).
Suggesting the use of Linux is purely pragmatic. It's not necessary, it's just easier. There is undeniably more information available about setting up and using the necessary tools for OS development under Linux than under Windows. The most satisfactory way of using Windows for this purpose is to install some pretend Linux - i.e. CygWin - on top of it. It's easier just to cut out the middle man and use the tools directly.
Talking about Windows, I should note that there is the Windows subsystem for Linux (WSL) which is basically an Ubuntu rootfs executed by the Windows NT kernel.
OS X (aka macOS recently) appears to be pretty much suitable for OS development too. The default clang toolchain that comes with Xcode is able to target *-none-elf targets, it just needs to be augmented with binutils (that can be easily built from source).
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay