Page 1 of 3

Booting my OS

Posted: Sun Dec 20, 2020 9:46 am
by hausemaster
So I'm following the bare bones tutorial on the Wiki, and I've created myself an ISO file, but I just can't seem to run it! I use Windows, but I have the subsystem for linux installed, so I'm able to do all the compiling, and I have Qemu installed (on Windows), so whenever I startup qemu with the ISO (usually by drag&drop) it just says "Booting from Hard Disk..." and stays there forever. If there's any fix or if I'm doing it wrong, I'd like to know.

Also, whenever I run qemu from the command line like
./qemu-system-x86_64.exe -cdrom C:\Users\hausemaster\Documents\OS\myos.iso
It still does the same thing. (my documents/OS folder is where I store the ISO files, I compile in the WSL)

-Hausemaster :D

Re: Booting my OS

Posted: Sun Dec 20, 2020 9:51 am
by PeterX
Do you have your source code available to look at?

Greetings
Peter

Re: Booting my OS

Posted: Sun Dec 20, 2020 9:57 am
by hausemaster
I'm sure I could link it in here, but it's the same source code from https://wiki.osdev.org/Bare_Bones , I followed each step carefully, and it all compiled with no errors, so I doubt it's a syntax error

Re: Booting my OS

Posted: Sun Dec 20, 2020 10:12 am
by PeterX
As far as I can see, the tutorial is for Qemu i386. But you use Qemu x86_64. I don't know if this is the error, it's just what popped up immediatly in front of my eyes.

And I'm a bit confused that it boots ISO but says it's booting HD. Don't know what's the reason.

Re: Booting my OS

Posted: Sun Dec 20, 2020 10:22 am
by hausemaster
Even if I run the i386 Qemu executable, it still doesn't make a difference.
If you were wondering why I don't just use Qemu in the WSL, well I can but this shows up and it crashes
Unable to init server: Could not connect: Connection refused
gtk initialization failed
(Whatever that means)

If I wasn't motivated to do this, I'd give up

Re: Booting my OS

Posted: Sun Dec 20, 2020 10:37 am
by PeterX
Since the tutorial offers variants (for example using different Assemblers or using C or C++) it would be helpful to see your code, including your build instructions.

Greetings
Peter

Re: Booting my OS

Posted: Sun Dec 20, 2020 10:39 am
by hausemaster
Again I copied everything from the wiki page, the commands, everything

Re: Booting my OS

Posted: Sun Dec 20, 2020 10:39 am
by nexos
hausemaster wrote:Even if I run the i386 Qemu executable, it still doesn't make a difference.
If you were wondering why I don't just use Qemu in the WSL, well I can but this shows up and it crashes
Unable to init server: Could not connect: Connection refused
gtk initialization failed
(Whatever that means)

If I wasn't motivated to do this, I'd give up
It means that WSL doesn't have gtk installed. It can't have it installed, as WSL doesn't have a desktop environment.

Re: Booting my OS

Posted: Sun Dec 20, 2020 10:40 am
by nexos
hausemaster wrote:Again I copied everything from the wiki page, the commands, everything
Did you the GCC or G++? Did you use GAS or NASM?

Re: Booting my OS

Posted: Sun Dec 20, 2020 10:43 am
by hausemaster
I used the GNU assembler, and I wrote the kernel in C. (so gcc)

Re: Booting my OS

Posted: Sun Dec 20, 2020 12:23 pm
by hausemaster
I hope someone answers me soon cause I'm getting sick of waiting here with no answers, you guys wrote the page, you should know what's wrong

Re: Booting my OS

Posted: Sun Dec 20, 2020 12:32 pm
by wxwisiasdf
hausemaster wrote:I hope someone answers me soon cause I'm getting sick of waiting here with no answers, you guys wrote the page, you should know what's wrong
If you followed barebones: You need to create a grub ISO

Re: Booting my OS

Posted: Sun Dec 20, 2020 12:39 pm
by hausemaster
If you paid attention, I DID MAKE A GRUB ISO! But how do I run it?

Re: Booting my OS

Posted: Sun Dec 20, 2020 12:50 pm
by nexos
@hausemaster: the bare bones page is used often. I doubt there is a thing wrong with it. Here are few questions I have, however:
Do you have a cross compiler?
Do other OSes work in qemu?
Have you tried running the kernel with -kernel? Have you tried passing -boot d to qemu?
Good luck,
nexos

Re: Booting my OS

Posted: Sun Dec 20, 2020 12:58 pm
by hausemaster
Other OS's actually don't work, I tried with TempleOS, and that didn't work. Also, for the last god damn time, yes I made a cross compiler, did I mention that I compiled everything?