Solved Fatal trap 9: general protection fault while in kernel mode

2020-10-29 17_35_52-DigitalOcean Droplet Console.png


Background of the problem: I use Droplet service with Digital Ocean, like Virtual machine, virtual private server something like that. And then, I decide to resize the droplet, which normally no problem until this time. After finished the Resized droplet, my droplet never boot. I try many times to open Ticket to request support from Digital Ocean, seem like their support know a little bit about FreeBSD system, which recommend me like Linux system.

I do Recovery-ISO as they recommend. Booting from a recovery ISO allows you to recover from kernel mismatches and perform repairs on corrupted file systems, except on FreeBSD system. like following screen. The system not allow me to do Check File System (menu no. 2)

2020-10-30 09_48_17-Window.png


If you press it (menu no. 2) the screen will response like following screen

2020-10-30 09_58_39-Window.png


I have nothing to do except press no. 1 (Mount your disk image) back. And then go to control panel (Web-based control panel of Digital Ocean) and make switch back to boot from Harddisk as it used before. And then open the Droplet, like open the machine and it first screen show like this.

2020-10-30 10_51_49-.png


Then it pass to boot menu of FreeBSD and I choose menu 2 (Boot in Single User) and it always loop back to Fatal trap 9 error (as screen #1) I can't access to boot in Single user mode.

So after reboot again, then I try to press menu 6 (Configure Boot [O]ption) then it display following screen.

Whether I try to make Single User...On (press 5) and Safe [M]ode...On (press 4) or what ever, I can't access into shell command.

Until when it show up as Boot menu again, I choose menu no. 3 [Esc]ape to load prompt. And I don't know how to run 'fsck' command to check the file, cause it now allow me to do.

2020-10-30 20_32_05-Window.png


So, what should I do next? How to recovery back to boot as normal state? Direct question is how can fix space with 'fsck' command in this situation.

Thanks,
Kamolpat
Bangkok, Thailand
 
still reboot and back to show the same screen (Fatal trap 9: general protection fault while in kernel mode)

(I mean after type 'boot -s' in mode ... [Esc]ape to load prompt. , after choose menu 3)

 
(I mean after type 'boot -s' in mode ... [Esc]ape to load prompt. , after choose menu 3)
Ok, there might be something wrong with the kernel or one of its modules. You can try loading the old kernel and see if you can boot with that.

In that menu, pick 3; escape to loader prompt. On the loader prompt, type these:
Code:
unload
boot /boot/kernel.old/kernel
If this gets the system booted again, check your /boot/loader.conf, remove any and all modules you're loading there. Then try booting the new kernel again.
 
2020-10-30 21_53_33-Window.png

Thanks, but it show like this.

and when choose boot menu for 5 change to [K]ernel: kernel.old (2 of 2) it show like this following screen

2020-10-30 21_58_55-Window.png
 
That more or less shows it just can't find your partitions with the files on them. What does lsdev show? Was this a system with UFS or ZFS?
 
Note that you misspelled kernel.old a few times. Make sure you type the correct name.

Ok, so the disk and the partitions are still there. That's good. Few more things to try:
Code:
unload
load /boot/kernel/kernel

Does 'load' work?
 
"Just use Linux" - That surely is great customer support. ;D

Also, do you know what version of FreeBSD this is?
Uptime 1s, so init() fails pretty early.
 
Note that you misspelled kernel.old a few times. Make sure you type the correct name.

Ok, so the disk and the partitions are still there. That's good. Few more things to try:
Code:
unload
load /boot/kernel/kernel

Does 'load' work?
2020-10-31 01_13_29-Window.png
 
Now I found the easiest way to solve this problem. And I will give as a reference in case other FreeBSD user on Digital Ocean facing the same problem with me (Do resizing the Droplet and never boot it up again)

1. Just go to "Images" menu create a SnapShot, like an ImageDisk of Droplet. (I do the snapshot after finish resizing, and it can't boot already)
2. After finishing create Snapshot , then choose menu "More", right site of your hand then choose "Create Droplet"
3. After create the "Droplet" finish, then you can access your server with different IP. All installed apps is in there.

So it's time to backup and do anything else before to drestroy the old droplet and recover everything back to normal state.
 
So it's time to backup and do anything else before to drestroy the old droplet and recover everything back to normal state.
After you made the backups, upgrade it. FreeBSD 10.2 has been End-of-Life since December 2016 and is not supported any more.

 
Back
Top