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

0.8.0: Kernel panic following "ventoy map data is invalid, get from resource" #455

Closed
buttonmarkederase opened this issue Jan 26, 2023 · 19 comments
Labels
bug Something isn't working

Comments

@buttonmarkederase
Copy link

Describe the bug
Was able to boot and install helloSystem in VirtualBox, but when trying to boot on bare metal, it will load up the freebsd logo, stay there for about a minute, then reboot the laptop.

Expected behavior
A live environment booting to the desktop.

Version (please complete the following information):
FreeBSD-13.1 (0.8.0)

Computer (please complete the following information):

  • Device: MSI GV15 Thin 11SCV

Hardware:

  • Intel i5-11400H
  • 8GB ram
  • Nvidia GTX 1650 Mobile
@buttonmarkederase buttonmarkederase added the bug Something isn't working label Jan 26, 2023
@probonopd
Copy link
Member

Please boot in verbose mode and see if you can determine where it gets stuck.

@buttonmarkederase
Copy link
Author

After booting in verbose mode, it reboot again, but much faster than if it showed the logo (rebooted in a couple seconds rather than about a minute)

@probonopd
Copy link
Member

We need the last thing it prints on screen.

@buttonmarkederase
Copy link
Author

20230126_135818(1)

@probonopd
Copy link
Member

Thanks, this is very helpful. It seems to be tripping over the Ventoy kernel driver. Are you using Ventoy? (If you don't know what it is, then you are not using it.)

@probonopd probonopd changed the title helloSystem iso won't boot on bare metal, but will boot in VM on same machine 0.8.0: Kernel panic following "ventoy map data is invalid, get from resource" Jan 27, 2023
@buttonmarkederase
Copy link
Author

buttonmarkederase commented Jan 27, 2023

No, I'm not. I wrote the iso to a usb drive using dd on Ubuntu

@probonopd
Copy link
Member

A kernel stack trace indicates a NULL pointer dereference in geom_ventoy, function g_ventoy_taste().
So this appears to be a bug that should be fixed in the Ventoy kernel module.

@probonopd
Copy link
Member

Currently, geom_ventoy is being loaded for all users, even for those who are not using Ventoy.

Can we find a way to only load the Ventoy kernel module if something (what?) tells us that we are booting through Ventoy?

@probonopd
Copy link
Member

https://www.youtube.com/watch?v=HX4q8mHOtoY shows another example of this:

image

@probonopd
Copy link
Member

probonopd commented Feb 21, 2023

As a workaround, try

unset geom_ventoy_load
boot

at the bootloader prompt.

To get to the bootloader prompt, press backspace early in the boot process. In 0.8.1 or later, press backspace as soon as the screen becomes all gray, then press escape.

@raylapnt
Copy link

the work around isn't working for me
20230311_130430

@probonopd
Copy link
Member

My bad, that workaorund doesn't work. We need to find a way to tell the bootloader not to load the ventoy kernel module on affected machines.

@raylapnt
Copy link

I do appreciate your time. Thank you for your help

@probonopd
Copy link
Member

I hope there is some way to figure out whether we are running from a "real" ISO or from a loop-mounted ISO loaded by Ventoy, but I have not yet found out how to do this. We should load the Ventoy module only when we know that Ventoy has loop-mounted the ISO.

@probonopd
Copy link
Member

Hold on, maybe I have found out a key to this:
ventoy/Ventoy#1250

If booting with Ventoy makes those vars accessible to the bootloader, then I may be able to solve this rather elegantly. Give me some time.

@probonopd
Copy link
Member

probonopd commented Mar 11, 2023

Unfortunately the list command in the FreeBSD bootloader doesn't show the hints that Ventoy is supposedly setting, hint.ventoy.0.disksize, hint.ventoy.0.diskuuid, hint.ventoy.0.disksignature, hint.ventoy.0.segnum. We need to find a way to check in lua whether they have been set, in a similar way as the Ventoy kernel module is doing it. Then we can tell the bootloader to only load the Ventoy module if the ventoy hints are there.

Maybe @ventoy can help?

@0hip
Copy link

0hip commented Mar 14, 2023

After many tries and errors I could get hellosystem ISO booting through VENTOY
It took one deletion and two aditions:
ok
in order to get hellosystem ISO booting:
IMG_20230315_003933_3

So now if we burn the iso to a DVD or a memory stick there will be no ventoy module getting annoying.. Ventoy developer were clever indeed.

I took fstab and os-release files from FreeBSD 13.1 ISO :
https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/13.1/FreeBSD-13.1-RELEASE-amd64-bootonly.iso

@probonopd
Copy link
Member

Ventoy developer were clever indeed.

Indeed very clever. But unfortunately no documentation I could find.

It's probably best to let Ventoy handle the module loading with its own undocumented trickery. I remember it had failed on helloSystem a couple of releases back, but nowadays it seems to be working. I tested this with hello-0.8.2_0H331-FreeBSD-13.1-amd64.iso and Ventoy 1.0.88.

So anyone who has had this issue, please try 0.8.2 build 0H331 (or later).

Thanks!

@probonopd
Copy link
Member

Closing as resolved. Will reopen if anyone still encounters the same issue.

This issue was closed.
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

4 participants