Solved Boot process stuck after reboot

IMG_20220929_152124.jpg
 
I'm a bit confused as you said this:
there is no old kernel I'm my computer
and then you showed the pic which clearly has it. That means at least one upgrade had to be taken. Also in my first reply I mentioned BE you could choose as a fallback boot.
The pwc(4) is leftover from older FreeBSD, driver for webcam.

The loader.conf you showed -- which one is that ? One you can boot from or the other? If you are under fresh install BE you can do cd /.zfs and actually list the snapshots. This way you can diff the loader.conf from this BE to one you can't boot.

edit: my point was that either something messed up your loader.conf (but then you did unload/load kernel which cancels loader.conf) or something wrote to the /boot. While you said you didn't do any updates I'm leaning towards the option that system was updated but bootcode wasn't or part of the /boot is not consistent maybe (speculation on my side).
 
That doesn't affect bootstrapping at all. I wonder if the boot is really hung or you just can't see the boot messages. Any chance for you to check if notebook has booted ?
I recently stumbled into this. It was hanging on last good process. Not showing the bad process.

Booting to single user mode showed the hardware problem.(uart2 hint was not valid)

Boot to single user mode and see if it boots and check messages after your hang spot.(EFI Framebuffer)
 
Phishfry Yeah, sometimes it can be you see the last good one, sometimes you may hit a problem during init of something that is a problem. But it does narrow it down a bit then.

Here OP said though:
I can't have the login nor can I boot single user.
Yea I had confused it with PWC web cam viewer. The App.
But you correctly identify it as a webcam, close enough here. :)

Also (loaded) kernel doesn't bootstrap or we don't see it yet. So it has to be something very early. That's why my suggestion was to forget all (unload) and just go with bare kernel. I forgot completely about the /boot/loader.d directory, worth checking out if something is there or not.
OP shared the pics where loading old kernel didn't help. So I'd go with the /boot check next (maybe stale loader on efi partition?). It's worth checking out what is there compared to new system. That caused headaches before.
 
That's messed up... It hangs right away. Booting like this doesn't load anything from /boot/loader.conf.
Boot in your old environment and try this. I think this should fix...

Code:
bectl list
bectl mount 13.1-RELEASE-p2.... /mnt
cp -r /mnt/boot/kernel /some/other/dir/
rm -fr /mnt/boot
cp -r /boot /mnt
bectl umount 13.1-RELEASE-p2....
reboot
freebsd-update fetch
freebsd-update install

freebsd-update will complain but should got through right?
 
Yes I have a HP laptop
Commenting out the pwc module didn't change nothing, also the only update I ever have is the one I made during the installation process. So the old kernel is the one shipped whit the IMG and the one I can't boot on suddenly is the one of that update. I think the dhcp package I installed is the problem, I think it messed up something during the configuration during its installation. Other then that I seriously don't know what is the problem because everything was all right before I installed this package.
 
Phishfry Yeah, sometimes it can be you see the last good one, sometimes you may hit a problem during init of something that is a problem. But it does narrow it down a bit then.

Here OP said though:


But you correctly identify it as a webcam, close enough here. :)

Also (loaded) kernel doesn't bootstrap or we don't see it yet. So it has to be something very early. That's why my suggestion was to forget all (unload) and just go with bare kernel. I forgot completely about the /boot/loader.d directory, worth checking out if something is there or not.
OP shared the pics where loading old kernel didn't help. So I'd go with the /boot check next (maybe stale loader on efi partition?). It's worth checking out what is there compared to new system. That caused headaches before.
IMG_20220929_181521.jpg

What do you want to see?

Also the loader.conf I showed you earlier is the one I can't boot with, the one you see right there in this picture.
 
That's messed up... It hangs right away. Booting like this doesn't load anything from /boot/loader.conf.
Boot in your old environment and try this. I think this should fix...

Code:
bectl list
bectl mount 13.1-RELEASE-p2.... /mnt
cp -r /mnt/boot/kernel /some/other/dir/
rm -fr /mnt/boot
cp -r /boot /mnt
bectl umount 13.1-RELEASE-p2....
reboot
freebsd-update fetch
freebsd-update install

freebsd-update will complain but should got through right?
I'll be back to you whit that once martin tell me what he wants to see in my boot directory, thanks for your help..
 
Booting like this doesn't load anything from /boot/loader.conf.
Incorrect. All the modules that are listed in the loader.conf, even the non-existent pwc were loaded (and attempted to be loaded) by the loader. Hung is happening most likely when loader is leaving and attempting to jump to kernel. That's why it's most likely a problem in /boot, efi loader even more.

joshbsd Reason I asked you about gpart show was to see if you maybe have a legacy boot partition too. I keep them around, they are handy (and old habits die hard, I still legacy boot all my boxes).
Also don't start blindly copying anything over just yet, don't dig a bigger hole with that. It makes sense to find out first why you are in the state you are.
 
You are new user here, I think those pictures are being displayed with delay adding to the confusion.

Anyway that listing doesn't help, you need to be able to compare what you have. I'd start with EFI loader.
Once in the recovery mode mount your efi partition. From your previous pictures I see your disk is ada0:
Code:
mount  -t msdosfs /dev/ada0p1 /tmp/efi

You'll see a dir structure under /mnt/efi, either efi/boot/bootx64.efi or efi/boot/bootx64.efi, or maybe even both. Idea is to check what file that is.
Do the ls -la /tmp/mydata/boot/loader.efi /mnt/efi/efi/boot/bootx64.efi and check if they are the same size. If they are use cksum to compare if they are really the same file. Actually do the ls -la /tmp/mydata/boot/*.efi and compare it to the one on efi partition. If neither file fits you could try it with the other BE (one you can boot) to see if any of that matches. I'm assuming you booted the 2nd BE and not the recovery media. If that's the case then compare the efi file to /boot/*.efi.

If you confirm you have stale loader you could do this:
Code:
cp /tmp/efi/efi/boot/bootx64.efi /tmp/efi/efi/boot/keep-bootx64.efi
cp /tmp/mydata/boot/loader.efi /tmp/efi/efi/boot/bootx64.efi
and try booting again. If you have entry for FreeBSD (/tmp/efi/efi/FreeBSD) do the same there.
 
You are new user here, I think those pictures are being displayed with delay adding to the confusion.

Anyway that listing doesn't help, you need to be able to compare what you have. I'd start with EFI loader.
Once in the recovery mode mount your efi partition. From your previous pictures I see your disk is ada0:
Code:
mount  -t msdosfs /dev/ada0p1 /tmp/efi

You'll see a dir structure under /mnt/efi, either efi/boot/bootx64.efi or efi/boot/bootx64.efi, or maybe even both. Idea is to check what file that is.
Do the ls -la /tmp/mydata/boot/loader.efi /mnt/efi/efi/boot/bootx64.efi and check if they are the same size. If they are use cksum to compare if they are really the same file. Actually do the ls -la /tmp/mydata/boot/*.efi and compare it to the one on efi partition. If neither file fits you could try it with the other BE (one you can boot) to see if any of that matches. I'm assuming you booted the 2nd BE and not the recovery media. If that's the case then compare the efi file to /boot/*.efi.

If you confirm you have stale loader you could do this:
Code:
cp /tmp/efi/efi/boot/bootx64.efi /tmp/efi/efi/boot/keep-bootx64.efi
cp /tmp/mydata/boot/loader.efi /tmp/efi/efi/boot/bootx64.efi
and try booting again. If you have entry for FreeBSD (/tmp/efi/efi/FreeBSD) do the same there.
Yes anything I post on the forum awaits moderator approval, don't know why.

I really don't know what to do that's why I'm showing you my files. And ask you what to do whit it.

Ok, if I understand the procedures correctly, I import my pool again like i did yesterday and then I mount my disk to /mnt/efi and I compare the file in both directory?

Yes the the BE I can boot on is the second
 
Incorrect. All the modules that are listed in the loader.conf, even the non-existent pwc were loaded (and attempted to be loaded) by the loader. Hung is happening most likely when loader is leaving and attempting to jump to kernel. That's why it's most likely a problem in /boot, efi loader even more.
I am pretty sure they're not. I've try to boot with only loading the kernel and it hangs on mount. Trying to mount zfs says unknown filesystem.. Even if load zfs(4) and crypto(4). I still run into some issues later. The nvidia module doesn't load and some late filesystem for a linux jail doesn't mount for some reason.

Unless something is wrong with my system. I am pretty sure /boot/loader.conf doesn't load any module automaticly from loader prompt.

edit :
I am pretty sure /boot/loader.conf doesn't load any module automaticly from loader prompt.
That one is funny...
loader prompt doesn't load any module from loader.conf automaticly..
 
IMG_20220930_093852.jpg
IMG_20220930_094004.jpg

The first is only to show that i'm working the second to show that its not working for me ?

How did I import my pool :

# mkdir /tmp/mydata
# zpool import -fa -R /tmp/mydata
# zfs mount zroot/ROOT/default
cd /tmp/mydata/
 
W.hâ/t We were talking about different stuff then. When you said
Booting like this doesn't load anything from /boot/loader.conf.
and I understood it as that boot that was shown by OP. Which is not true as when boot continues modules get loaded (as shown in pic).

loader prompt doesn't load any module from loader.conf automaticly..
When you hit the loader prompt modules are not yet loaded, that is correct. If you just do boot from prompt (i.e. hit 3, type boot) modules from loader.conf will get loaded. If you do unload and start manually loading stuff nothing else is loaded from loader.conf. That's why I suggested that - to bypass any configuration to see if vanilla kernel starts bootstrapping.

As issue is there (first steps in bootstrapping or even maybe jump from loader to kernel) most likely there's stale EFI loader loaded and/or something was overwritten in /boot that is causing an issue.

Ok, if I understand the procedures correctly, I import my pool again like i did yesterday and then I mount my disk to /mnt/efi and I compare the file in both directory?
Yes, please do that.
 
and I understood it as that boot that was shown by OP. Which is not true as when boot continues modules get loaded (as shown in pic).
load /boot/kernel.old/kernel is shown. I am not sure I understand.
 
load /boot/kernel.old/kernel is shown. I am not sure I understand.
We didn't talk about the same boot process. I told joshbsd to do a manual boot of old kernel ; I did expect that other modules are not loaded as I stated above.

Also there's this facepalm moment, I missed that .. Phishfry mentioned it and VladiBG highlighted it now - why do you use syscons driver? You mentioned you didn't do any upgrade but I have a feeling you did a lot there. :)
Before anything comment out that kern.vty line, there's probably no need for you to use this legacy driver.
 
You have to create /tmp/efi (mkdir /tmp/efi), this is just a temporary location where to mount the partition.
Result:

# ls -la /tmp/mydata/boot/loader.efi
-r-xr-xr-x 2 root wheel 892928 Sep 23 20:01 /tmp/mydata/boot/loader.efi


# ls -la /tmp/efi/efi/boot/bootx64.efi
-rwxr-xr-x 1 root wheel 8292928 Sep 23 15:51 /tmp/efi/efi/boot/bootx64.efi


IMG_20220930_105444.jpg
 
We didn't talk about the same boot process. I told joshbsd to do a manual boot of old kernel ; I did expect that other modules are not loaded as I stated above.

Also there's this facepalm moment, I missed that .. Phishfry mentioned it and VladiBG highlighted it now - why do you use syscons driver? You mentioned you didn't do any upgrade but I have a feeling you did a lot there. :)
Before anything comment out that kern.vty line, there's probably no need for you to use this legacy driver.
We did try that by loading the old kernel. ( loader.conf not loaded)

That's messed up... It hangs right away. Booting like this doesn't load anything from /boot/loader.conf.
Boot in your old environment and try this. I think this should fix...

Code:
bectl list
bectl mount 13.1-RELEASE-p2.... /mnt
cp -r /mnt/boot/kernel /some/other/dir/
rm -fr /mnt/boot
cp -r /boot /mnt
bectl umount 13.1-RELEASE-p2....
reboot
freebsd-update fetch
freebsd-update install

freebsd-update will complain but should got through right?
I still think this will fix.

I don't think the uefi partition is the problem. It wouldn't load the boot screen. It might be efivars. tho.
 
We didn't talk about the same boot process. I told joshbsd to do a manual boot of old kernel ; I did expect that other modules are not loaded as I stated above.

Also there's this facepalm moment, I missed that .. Phishfry mentioned it and VladiBG highlighted it now - why do you use syscons driver? You mentioned you didn't do any upgrade but I have a feeling you did a lot there. :)
Before anything comment out that kern.vty line, there's probably no need for you to use this legacy driver.
I missed it too and now I don't know were it came from, I commented out the all line and rebooted now I go to the entire boot process and it bring me to the login screen sddm but I'm stuck there in a loop where I have to enter my credentials again and again, same in the CLI

IMG_20220930_110900.jpg
 
Back
Top