Solved Boot process stuck after reboot

Hi,
Dont know what happened, due to minor graphics lag I rebooted the computer but suddenly now during the boot it stop and stay there I can't have the login nor can I boot single user. I see that when loading modules from the kernel during the boot process I have message telling me can't find PWC, don't know if its relevant.
IMG_20220928_152049.jpg
 
Last edited:
What version of FreeBSD is it? 13.1 or any earlier?
Yes it's freebsd 13.1 v2, can't find anything on the web; for info, the last thing I did installed before rebooting was dhcp client package, I was looking about setting a firewall but I didn't do anything else, I didn't touch any config file yet, I was Reading about the subject to inform my self.
 
I have the same behaviour after upgrade from 12.2 to 13.1 (13.1-RELEASE-p2 752f813d6) at HP ProLiant DL320e Gen8 v2, but it stucks before hint "loading kernel". So, I stay at 12.2.
 
Do you see any relevant information if you toggle verbose boot ? Do you have boot environment set with the ZFS ?
 
Do you see any relevant information if you toggle verbose boot ? Do you have boot environment set with the ZFS ?
I'm not familiar whit freebsd, its a new installation and experience for me, I was on Linux before. How can I toggle verbose boot? and what is the boot environment and how to know what kind it is? I try to set verbose loading yes but it didn't change nothing..

If I type show I see loaddev=zfs: zroot/ROOT/default: loader_conf_dirs=/boot/loader.conf.d
 
In the picture you sent there's an option 7 "boot options". You can toggle verbose boot there. You have problem very early so I'm not 100% sure if you can get any relevant information but it's the first step to do when you have booting issues.
BE is a feature built around ZFS snapshots. The option 8 in your picture will give you a submenu where you can choose previous environment (if such env exists).

If you still can't boot FreeBSD the best option would be to boot the recovery media (or installation media) and check the situation from there. I don't know what that "PWC" is. It's worth checking your /boot/loader.conf to see what's there.

Similar to grub's shell you can use boot shell in FreeBSD to do some basic troubleshooting. On top of it you can actually load/unload modules before boot. From the modules I see I can assume you have a crypto ZFS pool on root ? But still I'd go to the loader prompt (option 3) and do
Code:
unload
load /boot/kernel/kernel
boot
Just to see if you can get pass the boot screen. If yes and you panic because you can't mount root you can add zfs.ko and cryptodev.ko after load kernel command.
 
In the picture you sent there's an option 7 "boot options". You can toggle verbose boot there. You have problem very early so I'm not 100% sure if you can get any relevant information but it's the first step to do when you have booting issues.
BE is a feature built around ZFS snapshots. The option 8 in your picture will give you a submenu where you can choose previous environment (if such env exists).

If you still can't boot FreeBSD the best option would be to boot the recovery media (or installation media) and check the situation from there. I don't know what that "PWC" is. It's worth checking your /boot/loader.conf to see what's there.

Similar to grub's shell you can use boot shell in FreeBSD to do some basic troubleshooting. On top of it you can actually load/unload modules before boot. From the modules I see I can assume you have a crypto ZFS pool on root ? But still I'd go to the loader prompt (option 3) and do
Code:
unload
load /boot/kernel/kernel
boot
Just to see if you can get pass the boot screen. If yes and you panic because you can't mount root you can add zfs.ko and cryptodev.ko after load kernel command.
I just tried to unload the modules and loaded the kernel it didn't change anything, same thing the process stop under "mask" and some value whit zeros and "f" boot verbose option don't give more information. I will now plug the USB installer and see if I can do something there, but what exactly?
 
Try to boot with the serial console first. Press 5 until you see 'Cons: Serial'.
The kernel seems to be loading fine. I don't think that's the problem.
 
The kernel seems to be loading fine. I don't think that's the problem.
The problem is it's not bootstrapping. Sometimes it can be due to modules that are loaded prior to that. Therefore my step above.
Also this book was booting before so it's reasonable to assume OP did something that changed that (knowingly or not).

I will now plug the USB installer and see if I can do something there, but what exactly?
Try to boot it. If it boots ok activate the pool within the recovery media, mount the environment and check what did you change in /boot or /etc/.
 
The problem is it's not bootstrapping. Sometimes it can be due to modules that are loaded prior to that. Therefore my step above.
Also this book was booting before so it's reasonable to assume OP did something that changed that (knowingly or not).


Try to boot it. If it boots ok activate the pool within the recovery media, mount the environment and check what did you change in /boot or /etc/.
Now I'm in the root environment of the live CD but how can I access the disk in question ?

When I try to mount /dev/ada0p1 /mnt it return no such file or directory but its listed In /dev directory of the live CD
 
It's strange that you were not able to bootstrap with the loaded kernel. Are you sure you didn't do any kernel upgrade recently? Try the load prompt again but do this:
Code:
unload
load /boot/kernel.old/kernel
boot
I'm wondering if you did kernel upgrade and maybe new kernel has problem bootstrapping.

You need to read the handbook and check how to mount a crypto volume and import pool. zpool import will show you possible pools to import, W.hâ/t's command imports it to temporary location.
 
It's strange that you were not able to bootstrap with the loaded kernel. Are you sure you didn't do any kernel upgrade recently? Try the load prompt again but do this:
Code:
unload
load /boot/kernel.old/kernel
boot
I'm wondering if you did kernel upgrade and maybe new kernel has problem bootstrapping.

You need to read the handbook and check how to mount a crypto volume and import pool. zpool import will show you possible pools to import, W.hâ/t's command imports it to temporary location.
It will be better to read the manual when I'll be back on my computer, and that section of the handbook is long, now I'm on the cell phone, I was doing that exactly that before, reading the handbook.. I'm 100% sure that I didn't upgrade anything, and certainly not the kernel, there is no old kernel I'm my computer only the one that was loaded during the installation. If there is one its because the system upgraded it self whitout my knowledge, is it possible, don't think so..
 
An other thing I did before rebooting is that I installed gcc and did that command to use the compiler
echo "alias zcc='gcc -Wall -Wextra -pedantic -std=c11 -fno-common -fno-builtin'" >> .kshrc
echo "export ENV=$HOME/.kshrc" >> .profile
if that info can be useful at all
 
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 ? e.g. you ping it from other device on the same network.

It's hard to throw ideas like this remotely. But as you can boot recovery image I'd try to check the /boot to see if something changed there causing this issue. Once booted in the recovery image you could paste the output of gpart show for us to see your layout. If you're using crypto (modules loaded in the picture) depending on the zfs version and your setup you may need to activate that first (e.g. geli). Then zfs import shows you available pools.
 

Following this thread I'm now visualizing the loader.conf

Anything I edit now will take effect on the file or not?
 
How did you get to that file now? Were you able to import your pool?
edit: as I mentioned, you did unload and then loaded the kernel only, so even if you have bad loader.conf you should have been safe with that approach. That's why I mentioned /boot comparison to see what changed.
 
there is no old kernel I'm my computer only the one that was loaded during the installation. If there is one its because the system upgraded it self whitout my knowledge, is it possible, don't think so..
No the system will update/upgrade itself.

freebsd-update(8) will apply patches to you system and the kernel even if you don't upgrade. It will also backup the old boot environment and 'create a new one. See bectl(8).

On your loading screen we can see that you have 2 different kernel you can choose from. Option 8 give you the ability to choose a different boot environment.
 
IMG_20220929_125147.jpg


I wonder if I comment the line PWC_load=yes because it said earlier that it can't find it if it will be written to the file or not
 
No the system will update/upgrade itself.

freebsd-update(8) will apply patches to you system and the kernel even if you don't upgrade. It will also backup the old boot environment and 'create a new one. See bectl(8).


On your loading screen we can see that you have 2 different kernel you can choose from. Option 8 give you the ability to choose a different boot environment.
I tried to load the old one it did not change anything. But changing environment bring me through the boot process to the CLI no GUI and the config file in this environment is the one untouched from the installation
 
How did you get to that file now? Were you able to import your pool?
edit: as I mentioned, you did unload and then loaded the kernel only, so even if you have bad loader.conf you should have been safe with that approach. That's why I mentioned /boot comparison to see what changed.
Yes I imported the pool following the thread I posted up there. Now I can see all my stuff.
 
I can boot to the second environment but it bring me to the CLI no GUI whit the config of the fresh installation untouched
 
Back
Top