# 9.0 Minor Update >> System Down >> Recover?



## vask (Oct 24, 2014)

Any way to recover from the following on the unsupported FreeBSD 9.0 release?

```
# freebsd-update fetch
# freebsd-update rollback
/bin/sh: Undefined symbol "_ThreadRuneLocale"
```

Can I do a non-destructive reinstall?

Please advise.

== More Info ==
Because this was not even a point upgrade I didn't think the consequences would be so huge.
ie) It was just updating 9.0 to 9.0
ie) It was NOT even updating 9.0 to 9.1

/rescue/sh is currently the only way in but still prints the _ThreadRuneLocale with most commands.

What works:
* tab completion
* `cd /var/db/freebsd-update/`
** ( looks like just a bunch of hash files though )

What might work (Currently says read only file system):
* `mv`
* `cp`

What doesn't work:
* `cat`
* `vi`


```
root@one:/root # freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 5 mirrors found.
Fetching public key from update3.freebsd.org... done.
Fetching metadata signature for 9.0-RELEASE from update3.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 25 patches.....10....20.. done.
Applying patches... done.
Fetching 120 files... done.

The following files are affected by updates, but no changes have
been downloaded because the files have been modified locally:
/etc/ssl/openssl.cnf
/var/db/mergemaster.mtree
...skipping...

The following files are affected by updates, but no changes have
been downloaded because the files have been modified locally:
/etc/ssl/openssl.cnf
/var/db/mergemaster.mtree
~
~
~
The following files will be added as part of updating to 9.0-RELEASE-p7:
/usr/src/crypto/openssl/ssl/s3_cbc.c

The following files will be updated as part of updating to 9.0-RELEASE-p7:
/boot/kernel/linux.ko
/boot/kernel/linux.ko.symbols
/boot/loader
/boot/pxeboot
/boot/zfsloader
/etc/mail/freebsd.cf
/etc/mail/freebsd.submit.cf
/etc/mail/sendmail.cf
/etc/mail/submit.cf
/lib/libc.so.7
/lib/libcrypt.so.5
/lib/libcrypto.so.6
/rescue/[
/rescue/atacontrol
/rescue/atmconfig
/rescue/badsect
/rescue/bsdlabel
/rescue/bunzip2
/rescue/bzcat
/rescue/bzip2
/rescue/camcontrol
/rescue/cat
/rescue/ccdconfig
/rescue/chflags
/rescue/chgrp
/rescue/chio
/rescue/chmod
/rescue/chown
/rescue/chroot
/rescue/clri
/rescue/cp
/rescue/csh
/rescue/date
/rescue/dd
/rescue/devfs
/rescue/df
/rescue/dhclient
/rescue/disklabel
/rescue/dmesg
/rescue/dump
/rescue/dumpfs
/rescue/dumpon
/rescue/echo
/rescue/ed
/rescue/ex
/rescue/expr
/rescue/fastboot
/rescue/fasthalt
/rescue/fdisk
/rescue/fsck
/rescue/fsck_4.2bsd
/rescue/fsck_ffs
/rescue/fsck_msdosfs
/rescue/fsck_ufs
/rescue/fsdb
/rescue/fsirand
/rescue/gbde
/rescue/geom
/rescue/getfacl
/rescue/glabel
/rescue/gpart
/rescue/groups
/rescue/gunzip
/rescue/gzcat
/rescue/gzip
/rescue/halt
/rescue/head
/rescue/hostname
/rescue/id
/rescue/ifconfig
/rescue/init
/rescue/ipf
/rescue/kenv
/rescue/kill
/rescue/kldconfig
/rescue/kldload
/rescue/kldstat
/rescue/kldunload
/rescue/ldconfig
/rescue/link
/rescue/ln
/rescue/ls
/rescue/lzcat
/rescue/lzma
/rescue/md5
/rescue/mdconfig
/rescue/mdmfs
/rescue/mkdir
/rescue/mknod
/rescue/mount
/rescue/mount_cd9660
/rescue/mount_msdosfs
/rescue/mount_nfs
/rescue/mount_ntfs
/rescue/mount_nullfs
/rescue/mount_udf
/rescue/mount_unionfs
/rescue/mt
/rescue/mv
/rescue/newfs
/rescue/newfs_msdos
/rescue/nos-tun
/rescue/pgrep
/rescue/ping
/rescue/ping6
/rescue/pkill
/rescue/ps
/rescue/pwd
/rescue/rcorder
/rescue/rcp
/rescue/rdump
/rescue/realpath
/rescue/reboot
/rescue/red
/rescue/rescue
/rescue/restore
/rescue/rm
/rescue/rmdir
/rescue/route
/rescue/routed
/rescue/rrestore
/rescue/rtquery
/rescue/rtsol
/rescue/savecore
/rescue/sconfig
/rescue/sed
/rescue/setfacl
/rescue/sh
/rescue/spppcontrol
/rescue/stty
/rescue/swapon
/rescue/sync
/rescue/sysctl
/rescue/tail
/rescue/tar
/rescue/tcsh
/rescue/tee
/rescue/test
/rescue/tunefs
/rescue/umount
/rescue/unlink
/rescue/unlzma
/rescue/unxz
/rescue/vi
/rescue/whoami
/rescue/xz
/rescue/xzcat
/rescue/zcat
/rescue/zfs
/rescue/zpool
/sbin/init
/sbin/restore
/sbin/rrestore
/usr/bin/dc
/usr/bin/dig
/usr/bin/ftp
/usr/bin/gate-ftp
/usr/bin/host
/usr/bin/login
/usr/bin/nslookup
/usr/bin/nsupdate
/usr/bin/ntpq
/usr/bin/openssl
/usr/bin/pftp
/usr/bin/slogin
/usr/bin/ssh
/usr/bin/ssh-add
/usr/bin/telnet
/usr/games/factor
/usr/include/openssl/crypto.h
/usr/include/openssl/opensslv.h
/usr/include/openssl/ssl.h
/usr/include/openssl/symhacks.h
/usr/lib/libc.a
/usr/lib/libc_p.a
/usr/lib/libc_pic.a
/usr/lib/libcrypt.a
/usr/lib/libcrypt_p.a
/usr/lib/libcrypto.a
/usr/lib/libcrypto_p.a
/usr/lib/libfetch.a
/usr/lib/libfetch_p.a
/usr/lib/libgssapi_krb5.a
/usr/lib/libgssapi_krb5_p.a
/usr/lib/libgssapi_ntlm.a
/usr/lib/libgssapi_ntlm_p.a
/usr/lib/libhdb.a
/usr/lib/libhdb_p.a
/usr/lib/libhx509.a
/usr/lib/libhx509.so.10
/usr/lib/libhx509_p.a
/usr/lib/libkrb5.a
/usr/lib/libkrb5.so.10
/usr/lib/libkrb5_p.a
/usr/lib/libpam.a
/usr/lib/libradius.a
/usr/lib/libradius.so.4
/usr/lib/libradius_p.a
/usr/lib/libssh.a
/usr/lib/libssh.so.5
/usr/lib/libssh_p.a
/usr/lib/libssl.a
/usr/lib/libssl.so.6
/usr/lib/libssl_p.a
/usr/lib/pam_radius.so.5
/usr/libexec/ftpd
/usr/libexec/kdc
/usr/libexec/sendmail/sendmail
/usr/sbin/amd
/usr/sbin/ddns-confgen
/usr/sbin/dnssec-dsfromkey
/usr/sbin/dnssec-keyfromlabel
/usr/sbin/dnssec-keygen
/usr/sbin/dnssec-revoke
/usr/sbin/dnssec-settime
/usr/sbin/dnssec-signzone
/usr/sbin/hostapd
/usr/sbin/lwresd
/usr/sbin/named
/usr/sbin/named-checkconf
/usr/sbin/named-checkzone
/usr/sbin/named-compilezone
/usr/sbin/named-journalprint
/usr/sbin/newsyslog
/usr/sbin/ntp-keygen
/usr/sbin/ntpd
/usr/sbin/ntpdc
/usr/sbin/ppp
/usr/sbin/rndc-confgen
/usr/sbin/sshd
/usr/sbin/wpa_supplicant
/usr/src/contrib/bind9/bin/named/query.c
/usr/src/contrib/bind9/lib/dns/include/dns/rdata.h
/usr/src/contrib/bind9/lib/dns/master.c
/usr/src/contrib/bind9/lib/dns/rdata.c
/usr/src/contrib/bind9/lib/dns/rdataslab.c
/usr/src/contrib/bind9/lib/dns/resolver.c
/usr/src/contrib/wpa/src/eap_server/eap_server_tls_common.c
/usr/src/crypto/openssl/CHANGES
/usr/src/crypto/openssl/Configure
/usr/src/crypto/openssl/FAQ
/usr/src/crypto/openssl/Makefile
/usr/src/crypto/openssl/NEWS
/usr/src/crypto/openssl/README
/usr/src/crypto/openssl/apps/apps.c
/usr/src/crypto/openssl/apps/dhparam.c
/usr/src/crypto/openssl/apps/openssl.cnf
/usr/src/crypto/openssl/apps/s_server.c
/usr/src/crypto/openssl/crypto/asn1/a_strex.c
/usr/src/crypto/openssl/crypto/asn1/a_verify.c
/usr/src/crypto/openssl/crypto/asn1/x_pubkey.c
/usr/src/crypto/openssl/crypto/bn/bn_word.c
/usr/src/crypto/openssl/crypto/cryptlib.c
/usr/src/crypto/openssl/crypto/crypto.h
/usr/src/crypto/openssl/crypto/o_init.c
/usr/src/crypto/openssl/crypto/ocsp/ocsp_vfy.c
/usr/src/crypto/openssl/crypto/opensslv.h
/usr/src/crypto/openssl/crypto/rsa/rsa_oaep.c
/usr/src/crypto/openssl/crypto/symhacks.h
/usr/src/crypto/openssl/doc/apps/CA.pl.pod
/usr/src/crypto/openssl/engines/e_capi.c
/usr/src/crypto/openssl/openssl.spec
/usr/src/crypto/openssl/ssl/Makefile
/usr/src/crypto/openssl/ssl/d1_enc.c
/usr/src/crypto/openssl/ssl/d1_pkt.c
/usr/src/crypto/openssl/ssl/s2_clnt.c
/usr/src/crypto/openssl/ssl/s2_pkt.c
/usr/src/crypto/openssl/ssl/s3_both.c
/usr/src/crypto/openssl/ssl/s3_clnt.c
/usr/src/crypto/openssl/ssl/s3_enc.c
/usr/src/crypto/openssl/ssl/s3_pkt.c
/usr/src/crypto/openssl/ssl/s3_srvr.c
/usr/src/crypto/openssl/ssl/ssl.h
/usr/src/crypto/openssl/ssl/ssl_err.c
/usr/src/crypto/openssl/ssl/ssl_lib.c
/usr/src/crypto/openssl/ssl/ssl_locl.h
/usr/src/crypto/openssl/ssl/t1_enc.c
/usr/src/crypto/openssl/ssl/t1_lib.c
/usr/src/crypto/openssl/util/libeay.num
/usr/src/lib/bind/config.h
/usr/src/lib/libc/gen/glob.c
/usr/src/secure/lib/libcrypt/crypt-des.c
/usr/src/secure/lib/libcrypto/Makefile.inc
/usr/src/secure/lib/libssl/Makefile
/usr/src/sys/amd64/amd64/trap.c
/usr/src/sys/compat/linux/linux_ioctl.c
/usr/src/sys/conf/newvers.sh
/usr/src/sys/netinet/tcp_input.c
/usr/src/sys/netinet6/in6.c
/usr/src/sys/netinet6/ip6_input.c

WARNING: FreeBSD 9.0-RELEASE-p3 HAS PASSED ITS END-OF-LIFE DATE.
Any security issues discovered after Mon Apr  1 00:00:00 UTC 2013
will not have been corrected.
root@one:/root # freebsd-update install
Installing updates.../usr/bin/tr: Undefined symbol "_ThreadRuneLocale"
/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/sort: Undefined symbol "_ThreadRuneLocale"
/usr/bin/tr: Undefined symbol "_ThreadRuneLocale"
/usr/bin/tr: Undefined symbol "_ThreadRuneLocale"
/usr/bin/sort: Undefined symbol "_ThreadRuneLocale"
/usr/bin/sort: Undefined symbol "_ThreadRuneLocale"
/usr/bin/sort: Undefined symbol "_ThreadRuneLocale"/usr/bin/tr: Undefined symbol "_ThreadRuneLocale"

/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/sort: Undefined symbol "_ThreadRuneLocale"
/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/sort: Undefined symbol "_ThreadRuneLocale"
/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/grep: Undefined symbol "_ThreadRuneLocale"
/usr/bin/sort: Undefined symbol "_ThreadRuneLocale"
/usr/bin/sort: Undefined symbol "_ThreadRuneLocale"
/usr/bin/sort: Undefined symbol "_ThreadRuneLocale"
/usr/bin/tr: Undefined symbol "_ThreadRuneLocale"
done.
root@one:/root # freebsd-update rollback
/bin/sh: Undefined symbol "_ThreadRuneLocale"
```


----------



## jb_fvwm2 (Oct 25, 2014)

I've maybe recovered a system almost-fully using rsync from another system; however if commands do not work that well one can use /rescue ... for example `/rescue/sh`  may be of help -- even copying it over the invalid not working one.


----------



## jb_fvwm2 (Oct 25, 2014)

Sorry I was not of help with half of that post... I see sh is working.  No experience with freebsd-update  either.


----------



## youngunix (Oct 25, 2014)

Unsupported -RELEASE = Unmaintained -RELEASE = WILL NOT receive updates/patches. Why don't you at least upgrade to 9.1-RELEASE.


----------



## vask (Oct 26, 2014)

Is there a live USB I can boot with and mount:

another USB thumb-drive containing the original files that were overwritten
the downed hard drive in writable mode
I want to restore the files that were overwritten by freebsd-install

jb_fvwm2,  I have to figure out a configuration and commands that can do the above before I can replace files on the downed system. Since reboot I can not use /bash/sh and from /rescue/sh almost every command including `mount` will throw the 
	
	



```
Undefined symbol "_ThreadRuneLocale"[/codr].

@youngunix,  can I do a non-destructive upgrade to 9.1 with the system in its current state?

== More Info ==
The downed system's hard drive throws errors and does not mount on another system through my Cables 2 Go USB to Hard Drive Adapter on FreeBSD 10 or Ubuntu 14.

Cables 2 Go USB to Hard Drive Adapter: [URL]http://amzn.com/B000UO6C5S[/URL]
```


----------



## wblock@ (Oct 26, 2014)

The FreeBSD install CD, DVD, and USB images all provide a way to run a shell.  I prefer mfsBSD, though.


----------



## youngunix (Oct 27, 2014)

vask said:


> youngunix, can I do a non-destructive upgrade to 9.1 with the system in its current state?


I've done such an upgrade only once and it went well, however, my system probably didn't have as many configurations as yours might. Instead of guessing if it will work or not, it is highly recommended that you image your current system as a precaution and proceed with the upgrade.


----------



## vask (Oct 27, 2014)

Success! Thanks for the help!

Booted from a live USB made from:
FreeBSD-10.1-RC3-i386-mini-memstick.img

Copied files from a working 9.0 system to a second USB drive and mounted with `mount -t msdosfs /dev/da1s1 /media`. 

Mounted the internal hard drive with `mount /dev/ada0s1a /mnt`. 

Overwrote the files that were messed up by `freebsd-update install`. 

And it worked!

== More Info ==
On Ubuntu 14 I was unable to reliably make a live USB with dd. However, I was able to make a live USB on Windows XP. See https://www.freebsd.org/doc/handbook/install-pre.html. 

UNetbootin also failed from Ubuntu 14 when I tried selecting the 8.0 distribution from the menu.


----------



## youngunix (Oct 27, 2014)

Glad it worked for you.
The `dd` part always gets me, you need to use `of=/dev/sdc1` instead of `of=/dev/sdc`.
Forget about UNetbootin, it only works with some Linux distributions.


----------



## wblock@ (Oct 27, 2014)

Congratulations, you were lucky.  Now make a backup, and start doing that regularly.  Then make plans to upgrade to a supported release immediately.


----------

