Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues booting from bare metal #114

Open
markusbkk opened this issue Nov 26, 2023 · 8 comments
Open

Issues booting from bare metal #114

markusbkk opened this issue Nov 26, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@markusbkk
Copy link

markusbkk commented Nov 26, 2023

Describe your bug or error

When booting from a Ventoy (latest version) prepared USB flash drive, there's no progress past "loading /boot/kernel.elf".
The screen remains totally blank.

Under Qemu, it works as expected.

Is there any way to debug the kernel during boot-up?

Hardware

Lenovo Thinkpad E535

AMD A4-4300M CPU
4GB RAM
500GB Samsung 840 EVO

I'm booting from a small 4GB flash drive, turned off secure boot and enabled both UEFI and legacy BIOS (with legacy BIOS being given the preference).

Go Version

1.16.15

Relevant log output

No response

@markusbkk markusbkk added the bug Something isn't working label Nov 26, 2023
@icexin
Copy link
Owner

icexin commented Nov 27, 2023

eggos use grub as the bootloader, so you should see the grub ui after booting, if not, may something wrong with grub.

@icexin
Copy link
Owner

icexin commented Nov 27, 2023

Also setting a higher timeout in boot/grub.cfg may help you to stay in grub ui

@markusbkk
Copy link
Author

eggos use grub as the bootloader, so you should see the grub ui after booting, if not, may something wrong with grub.

I do get the GRUB UI. After I wait or hit enter, it tells me that it's loading the kernel.elf and then there's a big sea of black.

@markusbkk
Copy link
Author

I don't suppose there's an easy way to log any kernel issues and have them written to a file on the flash drive?

@icexin
Copy link
Owner

icexin commented Nov 27, 2023

the only way for PC is writing to screen with https://wiki.osdev.org/Printing_To_Screen, the breakpoints can be set in following order:

@icexin
Copy link
Owner

icexin commented Nov 27, 2023

You may try writing UART if available :)

@markusbkk
Copy link
Author

Thanks. Will look at it later, after I've ruled out that it's an issue with Ventoy.

@markusbkk
Copy link
Author

@icexin Could this be the issue?

Keep in mind that this way of writing to video memory will only work if the screen has been correctly set up for 80x25 video mode (which is mode 03). You can do this either by initializing every VGA register manually, or by calling the Set Video Mode service of the BIOS Int10h while you're still in real mode (in your bootsector, for instance). Most BIOS's do that initialization for you, but some other (mainly on laptops) do not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants