# Lost /etc/rc.conf after upgrade from 13.1-p3 -> 13.1-p4



## MetaOxy (Nov 19, 2022)

Hi all,

It's been a long time since I posted here. I had to create a new account because I forgot my password from my current account and my email address doesn't exist anymore... anyway.

I have been using FreeBSD since the 9.x release, and this is the first time I see this.

Today just after and upgrade from  13.1-RELEASE-p2 ->  to 13.1-RELEASE-p3 + a reboot , I was not able to ssh to my server anymore ...

And for good reason, after investigation (which means unplug the machine and put it in another room for attach a screen etc. ...), I found that the /etc/rc.conf had simply disappeared.

Yes totally disappeared, which means no more no network, no hostname .... nothing.

By chance, this server is on my home location and I had a copy in a nfs share of rc.conf and pf.conf, and I was able to copy by hand the minimal stuff (IP + SSH enable) to reenable the network.

But this behavior is really odd. I have no idea what happened ... but not really cool at all


----------



## darmokandjalad (Nov 20, 2022)

I presume you just ran `freebsd-update fetch` and `freebsd-update install`, right? Can you describe the steps you used to upgrade?

Also, the title for this post says your /etc/rc.conf got munged in a 13.1-p3 -> 13.1-p4 upgrade, but in your post, you say the problem started in a 13.1-RELEASE-p2 ->  to 13.1-RELEASE-p3 upgrade. Which was it?


----------



## MetaOxy (Nov 20, 2022)

Hello

Yes as usual.

Command from history :


```
doas pkg update                                                                                                                                                                                         
doas pkg upgrade                                                                                                                                                                                         
doas freebsd-update fetch                                                                                                                                                                               
doas freebsd-update install                                                                                                                                                                             
uname -a
reboot
```

Yes my bad this is from RELEASE-P3 -> RELEASE-P4.


----------



## Alain De Vos (Nov 21, 2022)

For this reason i do a regularly backup for /etc/ & /usr/local/etc.


----------



## mer (Nov 21, 2022)

typically freebsd-update install needs to be run more than once.  First time updates kernel if needed, subsequent are used to install the updates for userland.  I think "3 times" is the typical number of times to run it.
pkg update/upgrade are typically run after you are done with freebsd-update install because fetching packages may depend on version of kernel (like drm-kmod perhaps).


----------



## mer (Nov 21, 2022)

This is where using ZFS and Boot Environments are lifesavers.  freebsd-update detects ZFS and creates new BE and then upgrades so it's easy to roll back and easy to figure out changes.


----------

