# No way to update FBSD 11 to 12 - Bus error (core dumped) and ld-elf.so.1 - invalid format



## bryn1u (May 17, 2021)

I had a fresh installed FreeBSD 11 and wanted to update to 12 version i did:
`pkg update`
`pkg upgrade`
`freebsd-update fetch install`
`freebsd-update -r 12.0-RELEASE upgrade`
`/usr/sbin/freebsd-update install`
`reboot`
`/usr/sbin/freebsd-update install`
And then:

```
Bus error (core dumped)
ld-elf.so.1: /lib/libmd.so.6: invalid file format
Bus error (core dumped)
ld-elf.so.1: /lib/libmd.so.6: invalid file format
Bus error (core dumped)
ld-elf.so.1: /lib/libmd.so.6: invalid file format
Bus error (core dumped)
ld-elf.so.1: /lib/libmd.so.6: invalid file format
chflags: ///lib/librss.so.1: No such file or directory
chflags: ///lib/libzfs.so.3: No such file or directory
chflags: ///usr/lib/libarchive.so.7: No such file or directory
chflags: ///usr/lib/libmilter.so.6: No such file or directory
chflags: ///usr/lib/libpathconv.so.1: No such file or directory
chflags: ///usr/lib/libprivatezstd.so.5: No such file or directory
chflags: ///usr/lib/libproc.so.5: No such file or directory
chflags: ///usr/lib/libregex.so.1: No such file or directory
chflags: ///usr/lib/libssl.so.111: No such file or directory
ld-elf.so.1: /lib/libmd.so.6: invalid file format
chflags: ///etc/cron.d/at: No such file or directory
chflags: ///etc/devd/devmatch.conf: No such file or directory
chflags: ///etc/newsyslog.conf.d/amd.conf: No such file or directory
chflags: ///etc/newsyslog.conf.d/ftp.conf: No such file or directory
chflags: ///etc/newsyslog.conf.d/lpr.conf: No such file or directory
chflags: ///etc/newsyslog.conf.d/pf.conf: No such file or directory
chflags: ///usr/bin/xzegrep: No such file or directory
chflags: ///usr/bin/xzfgrep: No such file or directory
chflags: ///usr/bin/xzgrep: No such file or directory
chflags: ///usr/bin/zstdcat: No such file or directory
chflags: ///usr/bin/zstdegrep: No such file or directory
chflags: ///usr/bin/zstdgrep: No such file or directory
chflags: ///usr/bin/zstdless: No such file or directory
chflags: ///usr/bin/zstdmt: No such file or directory
chflags: ///usr/bin/zstd: No such file or directory
chflags: ///usr/include/c++/v1/experimental/any: No such file or directory
chflags: ///usr/include/c++/v1/experimental/chrono: No such file or directory
chflags: ///usr/include/c++/v1/experimental/dynarray: No such file or directory
chflags: ///usr/include/librss.h: No such file or directory
chflags: ///usr/include/machine/sgx.h: No such file or directory
chflags: ///usr/include/machine/sgxreg.h: No such file or directory
chflags: ///usr/include/net/iflib_private.h: No such file or directory
chflags: ///usr/include/net80211/ieee80211_vht.h: No such file or directory
chflags: ///usr/include/netinet/cc/cc_newreno.h: No such file or directory
chflags: ///usr/include/netinet/netdump/netdump.h: No such file or directory
chflags: ///usr/include/netinet/tcp_hpts.h: No such file or directory
chflags: ///usr/include/netinet/tcp_log_buf.h: No such file or directory
chflags: ///usr/include/openssl/asn1err.h: No such file or directory
chflags: ///usr/include/openssl/async.h: No such file or directory
chflags: ///usr/include/openssl/asyncerr.h: No such file or directory
chflags: ///usr/include/openssl/bioerr.h: No such file or directory
chflags: ///usr/include/openssl/bnerr.h: No such file or directory
chflags: ///usr/include/openssl/buffererr.h: No such file or directory
chflags: ///usr/include/openssl/cmserr.h: No such file or directory
chflags: ///usr/include/openssl/comperr.h: No such file or directory
chflags: ///usr/include/openssl/conferr.h: No such file or directory
chflags: ///usr/include/openssl/cryptoerr.h: No such file or directory
chflags: ///usr/include/openssl/ct.h: No such file or directory
chflags: ///usr/include/openssl/cterr.h: No such file or directory
chflags: ///usr/include/openssl/dherr.h: No such file or directory
chflags: ///usr/include/openssl/dsaerr.h: No such file or directory
chflags: ///usr/include/openssl/ecerr.h: No such file or directory
chflags: ///usr/include/openssl/engineerr.h: No such file or directory
chflags: ///usr/include/openssl/evperr.h: No such file or directory
chflags: ///usr/include/openssl/kdf.h: No such file or directory
chflags: ///usr/include/openssl/kdferr.h: No such file or directory
chflags: ///usr/include/openssl/md2.h: No such file or directory
chflags: ///usr/include/openssl/objectserr.h: No such file or directory
chflags: ///usr/include/openssl/ocsperr.h: No such file or directory
chflags: ///usr/include/openssl/x509v3err.h: No such file or directory
chflags: ///usr/include/pathconv.h: No such file or directory
chflags: ///usr/include/pmcformat.h: No such file or directory
chflags: ///usr/include/private/event/event.h: No such file or directory
chflags: ///usr/include/private/sqlite3/sqlite3.h: No such file or directory
chflags: ///usr/include/private/sqlite3/sqlite3ext.h: No such file or directory
chflags: ///usr/include/private/zstd/zstd.h: No such file or directory
chflags: ///usr/include/sha224.h: No such file or directory
chflags: ///usr/include/ssp/ssp.h: No such file or directory
chflags: ///usr/include/ssp/stdio.h: No such file or directory
chflags: ///usr/include/ssp/string.h: No such file or directory
chflags: ///usr/include/ssp/unistd.h: No such file or directory
chflags: ///usr/include/sys/_domainset.h: No such file or directory
chflags: ///usr/include/sys/_stdarg.h: No such file or directory
chflags: ///usr/include/sys/_uio.h: No such file or directory
chflags: ///usr/include/sys/bus_dma_internal.h: No such file or directory
chflags: ///usr/include/sys/ck.h: No such file or directory
chflags: ///usr/include/sys/compressor.h: No such file or directory
chflags: ///usr/include/sys/disk/apm.h: No such file or directory
chflags: ///usr/include/sys/disk/bsd.h: No such file or directory
chflags: ///usr/include/sys/disk/gpt.h: No such file or directory
chflags: ///usr/include/sys/disk/mbr.h: No such file or directory
chflags: ///usr/include/sys/disk/vtoc.h: No such file or directory
chflags: ///usr/include/sys/domainset.h: No such file or directory
chflags: ///usr/include/sys/epoch.h: No such file or directory
chflags: ///usr/include/sys/epoch_private.h: No such file or directory
chflags: ///usr/include/sys/kern_prefetch.h: No such file or directory
chflags: ///usr/include/sys/kpilite.h: No such file or directory
chflags: ///usr/include/sys/pidctrl.h: No such file or directory
chflags: ///usr/include/sys/tslog.h: No such file or directory
chflags: ///usr/include/vm/vm_domainset.h: No such file or directory
chflags: ///usr/include/vm/vm_pagequeue.h: No such file or directory
chflags: ///usr/include/x86/bus_dma.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/__clang_cuda_builtin_vars.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/__clang_cuda_cmath.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/__clang_cuda_complex_builtins.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/__clang_cuda_intrinsics.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/__clang_cuda_math_forward_declares.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/__clang_cuda_runtime_wrapper.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/__stddef_max_align_t.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/__wmmintrin_aes.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/__wmmintrin_pclmul.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/adxintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/altivec.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/ammintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/arm64intr.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/arm_acle.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/arm_neon.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/armintr.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx2intrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512bitalgintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512bwintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512cdintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512dqintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512erintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512fintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512ifmaintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512ifmavlintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512pfintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vbmi2intrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vbmiintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vbmivlintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vlbitalgintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vlbwintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vlcdintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vldqintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vlintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vlvbmi2intrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vlvnniintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vnniintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vpopcntdqintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avx512vpopcntdqvlintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/avxintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/bmi2intrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/bmiintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/cetintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/clflushoptintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/clwbintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/clzerointrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/cpuid.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/emmintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/f16cintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/fma4intrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/fmaintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/fxsrintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/gfniintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/htmintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/htmxlintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/ia32intrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/immintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/lwpintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/lzcntintrin.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/mm3dnow.h: No such file or directory
chflags: ///usr/lib/clang/6.0.1/include/mm_malloc.h: No such file or directory
...
chflags: ///usr/share/man/man2/cpuset_setdomain.2.gz: No such file or directory
chflags: ///usr/share/man/man2/getrandom.2.gz: No such file or directory
chflags: ///usr/share/man/man3/CMSG_DATA.3.gz: No such file or directory
chflags: ///usr/share/man/man3/CMSG_FIRSTHDR.3.gz: No such file or directory
chflags: ///usr/share/man/man3/CMSG_LEN.3.gz: No such file or directory
chflags: ///usr/share/man/man3/CMSG_NEXTHDR.3.gz: No such file or directory
chflags: ///usr/share/man/man3/CMSG_SPACE.3.gz: No such file or directory
chflags: ///usr/share/man/man3/CREATE_SERVICE.3.gz: No such file or directory
chflags: ///usr/share/man/man3/SHA224_Data.3.gz: No such file or directory
chflags: ///usr/share/man/man3/SHA224_End.3.gz: No such file or directory
chflags: ///usr/share/man/man3/SHA224_File.3.gz: No such file or directory
chflags: ///usr/share/man/man3/SHA224_FileChunk.3.gz: No such file or directory
chflags: ///usr/share/man/man3/SHA224_Final.3.gz: No such file or directory
chflags: ///usr/share/man/man3/SHA224_Init.3.gz: No such file or directory
chflags: ///usr/share/man/man3/SHA224_Update.3.gz: No such file or directory
chflags: ///usr/share/man/man3/SLIST_REMOVE_PREVPTR.3.gz: No such file or directory
chflags: ///usr/share/man/man3/abs2rel.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_closelog.3.gz: No such file or directory
...
chflags: ///usr/share/man/man3/cap_getgrgid.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_getgrgid_r.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_getgrnam.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_getgrnam_r.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_gethostbyaddr.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_gethostbyname.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_gethostbyname2.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_getnameinfo.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_getpwent.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_getpwent_r.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_getpwnam.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_getpwnam_r.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_getpwuid.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_getpwuid_r.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_grp.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_grp_limit_cmds.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_grp_limit_fields.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_grp_limit_groups.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_openlog.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_pwd.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_pwd_limit_cmds.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_pwd_limit_fields.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_pwd_limit_users.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_random.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_random_buf.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_setgrent.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_setgroupent.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_setlogmask.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_setpassent.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_setpwent.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_sysctl.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_sysctlbyname.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_syslog.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cap_vsyslog.3.gz: No such file or directory
chflags: ///usr/share/man/man3/caph_enter.3.gz: No such file or directory
chflags: ///usr/share/man/man3/caph_enter_casper.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cgget.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cgput.3.gz: No such file or directory
chflags: ///usr/share/man/man3/cgwrite.3.gz: No such file or directory
chflags: ///usr/share/man/man3/crypt_r.3.gz: No such file or directory
chflags: ///usr/share/man/man3/flopenat.3.gz: No such file or directory
chflags: ///usr/share/man/man3/geom_deletetree.3.gz: No such file or directory
chflags: ///usr/share/man/man3/geom_gettree.3.gz: No such file or directory
chflags: ///usr/share/man/man3/geom_getxml.3.gz: No such file or directory
chflags: ///usr/share/man/man3/geom_xml2tree.3.gz: No such file or directory
chflags: ///usr/share/man/man3/getacqsize.3.gz: No such file or directory
chflags: ///usr/share/man/man3/getauclassnam_3.3.gz: No such file or directory
chflags: ///usr/share/man/man3/getauusernam_R.3.gz: No such file or directory
chflags: ///usr/share/man/man3/getentropy.3.gz: No such file or directory
chflags: ///usr/share/man/man3/libcap_dns.3.gz: No such file or directory
chflags: ///usr/share/man/man3/libcap_grp.3.gz: No such file or directory
chflags: ///usr/share/man/man3/libcap_pwd.3.gz: No such file or directory
chflags: ///usr/share/man/man3/libcap_random.3.gz: No such file or directory
chflags: ///usr/share/man/man3/libcap_sysctl.3.gz: No such file or directory
chflags: ///usr/share/man/man3/libcap_syslog.3.gz: No such file or directory
chflags: ///usr/share/man/man3/libcasper_service.3.gz: No such file or directory
chflags: ///usr/share/man/man3/pcap_set_immediate_mode.3.gz: No such file or directory
chflags: ///usr/share/man/man3/pcap_set_protocol.3.gz: No such file or directory
chflags: ///usr/share/man/man3/rel2abs.3.gz: No such file or directory
chflags: ///usr/share/man/man3/sbget.3.gz: No such file or directory
chflags: ///usr/share/man/man3/sbput.3.gz: No such file or directory
chflags: ///usr/share/man/man3/timespec_get.3.gz: No such file or directory
chflags: ///usr/share/man/man3/timespecadd.3.gz: No such file or directory
chflags: ///usr/share/man/man3/timespecclear.3.gz: No such file or directory
chflags: ///usr/share/man/man3/timespeccmp.3.gz: No such file or directory
chflags: ///usr/share/man/man3/timespecisset.3.gz: No such file or directory
chflags: ///usr/share/man/man3/timespecsub.3.gz: No such file or directory
^C
root@HardenedBSD:~ # /usr/sbin/freebsd-update install
ld-elf.so.1: /lib/libedit.so.7: invalid file format
```


```
root@HardenedBSD:~ # pkg update
ld-elf.so.1: /lib/libm.so.5: invalid file format
```


```
root@HardenedBSD:~ # git
git: Command not found.
root@HardenedBSD:~ # vim
ld-elf.so.1: /lib/libm.so.5: invalid file format
root@HardenedBSD:~ # pkg install git
ld-elf.so.1: /lib/libm.so.5: invalid file format
root@HardenedBSD:~ #
```

Whats is wrong with this system ??? And no, i can't install other FreeBSD version then 11 because of hosting. The only way is install FreeBSD 11 and update to 13.


----------



## SirDice (May 17, 2021)

bryn1u said:


> And no, i can't install other FreeBSD version then 11 because of hosting.


It sounds and looks like they used a custom image for 11 and that's the only thing they have available?



bryn1u said:


> The only way is install FreeBSD 11 and update to 13.


You can upgrade directly to 13.0 if you want. There's no need to go through all the intermediate versions.


----------



## bryn1u (May 17, 2021)

SirDice said:


> It sounds and looks like they used a custom image for 11 and that's the only thing they have available?
> 
> 
> You can upgrade directly to 13.0 if you want. There's no need to go through all the intermediate versions.



They have only FreeBSD 11 version available from panel and there is no way to mount my own iso. In this case would be FreeBSD 13.


----------



## zirias@ (May 17, 2021)

The hostname looks like it's not actually FreeBSD but HardenedBSD…


----------



## sko (May 17, 2021)

If this is a new host/installation (i.e. no user data yet) you could try using mfsBSD [1]. That was my solution back when digitalocean didn't had FreeBSD as an option (or only very outdated releases). Just dd it to the disk from a rescue system and boot it. It gets loaded to memory and you can then install to the same disk it was initially loaded from.

[1] https://mfsbsd.vx.sk/


----------



## SirDice (May 17, 2021)

Zirias said:


> The hostname looks like it's not actually FreeBSD but HardenedBSD…


Good eye.


----------



## bryn1u (May 17, 2021)

Zirias said:


> The hostname looks like it's not actually FreeBSD but HardenedBSD…


I used to use it once and the only name remained.  It's only hostname and has nothing to do with HardenedBSD project.


----------



## bryn1u (May 17, 2021)

It seems to be working:

```
root@HardenedBSD:~ # uname -a
FreeBSD HardenedBSD 13.0-RELEASE FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr  9 04:24:09 UTC 2021     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
root@HardenedBSD:~ #
```


----------



## SirDice (May 17, 2021)

That only shows information of the running kernel. What does `freebsd-version -uk` tell you?


----------



## bryn1u (May 17, 2021)

SirDice said:


> That only shows information of the running kernel. What does `freebsd-version -uk` tell you?




```
root@HardenedBSD:~ # freebsd-version -uk
13.0-RELEASE
13.0-RELEASE
```


----------

