Failed upgrade to 22.01 on SG-2220
-
I have an SG-2220 that was on 21.05 and I hit the 'upgrade' button in the WebUI.
I waited for about half an hour and guessed that something went wrong. I connected a USB cable to access the serial port and nothing was showing up on the screen :( I decided to power cycle the box.
Now, on the serial port I'm seeing:
F6 PXE Boot: F1 No /boot/loader FreeBSD/x86 boot Default: 0:ad(0,a)/boot/kernel/kernel boot:
Any way I can fix this? Any way I can at least salvage the current config? (I forgot to backup the config before the upgrade...)
-
You'll need to reinstall it at that point. You can contact TAC to get an installer image if that unit shipped with Plus on it.
The installer has an option to recover the configuration from the drive in the unit, which may be able to retrieve it for you.
-
@jimp
Thanks for this. I did end up re-installing but the installer wasn't able to recover the config file :(The installer does have 'drop to shell' functionality but I wasn't able to find the file manually either. IIUC, the way 'recover config file' works is that the file is read into ram, a regular install is performed (deleting the config file from disk), and then the file is restored from RAM. FFR, the config file is stored on disk as /cf/conf/config.xml.
I suspect that during my upgrade, the file was copied into RAM, the file was deleted, and I interrupted the upgrade process before it completed. Fortunately I didn't have to start from scratch. I had a backup from a few years ago.
Next time, I'm going to perform an upgrade from the Console, so I can better monitor progress.
-
The configuration isn't copied to RAM during upgrade, it remains in place on the disk and isn't touched then. Not sure what might have happened, but it wouldn't have only been from the upgrade being interrupted. Not unless whatever happened also corrupted the filesystem.
The upgrade process doesn't touch the disk in that way, it only applies new OS packages in place of the old ones and makes config adjustments afterward. If it gets interrupted in the wrong place, such as during the kernel package update, I could see it failing to boot like you showed. But that wouldn't result in losing the config or other filesystem data in most cases.
It's possible there was some existing filesystem corruption that was exasperated in some way by the upgrade but that's also quite rare. If that was the case, a reinstall should fix it all up, unless there is a hardware issue underneath such as a failing disk. You might want to keep a close eye on it and make regular backups just in case. Turning on ACB can also help there, but you'll still want to retain a local backup periodically, especially using the new option to backup SSH keys, as that will result in a smoother experience with ACB overall.