helloSystem / ISO

helloSystem Live and installation ISO
https://github.com/helloSystem/
BSD 3-Clause "New" or "Revised" License
805 stars 59 forks source link

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

Closed buttonmarkederase closed 1 year ago

buttonmarkederase commented 1 year ago

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):

Hardware:

probonopd commented 1 year ago

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

buttonmarkederase commented 1 year ago

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 commented 1 year ago

We need the last thing it prints on screen.

buttonmarkederase commented 1 year ago

20230126_135818(1)

probonopd commented 1 year ago

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.)

buttonmarkederase commented 1 year ago

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

probonopd commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

image

probonopd commented 1 year ago

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 commented 1 year ago

the work around isn't working for me 20230311_130430

probonopd commented 1 year ago

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 commented 1 year ago

I do appreciate your time. Thank you for your help

probonopd commented 1 year ago

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 commented 1 year ago

Hold on, maybe I have found out a key to this: https://github.com/ventoy/Ventoy/discussions/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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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