klange / toaruos

A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
https://toaruos.org/
University of Illinois/NCSA Open Source License
6.03k stars 475 forks source link

The desktop does not come when I run it with your own boot loader. #187

Closed ghost closed 3 years ago

ghost commented 4 years ago

Hello bro. Your boot loader only works in the BIOS environment. It doesn't work with EFI. These codes from moremultiboot.h: #ifdef EFIPLATFORM print ("\ nExiting boot services and jumping to"); printhex ( x DOMAIN); print ("with mboot_mag ="); printhex ( eax); print ("and mboot_ptr ="); printhex ( ebx); print ( "... \ n");

ghost commented 4 years ago

The system reboots itself when you exit the boot loader. How will we use it with GRUB?

ghost commented 4 years ago

I building with docker.

klange commented 4 years ago

In what virtual machine?

ghost commented 4 years ago

I was working on real hardware.

klange commented 4 years ago

ToaruOS's native bootloaders are not intended for use on real hardware. Use GRUB instead

ghost commented 4 years ago

I already wanted to include GRUB. How can we include it in the latest version of ToaruOS?

klange commented 4 years ago

If you follow the instructions in the page I linked in my previous comment, you can build a GRUB CD or use the GRUB config files in that repository to boot from an existing GRUB installation.

Screenshot from 2019-07-13 08-09-03

ghost commented 4 years ago

Thank you K Lange, but do I need to edit a Makefile to create a GRUB iso file, or should I build it with Docker and run the make command in cdrom / boot?

klange commented 4 years ago

After having built ToaruOS in Docker, build the grub image outside of Docker using your local machine following the instructions in the README from the other repository. You will need a sufficiently new grub installation, and probably xorriso. The Docker build tools exist mostly to avoid the process of having to build the cross-compiler toolchain, but that is not necessary for building GRUB CDs.

ghost commented 4 years ago

Thanks K Lange. I will try.

ghost commented 4 years ago

I've done GRUB, but now the mouse pointer appears and the text Out of Memory appears. Why could it be?

klange commented 4 years ago

Generally, it means you're out of memory. How much RAM do you have?

ghost commented 4 years ago

8 Gigabyte.

klange commented 4 years ago

The kernel is likely confused about how much RAM you have. This is well beyond the topic of your original ticket, though, so it should be discussed elsewhere. I don't generally provide support for running ToaruOS on real hardware, though this issue has been seen before and should be investigated.

klange commented 4 years ago

Interestingly, when I boot qemu-x86_64 with Grub with 8GB of RAM, it presents a memory map that lists only 3GB. I wonder if the physical memory mapping on your system is placing large amounts of graphics memory or PCI address space in the 32-bit range and leaving only a hundred megabytes of actual RAM - which I would find peculiar, but crazier things have happened.

If you could try to boot into the VGA text-mode terminal, that may have better luck starting, then you can report the contents cat /proc/meminfo here.

ghost commented 4 years ago

I do not get any errors when I enter the Graphics Terminal but the desktop does not come.

klange commented 4 years ago

The full desktop requires more RAM than just the graphics terminal, so if the kernel thinks you only have ~100MB, one may work while the other doesn't. I'm trying to glean information about your system and how the memory map is being presented, so please comment with the results of running cat /proc/meminfo as I already asked.

ghost commented 4 years ago

I can't enter commands in any way.

klange commented 4 years ago

Have you tried the VGA console?

klange commented 4 years ago

You said you had no errors with the "Graphics Terminal". I'm not sure what you mean by that. There is no desktop when you use the "Graphics Terminal", though that option is not provided on the Grub menu.

ghost commented 4 years ago

I tried it with the old ToaruOS (v1.2.3). I'll try the latest ToaruOS.

klange commented 4 years ago

I have uploaded a Grub-based CD for the latest release, if you would like to try that.

ghost commented 4 years ago

It was stuck during the copying process. Copying /üst/share/icons/48/applications-generic.bmp

klange commented 4 years ago

Use Grub's command line editor (by hitting e) to remove migrate from the multiboot command and try again.

ghost commented 4 years ago

Nice work!

ghost commented 4 years ago

Now the screen says livecd login: but I can't use the keyboard.

klange commented 4 years ago

Check to see if your BIOS/UEFI menu provides an option for "legacy USB device support" or "PS/2 emulation". If not, you may be stuck there unless you have a PS/2 keyboard port and a PS/2 keyboard or USB-PS/2 adapter.

ghost commented 4 years ago

Eski USB desteği etkin

ghost commented 4 years ago

Legacy USB support is enabled*

klange commented 4 years ago

Hm, if the keyboard doesn't work despite that option being enabled, I'm not sure where to go from here.

klange commented 4 years ago

I have seen motherboards where that option only supported mice, for some reason.

ghost commented 4 years ago

I've solved it on the Out of Memory table, but now the cursor is coming, I'm not getting an error, but the desktop isn't. Why could it be?

ghost commented 4 years ago

When I press the GNU Grub e button from the editor panel, it stops at boot. Previous functions are running.

klange commented 4 years ago

I'm not sure what you mean. Could you record a video to demonstrate the issue?

ghost commented 4 years ago

I'm not home right now, but I can tell. I clicked the Live CD button in the GRUB section. Ramdisk and Modules. After that, the size of the screen changed and the mouse cursor came. I didn't get any errors, but the desktop doesn't come.

ghost commented 4 years ago

There's also a white spot on the top left. Going back after a while.

klange commented 3 years ago

Closing this as the new kernel and video drivers likely make any remnant issues from toaru32 invalid.