2023年9月2日土曜日

Ubuntu Serverのアップグレード

サーバーバージョンのUbuntuの場合、以下でOS更新ができるらしい
sudo do-release-upgrade
へー知らんかった

だが、これ打ち込むとすごく脅される

Reading cache

Checking package manager

Continue running under SSH?

This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.

If you continue, an additional ssh daemon will be started at port
'1022'.
Do you want to continue?

Continue [yN] Y

Starting additional sshd

To make recovery in case of failure easier, an additional sshd will
be started on port '1022'. If anything goes wrong with the running
ssh you can still connect to the additional one.
If you run a firewall, you may need to temporarily open this port. As
this is potentially dangerous it's not done automatically. You can
open the port with e.g.:
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'

To continue please press [ENTER]

たしかにSSHでこれやるのは超危険
でも、とりあえずEnterしてみる

この後、あれこれダウンロードしたりチェックしたりして、その後さらに聞かれる

Do you want to start the upgrade?


7 packages are going to be removed. 264 new packages are going to be
installed. 1112 packages are going to be upgraded.

You have to download a total of 820 M. This download will take about
5 minutes with your connection.

Installing the upgrade can take several hours. Once the download has
finished, the process cannot be canceled.

Continue [yN]  Details [d]

yで継続

まだ聞かれる・・・
そりゃサービスの更新くらいありますよね


YESで継続

さらに聞いてくる


んなの、別にいいよ、新しいの入れる

さらに聞かれる


わからんけど、新しくします

minidlnaも聞かれた


デフォルトでKeepでいいです

なんか消すらしい


yで継続


はいはい、Abortで、、、え?これ、YESなの?
(YESが選ばれてるのだからYESなのだろう)

最後に再起動を促される


さて・・・起動するだろうか?

あれ???
sshでつながらない、refuseされた

しかたないので、モニターとキーボード付けて起動してみたところ・・・
Emergency Mode ?
Give root password for maintenanceとか出てくるんですけど・・・
パスワード入れて、メンテナンスモードになり、とりあえずfstabでも見てみる

vi /etc/fstab
あ、UUID指定してマウントしてる・・・
今外付けのドライブ外してるんだった

とりあえず、先頭に#付けてコメントアウトしexit(exitすると再起動になる)
起動してくれました・・・

一瞬焦る・・・
それにしても、fstabは毎回ハマるんで、自分もそろそろ脳みそのアップデートがしたい






0 件のコメント: