Frozen black screen after freebsd-update

I managed to successfully install FreeBSD 13. I was then experimenting with Gnome, KDE and xfce only to experience Firefox failed to launch because of missing libc.so.7. One simple solution I found on the Internet was to upgrade FreeBSD with executing freebsd-update fetch. I ran this update command and it stuck for minutes. I stopped the process with intention to retry it, but boot was already failed. It is just a frozen black screen, I can't access the terminal.

I am on the brink of depression. Please help. SOS. What should I do to get FreeBSD back? Or rollback procedure may helps? Thanks.
 
fyi I booted freebsd via grub configured in ubuntu, so I can't access beastie menu where I used to choose single user mode.
1. how to recover beastie menu then?
2. another option I would try is to use memstick to access broken freebsd, is it possible? if so, how?
 
because of missing libc.so.7
However you did that (that file even can't be deleted without modifying its permissions)…

Take a boot/install image of FreeBSD, and boot it. Select the Live CD. Mount your harddisk, and copy /lib/libc.so.7 from the live system to your drive. Afterwards finish the upgrade to 13.1 as the handbook (!) describes.
 
However you did that (that file even can't be deleted without modifying its permissions)…

Take a boot/install image of FreeBSD, and boot it. Select the Live CD. Mount your harddisk, and copy /lib/libc.so.7 from the live system to your drive. Afterwards finish the upgrade to 13.1 as the handbook (!) describes.
yes sir thanks ... I'll try this and revert
 

SirDice

Administrator
Staff member
Administrator
Moderator
I managed to successfully install FreeBSD 13. I was then experimenting with Gnome, KDE and xfce only to experience Firefox failed to launch because of missing libc.so.7.
Can't happen if the system was originally 13.x and the packages you installed were also for 13. So this is probably a botched or half finished major version upgrade (from 12.x to 13.x for example).

One simple solution I found on the Internet was to upgrade FreeBSD with executing freebsd-update fetch.
This doesn't do an upgrade, this is an update, i.e. 13.1-RELEASE to 13.1-RELEASE-p2. Also, this only downloads those patches and doesn't install or change anything yet on the system.

I ran this update command and it stuck for minutes.
It's not 'stuck'. It's showing you some information and waiting for you to exit less(1).
 
Can't happen if the system was originally 13.x and the packages you installed were also for 13. So this is probably a botched or half finished major version upgrade (from 12.x to 13.x for example).


This doesn't do an upgrade, this is an update, i.e. 13.1-RELEASE to 13.1-RELEASE-p2. Also, this only downloads those patches and doesn't install or change anything yet on the system.


It's not 'stuck'. It's showing you some information and waiting for you to exit less(1).
thanks for your explanation

I did some experimental commands from random intenet suggestions and it's getting worse now. I can't boot to all my OSes (Ubuntu, Windows, and FreeBSD).

I booted using Live CD and after mount devs, I ran fsck -y nvd0p4 to no avail.
With memstick still stick in, I got 'disk not found' response. Without memstick, it went to a black screen.
I then tried gpart set -a active diskid/DISK-215133754BC2 and it was the guillotine. I can't boot my laptop at all.

What should I try next? I attach the images I took during my failed experiments. Appreciate your helps.
 

Attachments

  • IMG_4729.jpg
    IMG_4729.jpg
    100.8 KB · Views: 16
  • IMG_4728.jpg
    IMG_4728.jpg
    52.7 KB · Views: 16
  • IMG_4727.jpg
    IMG_4727.jpg
    78.9 KB · Views: 16
  • IMG_4726.jpg
    IMG_4726.jpg
    73.6 KB · Views: 14
  • IMG_4725.jpg
    IMG_4725.jpg
    63.6 KB · Views: 16
However you did that (that file even can't be deleted without modifying its permissions)…

Take a boot/install image of FreeBSD, and boot it. Select the Live CD. Mount your harddisk, and copy /lib/libc.so.7 from the live system to your drive. Afterwards finish the upgrade to 13.1 as the handbook (!) describes.
I just realized missing libc.so.7 didn't fail the boot since the beginning. It did fail Firefox to launch.
The priority is to boot first then copying / updating will be easier I guess. The halted freebsd-update seems to break the boot records/procedures.

How is then to resume booting FreeBSD?
 

SirDice

Administrator
Staff member
Administrator
Moderator
The halted freebsd-update seems to break the boot records/procedures.
It doesn't. Simply because the freebsd-update(8) process (updates, or upgrades) won't touch any of it, ever.

fyi I booted freebsd via grub configured in ubuntu
Fix booting Grub first, forget about FreeBSD for a minute, you're too focused on blaming FreeBSD for the system not booting. That's not where your boot issues are.
 
set -a active diskid/DISK-215133754BC2
How do you know which disk that is? I think your problems are more fundamental. You need to understand basics of FreeBSD updates, packages versus base, and boot process (including the interaction of grub with other boot systems). Knowing how to identify disks when you have multiple (at least the mem stick and the NVMe) is part of that.
 
Fix booting Grub first, forget about FreeBSD for a minute, you're too focused on blaming FreeBSD for the system not booting. That's not where your boot issues are.
What should I say then? System booting failed right after freebsd-update. Grub still works fine at that time, it allows me to boot 2 other OSes. Only after I issued gpart set active, I can't no longer see Grub.

I am new to FreeBSD so what procedures should I follow to recover? May be FreeBSD have kind of undo commands I can try? Thanks in advance.
 
How do you know which disk that is? I think your problems are more fundamental. You need to understand basics of FreeBSD updates, packages versus base, and boot process (including the interaction of grub with other boot systems). Knowing how to identify disks when you have multiple (at least the mem stick and the NVMe) is part of that.
Sounds scary :( Hoping the problem is not too fundamental tho so that I can recover it without reinstall from clean slate.
I know it is the disk from issuing gpart show.
 

Attachments

  • IMG_4729.jpg
    IMG_4729.jpg
    100.8 KB · Views: 13

SirDice

Administrator
Staff member
Administrator
Moderator
Go in your BIOS/UEFI. Make sure you're UEFI booting, disable CSM boot. Select the proper boot 'disk' in the boot order menu.
 
I made sure EUFI booting, no CSM boot. NVMe0 set at top priority boot order. It doesn't work.
It kept loading on boot menu (attached) every time I reboot.

I have no idea what to try next.
Since the failing become worst after gpart set active, I guess it's worth to try undo the command. I don't know what commands to issue then.
 

Attachments

  • IMG_4731.jpg
    IMG_4731.jpg
    54.4 KB · Views: 6
System booting failed right after freebsd-update.
But: You have not updated anything - freebsd-update fetch does what that command says: It just downloads; There was no change at any file of a running system, and it doesn't change anything related to a boot process. It just "fetches". (To change something there is a second command afterwards needed.)

Both things are not related: Your problems are elsewhere, and are not related to the "unfinished update". (But without your missing libc I doubt you will run any command on FreeBSD, even not a login shell. It is weird that that fundamental file could be missed, as it is undeletable by default; You must have messed some things up before you started to fetching update files.)

But as SirDice said: Fix your Grub / boot environment first.
 
But: You have not updated anything - freebsd-update fetch does what that command says: It just downloads; There was no change at any file of a running system, and it doesn't change anything related to a boot process. It just "fetches". (To change something there is a second command afterwards needed.)

Both things are not related: Your problems are elsewhere, and are not related to the "unfinished update". (But without your missing libc I doubt you will run any command on FreeBSD, even not a login shell. It is weird that that fundamental file could be missed, as it is undeletable by default; You must have messed some things up before you started to fetching update files.)

But as SirDice said: Fix your Grub / boot environment first.
Thanks. You are right though.
Without missing libc, I will still be coding happily in Linux and slowly reading Absolute FreeBSD from page 1.
This is the brute force of learning FreeBSD.

Probably libc is missing after I ran pkg delete gnome and all dependent applications manually. (I remember some icons were greyed right after). Missing libc prevent me launch Firefox in KDE and xfce. Booting FreeBSD is still fine without libc. I can juggle DE between KDE and xfce.

I understand that fetch wont change anything, but fact is that after fetch process halt, I cant no longer boot FreeBSD while still able to boot Ubuntu and Windows. (I am not blaming FreeBSD, I am learning FreeBSD and cursing the mess I created). Grub got no problem at this point in time.

Grub only started to fail when I ran gpart set active to GPT disk. Grub dissapeared and I don't know how to fix this.
I wanted to undo set active but not sure which commands to type in. Maybe damage has been done and irreversible.
I am now trying to recover Grub using Ubuntu Live CD.
 

SirDice

Administrator
Staff member
Administrator
Moderator
I made sure EUFI booting, no CSM boot. NVMe0 set at top priority boot order. It doesn't work.
It kept loading on boot menu (attached) every time I reboot.
In the BIOS boot order, select "Ubuntu", not NVMe0.

Probably libc is missing after I ran pkg delete gnome and all dependent applications manually.
It won't. libc is part of the base OS, packages aren't going to touch it.
 
Well, fixing Grub and FreeBSD boot record is found equally difficult. Too bad I can't get correct procedures I can try to get this back alive.
Been trying all random stuffs on the Internet to no avail. Time just doesn't permit longer tinkering.

I just get all this solved with reinstallation Ubuntu and FreeBSD from clean slate. Easier, no fuzzy things.
Maybe next time when I feel masochistic, I will try the harder route.
 
Top