Booting my OS

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.
hausemaster
Member
Member
Posts: 30
Joined: Sat Dec 12, 2020 8:30 am

Booting my OS

Post 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
Attachments
This is the QEMU screen
This is the QEMU screen
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: Booting my OS

Post by PeterX »

Do you have your source code available to look at?

Greetings
Peter
hausemaster
Member
Member
Posts: 30
Joined: Sat Dec 12, 2020 8:30 am

Re: Booting my OS

Post 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
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: Booting my OS

Post 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.
hausemaster
Member
Member
Posts: 30
Joined: Sat Dec 12, 2020 8:30 am

Re: Booting my OS

Post 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
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: Booting my OS

Post 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
hausemaster
Member
Member
Posts: 30
Joined: Sat Dec 12, 2020 8:30 am

Re: Booting my OS

Post by hausemaster »

Again I copied everything from the wiki page, the commands, everything
nexos
Member
Member
Posts: 1081
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: Booting my OS

Post 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.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
nexos
Member
Member
Posts: 1081
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: Booting my OS

Post 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?
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
hausemaster
Member
Member
Posts: 30
Joined: Sat Dec 12, 2020 8:30 am

Re: Booting my OS

Post by hausemaster »

I used the GNU assembler, and I wrote the kernel in C. (so gcc)
hausemaster
Member
Member
Posts: 30
Joined: Sat Dec 12, 2020 8:30 am

Re: Booting my OS

Post 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
wxwisiasdf
Member
Member
Posts: 34
Joined: Sat Sep 07, 2019 5:17 pm
Libera.chat IRC: Superleaf1995

Re: Booting my OS

Post 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
:-)
hausemaster
Member
Member
Posts: 30
Joined: Sat Dec 12, 2020 8:30 am

Re: Booting my OS

Post by hausemaster »

If you paid attention, I DID MAKE A GRUB ISO! But how do I run it?
nexos
Member
Member
Posts: 1081
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: Booting my OS

Post 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
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
hausemaster
Member
Member
Posts: 30
Joined: Sat Dec 12, 2020 8:30 am

Re: Booting my OS

Post 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?
Post Reply