dreamos82 / DreamOs

A small 32 bit Operating system written from scratch
GNU General Public License v3.0
62 stars 16 forks source link

Can't boot DreamOS floppy :( blinking _ at VirtualBox #54

Closed informer2016 closed 3 years ago

informer2016 commented 6 years ago

Tried booting the freshly built DreamOS floppy dreamos.img after increasing its size to 1474560 with zeros (otherwise the VirtualBox wouldn't take it). All I see at VirtualBox windows is a blinking "_" character. Please tell - how to fix this problem?

inuyasha82 commented 6 years ago

Hi @informer2016 it doesn't work because the file dreamos.img doesn't contain the bootloader. It contains only the kernel. Since it uses grub we create only the kernel. There is a bootable image that you can use to test dreamos.img, the img is grub.img and is in /boot

What you should do is mount the file as a loop device if you are on linux/mac the syntax is similar to:

mount -o loop grub.img /your/path/for/mnt

(on windows i'm not sure how to do that, the img file is a vfat image, so i think that there should be a way to mount it, but i don't know how :) )

once you have done that you should go to the folder where you have mounted grub.img and replace the dreamos.img file that is somewhere in /boot (i'm not sure where exactly, and at the moment i can't test it), then umount it. And use it to boot in VirtualBox.

Check this line: https://github.com/inuyasha82/DreamOs/blob/master/Makefile#L145it contains the commands you should use to copy the dreamos.img file.

Anyway if you have grub installed on your hard disk, you can manually add an entry in your grub pointing to dreamos.img file, and it should work also on real hardware.

You can also have a look at the script start.sh to create an iso bootable file (that anyway use the grub.img file).

I hope this help. Let me know if it worked and if this issue can be closed.

[Anyway we are thinking to remove the script.sh file, since it is not clear how to use it, and not mantained anymore (and not really useful).]

informer2016 commented 3 years ago

Good day @inuyasha82 ! Interesting to know why dreamos.img doesn't contain some bootloader out-of-the-box

dreamos82 commented 3 years ago

Because as far as i can remember (i'm still @inuyasha82 yes i have 2 accounts on github :D) we are using grub, and dreamos img is the kernel being loaded by grub (or i would say it should be able to be loaded by any multiboot compliant bootloader)

So the idea is that you can load dreamos even from your local grub, if you have one you just need to add an entry into your grub menu loading the file dreamos.img

In the past dreamos was implementing it's own bootloader, but honestly i realized it was a pointless effort, and using a multiboot loader i was able to get even more useful stuff back for the kernel. (btw if you are interested in dreamos i recently started to write a new kernel in 64bit this time is in very early stage of development, and despite the name is not a replacement of dreamso :D is just me wanting to go back into osdev after many years you can find it here: https://github.com/dreamos82/Dreamos64)

informer2016 commented 3 years ago

@inuyasha82 That's nice to hear about Dreamos64 : 64-bits is always nice. Please let me know if there would be some bootable ready-for-test floppy, then I could test it as a part of that BIOS and report the results

dreamos82 commented 3 years ago

I have to admit that so far i have tried it only on qemu, and i'm kind of scared of testing it on real hardware, there is no bootable floppy at the moment, but i can provide you a bootable iso if for you is ok, but if you prefer a floppy, well i need to figure out how to make a grub bootable floppy :)

dreamos82 commented 3 years ago

This is the link to the latest iso: https://drive.google.com/file/d/1Rf08RV4TUNpOkvZB_utRQFj5_sbypOul/view?usp=sharing

dreamos82 commented 3 years ago

The only thing is that at the moment it is just printing a bunch of stuff on the screen (depending also on how is compiiled) but you can't do anything with it, you can only stare at the text and admire it's beauty! XD

dreamos82 commented 3 years ago

@informer2016 If you want to have a bootable floppy for dreamos64 feel free to open an issue on that repo :D I could work on it as soon as i finish with the physical memory manager.