How to resolve ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"

In this topic i have a problem about update freebsd 11 to 12

but now i got a new error message
and when i want to reboot my server i see this error message
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
enter full pathname of shell or return for /bin/sh:
6988


how can i resolve this problem?
Enter and fsck not work
 
Are you absolutely sure you ran freebsd-update until it was finished?

freebsd-update needs to run three times on a major version upgrade with a few reboots.

You need to follow the instructions it shows onscreen exactly.
There is one ambiguous part where it says you must upgrade all the ports on your system.
This also applied to packages. You must reinstall all packages. (pkg-static upgrade -f )

Rerun the freebsd-update command if you can. There might be more steps needed.
 
I have read the related post you had made and can only say one thing.
Sometimes it is easiest to just start over.
You could possibly do a source based upgrade to FreeBSD 12 to remedy this.
This might take some gynmastics seeing how you cannot boot your installation.
 
I cannot go to my panel Phishfry
first , I should go to my shell area, my freebsd os cannot go up and when i want to use any command to to anything i see this error message
cannot execute COMMAND for single user: no such file or directory
Of course, I started my FreeBSD with multiple user mode, but this message appears when I want to use Enter key for any written command
 
Do you remember if you installed the FreeBSD source code when you installed FreeBSD?
That might be your only approach.

freebsd-update does have a -rollback feature but I don't see how you could use it with your machine in this state.
 
Can you enter 'Single User' mode from the Loader prompt?
This is the screen with Beastie on it that waits 10 seconds.
That might be your only saving grace.
Single User mode does not require a working shell.
 
Do you remember if you installed the FreeBSD source code when you installed FreeBSD?
That might be your only approach.

freebsd-update does have a -rollback feature but I don't see how you could use it with your machine in this state.
I used freebsd-update install
and it was done
next, i used /usr/sbin/freebsd-update fetch
and In the next step again i used freebsd-update install
after that, for any command I saw
Code:
           ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
and after that i rebooted my server and now error message is
Code:
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
enter full pathname of shell or return for /bin/sh:
and my server cannot run up
 
I synced my iso file to my server, how can i go to my live panel when boot comes again and downgrade my files to resolve this problem? ( I can update OS again when every thing came to first status )
 
i FOUND my commands
I would like show you what was occurred
Code:
(~)> freebsd-update install

.....

The process will require 414 MiB more space.

Proceed with this action? [y/N]: y

[1/381] Upgrading linux_base-c7 from 7.4.1708_6 to 7.7.1908...

Cannot install package: kernel missing 64-bit Linux support

pkg: PRE-INSTALL script failed

(root@Host)-(04:54P)-(10/11)-(3)

Code:
(~)> freebsd-update install

Installing updates...rmdir: ///var/db/etcupdate/current/usr/share/openssl/man/en.ISO8859-1: Directory not empty

rmdir: ///var/db/etcupdate/current/usr/share/openssl/man: Directory not empty

rmdir: ///var/db/etcupdate/current/usr/share/openssl: Directory not empty

rmdir: ///var/db/etcupdate/current/usr/share/man/en.UTF-8: Directory not empty

rmdir: ///var/db/etcupdate/current/usr/share/man/en.ISO8859-1: Directory not empty

rmdir: ///var/db/etcupdate/current/usr/share/man: Directory not empty

 done.

(root@Host)-(04:56P)-(10/11)-(3)

Code:
(~)> freebsd-update install

No updates are available to install.

Run '/usr/sbin/freebsd-update fetch' first.

(root@Host)-(05:02P)-(10/11)-(3)


Code:
(~)> /usr/sbin/freebsd-update fetch

Looking up update.FreeBSD.org mirrors... 3 mirrors found.

Fetching metadata signature for 11.2-RELEASE from update1.freebsd.org... done.

Fetching metadata index... done.

Inspecting system... done.

Preparing to download files... done.

The following files will be updated as part of updating to 11.2-RELEASE-p14:

/bin/freebsd-version

/boot/check-password.4th

/boot/kernel/aac.ko

/boot/kernel/aacraid.ko

/boot/kernel/aesni.ko

/boot/kernel/alq.ko

/boot/kernel/arcmsr.ko

/boot/kernel/autofs.ko

/boot/kernel/cam.ko

/boot/kernel/cd9660.ko

/boot/kernel/cloudabi32.ko

/boot/kernel/cloudabi64.ko

/boot/kernel/coretemp.ko

/boot/kernel/cpuctl.ko

/boot/kernel/cpufreq.ko

/boot/kernel/ctl.ko

/boot/kernel/cuse.ko

/boot/kernel/cxgbei.ko

/boot/kernel/drm.ko

/boot/kernel/drm2.ko

-- MOST: *stdin*                                                                                                                        (1,1) 0%   

(root@Host)-(05:04P)-(10/11)-(3)

NOW PLEASE SEE THIS LINE
Code:
(~)> freebsd-update install

Installing updates...ld-elf.so.1: /bin/rm: Undefined symbol "lstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/gunzip: Undefined symbol "fstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/install: Undefined symbol "stat@FBSD_1.5"

ld-elf.so.1: /bin/rm: Undefined symbol "lstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/gunzip: Undefined symbol "fstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/install: Undefined symbol "stat@FBSD_1.5"

ld-elf.so.1: /bin/rm: Undefined symbol "lstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/gunzip: Undefined symbol "fstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/install: Undefined symbol "stat@FBSD_1.5"

ld-elf.so.1: /bin/rm: Undefined symbol "lstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/gunzip: Undefined symbol "fstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/install: Undefined symbol "stat@FBSD_1.5"

ld-elf.so.1: /bin/rm: Undefined symbol "lstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/gunzip: Undefined symbol "fstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/install: Undefined symbol "stat@FBSD_1.5"

ld-elf.so.1: /bin/rm: Undefined symbol "lstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/gunzip: Undefined symbol "fstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/install: Undefined symbol "stat@FBSD_1.5"

ld-elf.so.1: /bin/rm: Undefined symbol "lstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/gunzip: Undefined symbol "fstat@FBSD_1.5"

ld-elf.so.1: /usr/bin/install: Undefined symbol "stat@FBSD_1.5"

ld-elf.so.1: /bin/rm: Undefined symbol "lstat@FBSD_1.5"

ld-elf.so.1: /bin/chflags: Undefined symbol "fts_open@FBSD_1.5"

ld-elf.so.1: /bin/chflags: Undefined symbol "fts_open@FBSD_1.5"

ld-elf.so.1: /bin/chflags: Undefined symbol "fts_open@FBSD_1.5"

ld-elf.so.1: /bin/chflags: Undefined symbol "fts_open@FBSD_1.5"

ld-elf.so.1: /bin/chflags: Undefined symbol "fts_open@FBSD_1.5"

ld-elf.so.1: /bin/chflags: Undefined symbol "fts_open@FBSD_1.5"

ld-elf.so.1: /bin/chflags: Undefined symbol "fts_open@FBSD_1.5"

ld-elf.so.1: /bin/chflags: Undefined symbol "fts_open@FBSD_1.5"

(root@Host)-(05:05P)-(10/11)-(3)

(~)> freebsd-update install
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
(root@Host)-(05:05P)-(10/11)-(3)
(~)> freebsd-update install
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
(root@Host)-(05:05P)-(10/11)-(3)
(~)> freebsd-update install
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
(root@Host)-(05:05P)-(10/11)-(3)
(~)> pkg update
ld-elf.so.1: /lib/libelf.so.2: Undefined symbol "fstat@FBSD_1.5"
(root@Host)-(05:05P)-(10/11)-(3)
(~)> freebsd-update install
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
(root@Host)-(05:05P)-(10/11)-(3)
(~)> /usr/sbin/freebsd-update fetch
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
(root@Host)-(05:06P)-(10/11)-(3)
(~)> pkg upgrade
ld-elf.so.1: /lib/libelf.so.2: Undefined symbol "fstat@FBSD_1.5"

(root@Host)-(05:39P)-(10/11)-(3)
(~)> reboot
 
Or, specify /rescue/sh as a shell, it's a statically linked binary (consisting of many programs).
GOT IT
with this command
/rescue/sh
Have you checked the contents of /bin, /sbin, and /usr/lib as rescue(8) suggests, eventually copying those from a installation image over to the damaged system?

On the other hand, at this point, a new system installation with FreeBSD 12.0-RELEASE would be the best solution.

I synced my iso file to my server, how can i go to my live panel when boot comes again and downgrade my files to resolve this problem?
Are we talking about a remote FreeBSD installation, at a data center, or a local home server?
 
Have you checked the contents of /bin, /sbin, and /usr/lib as rescue(8) suggests, eventually copying those from a installation image over to the damaged system?

On the other hand, at this point, a new system installation with FreeBSD 12.0-RELEASE would be the best solution.


Are we talking about a remote FreeBSD installation, at a data center, or a local home server?
unfortunately, this is in data center server and my server is now down

I cannot check anything and contents of /bin, /sbin, and /usr/lib
because I get error

pkg upgrade OUTPUT:
ld-elf.so.1: /lib/libelf.so.2: Undefined symbol "fstat@FBSD_1.5"
ls OUTPUT
ld-elf.so.1: /bin/ls: Undefined symbol "fts_open@FBSD_1.5"

and etc

I used this command /rescue/mount -uw /
and now I dont know what can I do, My ISO file is on the server and I dont know can I remove and replace default files or not, and How can I do this? because I cannot go to my panel or work with my files
 
You did something really wrong when updating to 12.0, the correct way is:
Code:
/usr/sbin/freebsd-update -r 12.0-RELEASE upgrade
/usr/sbin/freebsd-update install
shutdown -r now
/usr/sbin/freebsd-update install
What ISO file do you have? Is it the 12.0-RELEASE? Then you can do the following:
Code:
/rescue/mdconfig /path/to/FreeBSD-12.0-RELEASE-amd64-disc1.iso
/rescue/mount_cd9660 /dev/md0 /mnt
/rescue/chflags noschg /lib/libc.so.7
/rescue/cp /mnt/lib/libc.so.7 /lib/libc.so.7
 
  • Thanks
Reactions: im
You did something really wrong when updating to 12.0, the correct way is:
Code:
/usr/sbin/freebsd-update -r 12.0-RELEASE upgrade
/usr/sbin/freebsd-update install
shutdown -r now
/usr/sbin/freebsd-update install
What ISO file do you have? Is it the 12.0-RELEASE? Then you can do the following:
Code:
/rescue/mdconfig /path/to/FreeBSD-12.0-RELEASE-amd64-disc1.iso
/rescue/mount_cd9660 /dev/md0 /mnt
/rescue/chflags noschg /lib/libc.so.7
/rescue/cp /mnt/lib/libc.so.7 /lib/libc.so.7
Code:
/usr/sbin/freebsd-update -r 12.0-RELEASE upgrade
/usr/sbin/freebsd-update install
shutdown -r now
/usr/sbin/freebsd-update install
All of these commands give me back this OUTPUT
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
First, I should find a way to resolve this error message
I googled this problem but i cannot find a way to resolve that
 
Code:
/usr/sbin/freebsd-update -r 12.0-RELEASE upgrade
/usr/sbin/freebsd-update install
shutdown -r now
/usr/sbin/freebsd-update install
All of these commands give me back this OUTPUT
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
First, I should find a way to resolve this error message
I googled this problem but i cannot find a way to resolve that
You definitely don't know what you are doing then. This is what you should have done to upgrade your system, it's useless now, you can't recover your system with these commands.
I posted a way to recover your system with the rescue bin but you probably didn't read it.
 
You definitely don't know what you are doing then. This is what you should have done to upgrade your system, it's useless now, you can't recover your system with these commands.
I posted a way to recover your system with the rescue bin but you probably didn't read it.
I know what you say, much appreciated for your answers
but my access is limited
please tell me how can I find exact path of my ISO file?
I have to give my iso path in vmware ? ( because here I cannot run and get a result when i enter a command )
I dont have any problem like this in debian centos slackware or gentoo and this error message occurred for first time and i dont have any experience about resolve that, for example we can find mounted driver with lsblk in kali-debian-ubuntu
or for example we can find path in /media/iso with > mount | awk '/\/media\/iso/ { print $1}'
but here i cannot find pathes
because i get this error message
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
 
I don't know vwmare at all. Can you attach a cdrom device to your machine and put an ISO in it?
You'll be able to mount it with /rescue/mount_cd9660 /dev/cd0 /mnt
 
It's normal, your libc is still from the 11.x era. The only command you can execute is the one located in /rescue
acheron this is not normal, because some of commands not work and output get this error message
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
here I cannot find path, because every thing get error,
I cannot use ls or find file and folders or any other command in my /rescue/sh area
this is not normal,
this error was in my FreeBSD OS before reboot server
and I could not use commands
i cannot find path because all of commands give me this error message
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
I think one of resolving methods is deleting some paths and maybe this error message can be fixed and then I can go to my os area
these commands maybe resolve my problem but i cannot find my ISO path
/rescue/mdconfig /path/to/FreeBSD-12.0-RELEASE-amd64-disc1.iso
/rescue/mount_cd9660 /dev/md0 /mnt
/rescue/chflags noschg /lib/libc.so.7
/rescue/cp /mnt/lib/libc.so.7 /lib/libc.so.7
 
I start to think you're just a troll and you're wasting my time. I'll try to explain this one more time and hope you'll be more cooperative / less stubborn.

acheron this is not normal, because some of commands not work and output get this error message
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
here I cannot find path, because every thing get error,
I cannot use ls or find file and folders or any other command in my /rescue/sh area
this is not normal,
this error was in my FreeBSD OS before reboot server
and I could not use commands
i cannot find path because all of commands give me this error message
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
I think one of resolving methods is deleting some paths and maybe this error message can be fixed and then I can go to my os area
these commands maybe resolve my problem but i cannot find my ISO path
You're wrong, the error message is perfectly normal, you're trying to use some libc symbol that are not present in your libc. As I said in my very first post : you need to upgrade your libc.
Can you explain me what is a "path" for you? What do you mean by "cannot find path"? Can you tell me how you execute "ls", I hope it's with /rescue/ls or it just means you're a troll.
 
Back
Top