# I just upgraded 12-p1 to 13 and lost everything (almost?)



## userxbw (Oct 12, 2022)

I upgraded to 13 reboot. lost xwindows logged in user finished updating reboot lost root and user login so now I'm sitting in Linux writing this what to do? how to fix it?


----------



## Alain De Vos (Oct 12, 2022)

You can always drop into the bootloader, if not possible boot with a freebsd-iso and fix the problem.
If needed perform a fsck, if needed reinstall bootcode, check if you can chroot , mount filesystems, change root password, etc...


----------



## userxbw (Oct 12, 2022)

Alain De Vos said:


> You can always drop into the bootloader, if not possible boot with a freebsd-iso and fix the problem.
> If needed perform a fsck, if needed reinstall bootcode, check if you can chroot , mount filesystems, change root password, etc...


I've been away from linux and freeBSD for three years. I'm basically almost brain dead on commands. but thanks it's a start

it boots .. so how to change root passwd? whats the install root passwd , did does it have a defualt passed? (memory is gone, got to relearn a lot of this stuff)


I suppose that is still valid.

Power on your machine.
At the BSD bootloader press 2 to “Boot Single User”
The system will boot up to a administrative root shell without asking for a password.
Type “mount -u /”
Type “passwd root”
Enter your new password and confirm.
Reboot your machine.


----------



## SirDice (Oct 12, 2022)

userxbw said:


> I upgraded to 13 reboot.


First reboot? Only ran `freebsd-update install` once? Finish the upgrade. Also make sure to update all your installed packages/ports when indicated (after the _second_ `freebsd-update install`).


----------



## userxbw (Oct 12, 2022)

SirDice said:


> First reboot? Only ran `freebsd-update install` once? Finish the upgrade. Also make sure to update all your installed packages/ports when indicated (after the _second_ `freebsd-update install`).


i ran update reboot, lost x org so from the CLI I ran update again to finish it, rebooted the 2nd time came back and  then lost user and root login. I just booted into single user had to run fsck fix the errors to the hdd, then mount -u / passwd root it  did passwd  twice reboot inbetween ,  and still do not have root or user login . it is just stuck at the login prompt

how's your day going...


----------



## SirDice (Oct 12, 2022)

userxbw said:


> I ran update again to finish it


What exactly did you run?



userxbw said:


> I just booted into single user and mount -u / passwd root twice


Ok, maybe something went wrong with the merging of some new accounts that needed to be added. Boot to single user mode again, double check you actually have UFS, `mount -a` to mount everything. Edit /boot/loader.conf and /etc/rc.conf and disable _everything_ you don't need to boot the machine. You don't want to boot straight to X, stick to the console until you've finished/fixed the upgrade.


----------



## userxbw (Oct 12, 2022)

SirDice said:


> What exactly did you run?
> 
> 
> Ok, maybe something went wrong with the merging of some new accounts that needed to be added. Boot to single user mode again, double check you actually have UFS, `mount -a` to mount everything. Edit /boot/loader.conf and /etc/rc.conf and disable _everything_ you don't need to boot the machine. You don't want to boot straight to X, stick to the console until you've finished/fixed the upgrade.


I ran freebsd-upgrade install 
and okay? hope my memory comes back its been 3 years since I deal with any of this stuff.


----------



## SirDice (Oct 12, 2022)

userxbw said:


> I ran freebsd-upgrade install


Ok, that's good. The reason I asked is that I've seen people do `freebsd-update fetch` in an attempt to "fix" things. DO NOT DO THAT. It's going to royally screw up things even more. 



userxbw said:


> hope my memory comes back its been 3 years since I deal with any of this stuff.


It's like riding a bike. You might be a bit wobbly at first but it'll all come flooding back soon enough


----------



## Alain De Vos (Oct 12, 2022)

Try to work towards a certain phase.
E.g. being able to login as root in multi-user environment in console/text-mode.


----------



## userxbw (Oct 12, 2022)

SirDice said:


> Ok, that's good. The reason I asked is that I've seen people do `freebsd-update fetch` in an attempt to "fix" things. DO NOT DO THAT. It's going to royally screw up things even more.
> 
> 
> It's like riding a bike. You might be a bit wobbly at first but it'll all come flooding back soon enough


yeah, at mulit user login.  it says libncurses.so.8 missing required by bash

on single user, which I have no experice on whatsoever. it shows me in root home on ls  . so can i run commands like that or is there a special set before hand, if so how to?


----------



## userxbw (Oct 12, 2022)

Alain De Vos said:


> Try to work towards a certain phase.
> E.g. being able to login as root in multi-user environment in console/text-mode.
> e


at login  says I am missing libncurses.so.8 needed by bash


----------



## Alain De Vos (Oct 12, 2022)

boot single user mode.
Mount the filesystem.
go to /etc/passwd
Check the login shell of root.
If it is bash change to sh, that has no dependencies on ncurses. So it always works.


----------



## userxbw (Oct 12, 2022)

Alain De Vos said:


> boot single user mode.
> Mount the filesystem.
> go to /etc/passwd
> Check the login shell of root.
> If it is bash change to sh, that has no dependencies on ncurses. So it always works.


how tos 
*chsh -s /usr/local/bin/bash

so i'd be
chsh -s /usr/local/sh*


----------



## Alain De Vos (Oct 12, 2022)

Or you can edit the password file with vipw
The shell is

```
/bin/sh
```


----------



## userxbw (Oct 12, 2022)

Alain De Vos said:


> Or you can edit the password file with vipw
> The shell is
> 
> ```
> ...


Yeah I figured that out, but the passwd
root:*:0:0: Charlie &:/root:/bin/sh
Charlie isn't my password
Mod

Okay I'm in root account with access to the internet.

Version check
13.0 release p13

Entry inconsistent
Error service module
Pam sm chauttok pw copy failed for user passwd change ³


----------



## Alain De Vos (Oct 12, 2022)

if you have internet:

```
pkg update -f
pkg upgrade
```


----------



## userxbw (Oct 12, 2022)

Alain De Vos said:


> if you have internet:
> 
> ```
> pkg update -f
> ...


Newer freebsd version zziplib Package 1301000
Running kernel 3000139
Repo freebsd wrong os version package for freebsd 13


So should I just be ignoring everything and see what happens
Mod
I just seen
Major os version upgrade detected run pkg bootstrap -frrecommended I'll do that instead


----------



## SirDice (Oct 12, 2022)

userxbw said:


> root:*:0:0: Charlie &:/root:/bin/sh
> Charlie isn't my password


That's not the password. That's just the gecos field of root. Which, by default, says "Charlie root" (the _&_ is a placeholder for the user's account name). Passwords aren't stored in /etc/passwd. Actually, your user account isn't actually stored there either.


userxbw said:


> I just seen
> Major os version upgrade detected run pkg bootstrap -frrecommended I'll do that instead


Yes. 
`pkg bootstrap -f` followed by `pkg upgrade`. Once that's finished run `freebsd-upgrade install` for a _third_ and final time. This will clean up old libraries and other files.


----------



## userxbw (Oct 12, 2022)

SirDice said:


> That's not the password. That's just the gecos field of root. Which, by default, says "Charlie root" (the _&_ is a placeholder for the user's account name). Passwords aren't stored in /etc/passwd. Actually, your user account isn't actually stored there either.
> 
> Yes.
> `pkg bootstrap -f` followed by `pkg upgrade`. Once that's finished run `freebsd-upgrade install` for a _third_ and final time. This will clean up old libraries and other files.


After upgrade, it did what I thought it would, took off and came back and it stops with a y/n question.

Anyways,
3 GB MORE space yes no, yes
Reinstalling freetype 100%
Pkg libglvnd 1.4.0_2 conflicts with mesa libs 18.3.2._4 installs files into the same place. Problematic file/usr/local/include/EGL/EGL.h
Stopped

Reboot
Pkg update -f
Ran until
Creating Pulse
 Pulse rt
Creating user pulse uid 563
User pulse disappeared during update

pre install script failed

Stop

Fixed it, found something on Google.

freebsd-upgrade install
Not found
.. the days not over yet


----------



## SirDice (Oct 12, 2022)

Right, it's obviously been a while since your last update. Just `pkg delete -f mesa-libs nvidia-driver` and start `pkg upgrade` again. Are you actually using an NVidia card? Depending on the card model you may need to switch to x11/nvidia-driver-470 or x11/nvidia-driver-390. The latest NVidia driver dropped support for a number of older cards. 


```
20210617:
  AFFECTS: users of graphics/mesa-libs and x11/nvidia-driver
  AUTHOR: kbowling@FreeBSD.org

  Some libraries from mesa-libs are now provided by libglvnd while
  others were renamed. nvidia-driver already used libglvnd but bundled
  a copy which is now provided as a separate package. When building
  outside poudriere make sure to remove mesa-libs and nvidia-driver
  first in order to avoid conflict with libglvnd.

  For portmaster users:
  # pkg delete -f mesa-libs nvidia-driver
  # portmaster -a

  For portupgrade users:
  # pkg delete -f mesa-libs nvidia-driver
  # portupgrade -a
```


----------



## userxbw (Oct 12, 2022)

SirDice said:


> Right, it's obviously been a while since your last update. Just `pkg delete -f mesa-libs nvidia-driver` and start `pkg upgrade` again. Are you actually using an NVidia card? Depending on the card model you may need to switch to x11/nvidia-driver-470 or x11/nvidia-driver-390. The latest NVidia driver dropped support for a number of older cards.
> 
> 
> ```
> ...


I got past that, and now I'm getting
freebsd-upgrade
Not found message
Xorg
Cannot run in framebuffer mode please specify busID for all frame
That might have something to do with it's not booting up in 1080 it's just standard VGA booting now.

I forgot which config file that's
And yeah it's been 3 years since I was on this laptop and Slackware got me too. I ended up having to completely reinstall after trying to upgrade that just got done with that one yesterday and
Now here I go again with freeBSD 13


----------



## K5KGT (Oct 12, 2022)

SirDice typo'd  (I saw it as I've done the same several times)

it's `freebsd-update install` and not _freebsd-upgrade..._

that's why you get "not found"


----------



## userxbw (Oct 12, 2022)

K5KGT said:


> SirDice typo'd  (I saw it as I've done the same several times)
> 
> it's `freebsd-update install` and not _freebsd-upgrade..._
> 
> that's why you get "not found"


Thanks I finally figured that out, freking eye balls are going out. Now it's telling me

13.0 RELEASE p13 has passed it's end of life date WTF, and I still have to fix xorg


----------



## K5KGT (Oct 12, 2022)

I think you're merging two things into your problem

First, there is no 13.0-RELEASE-p13, the current one is "13.1-RELEASE-p2".

Once you get Freebsd properly updated/upgraded then worry about xorg.



---
[edit - we're all full of typo's today, thanks W.hâ/t!  That's what I get for doing several things at once.]


----------



## W.hâ/t (Oct 12, 2022)

K5KGT said:


> the current one is "13.0-RELEASE-p2".


I think you meant 13.1-RELEASE.

Did you get your accounts back?


----------



## userxbw (Oct 12, 2022)

W.hâ/t said:


> I think you meant 13.1-RELEASE.
> 
> Did you get your accounts back?


Nope that's what it said

freebsd-version 13.0-RELEASE-p13

And now trying to fix video for xorg

dmes|grep i195

KLD i915kms.ko depends on kernel - not available or version mismatch
Linker_load_file /boot/modules/i915kms.ko
 unsupported file type


----------



## W.hâ/t (Oct 12, 2022)

I was reffering to K5KGT 's post


----------



## userxbw (Oct 12, 2022)

K5KGT said:


> I think you're merging two things into your problem
> 
> First, there is no 13.0-RELEASE-p13, the current one is "13.1-RELEASE-p2".
> 
> ...


Do you want me to take a photo of it and send it to you?;

And my bash prompt is still saying freeBSD 12

freebsd-version -kru
13.0-RELEASE-p13

3 times

Yes I have my account back and trying to fix xorg and got a mismatched on i915kms.ko

And it would not let me upgrade again and it's telling me this 13 is no longer supported


----------



## W.hâ/t (Oct 12, 2022)

Nobody said that you were lying...
I suggest that you save any data that can be saved and reinstall 13.1-RELEASE.
This looks like a mess to restore.


----------



## userxbw (Oct 12, 2022)

W.hâ/t said:


> I was reffering to K5KGT 's post


----------



## userxbw (Oct 12, 2022)

W.hâ/t said:


> W.hâ/t said:
> 
> 
> > Nobody said that you were lying...
> ...


----------



## K5KGT (Oct 12, 2022)

I was going to crawl back under my rock after W.hâ/t made me "facepalm", but...

Do you have your bash prompt just giving you "user@host" in the prefix?

i.e. your bashprompt may just be parroting your "hostname" to you.  What does `hostname` respond?  I'm betting it's "FreeBSD-12", if so then you've properly gotten FreeBSD up to 13.0-p13, but just have an old hostname laying around (just change that unless you want it for posterity).

Ok, now to crawl back under my rock.


----------



## userxbw (Oct 12, 2022)

K5KGT said:


> I was going to crawl back under my rock after W.hâ/t made me "facepalm", but...
> 
> Do you have your bash prompt just giving you "user@host" in the prefix?
> 
> ...


at login user I get $ I think or # I forgot it was but when i login su - I get root@FreeBSD-12$ 13.0-p13 bbut then it says its out date for end of life support

oh yeah and i159klm.ko file not support file mismatch its still screwed up


----------



## Alain De Vos (Oct 12, 2022)

Don't worry about nvidia-kernel driver or xorg at this moment.
The first thing is to get "freebsd-version -kru" to something like:

```
13.1-RELEASE-p2
13.1-RELEASE-p2
13.1-RELEASE-p2
```
Is that ok ?
The installed kernel, the running kernel and the userland should be the same and "actual".


----------



## Erichans (Oct 12, 2022)

Looking through the thread it seems you are confronted with three problems:

 running a not supported FreeBSD 13.0-RELEASE *
 not being able to run X and or video driver problems
 bash problems
Generally speaking, consult the fine manual: the FreeBSD Handbook; for example from the documentation matrix. FreeBSD does things differently then Linux distro's.

For upgrading FreeBSD use freebsd-update(8) to get to FreeBSD-RELEASE 13.1 (which is supported), see 24.2.3. Performing Major and Minor Version Upgrades **

Depending on your situation and minor or major version upgrade you'll have to use freebsd-update(8) a number of times (usally three times) and reboot. If you want to be a bit more aware what is changing before each reboot, use `freebsd-version -kru` and watch the changes (note with `-kru` (or any other order): "freebsd-version will print the installed kernel version first, then the running kernel version, next the userland version") . I suggest you try this first.

If you're still using a NVIDIA graphics card find out which one and look for the correct driver as SirDice suggested

Your bash problems should be at the end and are most likely not effecting the normal running of FreeBSD and X; any problems _might_ have something to do with an old bash version; bash does not come as part of FreeBSD's base install, its a package: shells/bash/. Don't rely on bash for the current FreeBSD version. Do not set bash as shell for root; stick to sh(1) or tcsh(1) for the root user.

___
* Besides the FreeBSD home page, you'll find an overview of currently suported FreeBSD versions here
** just using freebsd-update(8) with `freebsd-update fetch` etc. is just for installing the newest patches, as _p13_ in RELEASE 13.0-p13; see 24.2.2. Applying Security Patches


----------



## K5KGT (Oct 12, 2022)

That's because 13.0 is EOL.  you want 13.1 now.  Follow the below instructions









						FreeBSD 13.1-RELEASE Installation Instructions
					

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms.




					www.freebsd.org
				




the file mismatch is likely because i159klm.ko is expecting a 13.1 kernel, not a 13.0 one.


----------



## userxbw (Oct 12, 2022)

K5KGT said:


> That's because 13.0 is EOL.  you want 13.1 now.  Follow the below instructions
> 
> 
> 
> ...


yeah, I'm already reading that and downloading an img

thanks


----------

