# Upgrade problem, 9.0 to 9.1



## bluephage (Nov 5, 2013)

Following the handbook, I upgrade to 9.1 from 9.0.
After reboot I start getting

```
/bin/sh: Undefined Symbol "_ThreadRuneLocale"
```
After another reboot I cannot login at all, it just prompts for a shell that works and all of them say the same error message.

How do I fix the system (because it is not healing its self)?

Thanks.


----------



## jb_fvwm2 (Nov 5, 2013)

What I usually have done, if I recall correctly, is `rsync` various directories (/usr/sbin), etc. from a 9.1 install onto the 9.0 > 9.1 one, until the login is permitted. A thumbdrive may be useful in this case [that is, in some permutation of it, maybe not this one... ] , even one from ghostbsd.org (etc.) if it permits writing to the disk somehow, and if one is careful enough to back up data on the hosed system first in case it wrecks the MBR or GPT or something.


----------



## ShelLuser (Nov 5, 2013)

How exactly did you upgrade? Because although you refer to the handbook you overlook that it actually explains _two_ ways of upgrading: using either freebsd-update or by building the base system from source.


----------



## bluephage (Nov 5, 2013)

I used freebsd-update. I may have to install 9.x onto a new disk and copy over the files and reconfigure the system - though this seems like a long method. I started the machine with 9.0 disk1.iso and it only has the option to install. I have little idea as to what this will actually do to the system if I run that. During bootup, I think I see that the system still thinks it is 9.0.


----------



## bluephage (Nov 5, 2013)

the error is more precisely:

```
/bin/sh: Undefined symbol "_ThreadRuneLocale"
/bin/sh: Undefined symbol "_ThreadRuneLocale"
Enter full pathname of shell or RETURN for /bin/sh:
/bin/sh: Undefined symbol "_ThreadRuneLocale"
/bin/sh: Undefined symbol "_ThreadRuneLocale"
```


----------



## ShelLuser (Nov 5, 2013)

Could you show us the output of `uname -a` as well as `nm -D /lib/libc.so.7 | grep _ThreadRuneLocale`?

I have a suspicion that we're dealing with an upgrade gone wrong. If you check out `ldd `which sh`` you'll notice that it's build against libc.so.7 and that library should provide this specific symbol:


```
smtp2:/usr/lib $ nm -D /lib/libc.so.7 | grep _ThreadRuneLocale
[i]0000000000000020 B _ThreadRuneLocale[/i]
smtp2:/usr/lib $ ldd `which sh`
/bin/sh:
        libedit.so.7 => /lib/libedit.so.7 (0x80083d000)
        libncurses.so.8 => /lib/libncurses.so.8 (0x800a68000)
        [i]libc.so.7 => /lib/libc.so.7 (0x800cb4000)[/i]
```
So right now my theory is that there's something awkward going on with your version of /lib/libc.so.7 (just a theory mind you!).


----------



## bluephage (Nov 5, 2013)

no command will run, always the prompt for a working shell with the error message described.


----------



## bluephage (Nov 6, 2013)

Hi,

I have the problem drive mounted on a fresh 9.0 and see that /bin/sh has not been modified.


----------



## bluephage (Nov 6, 2013)

But libc.so.7 has, I'll try reverting it.


----------



## bluephage (Nov 6, 2013)

Tried using(renaming) the kernel.old backup but still same error.


----------



## ShelLuser (Nov 6, 2013)

Using another kernel won't help you since its not causing these problems. What you're facing here is a so called 'userland' problem, which has nothing to do with the kernel.

If you got a rescue CD of some sort then you might be able to sort this out by mounting it and then forcing freebsd-update to use the mounted filesystem (see the -b flag in the freebsd-update(8) manualpage).

If you upgraded to 9.1 already then my suggestion would be to try again, this time forcing it to upgrade.


----------



## bluephage (Nov 6, 2013)

seems /bin/sh was infact changed (such similar looking dates that I did not notice)

I tried your upgrade suggestion with mixed results.

I got a load of errors like this

```
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
```

then a load of questions asking to delete files that are 'no longer in 9.1'


----------



## jb_fvwm2 (Nov 6, 2013)

Another way I seem to remember... 
[cmd=] cp -v /rescue/sh /bin/sh  [/cmd] Might make it start working (the commands in the former directory).  Might not...


----------



## bluephage (Nov 7, 2013)

I just tried updating a 9.0 and it will only go as far as 9.0-RELEASE-p3, I think it should go to 9.0-RELEASE-p7

doing a upgrade (freebsd-update -r 9.1-RELEASE upgrade) to 9.1-RELEASE from '9.0-RELEASE-p3' seems to not work.

all the /rescue/ folder files were updated, but will give it a try later.

am I forgetting to run some other command to the ports?

Am moving everything from freebsd for the moment.


----------

