작업 전 데이터 백업 필수, 업그레이드 중 실패 시 롤백이 어려움.
- 현재 버전: Ubuntu 22.04.5 LTS
- 신규 버전: Ubuntu 24.04.1 LTS
참고로..
Ubuntu LTS 버전 업그레이드는 일반적으로 24.04.1 LTS가 출시된 후(보통 2024년 7월 이후) 공식적으로 지원.
- 2024년 7월 이전에 진행했다면 Ubuntu 23.10으로 업그레이드 후 24.04 LTS로 업그레이드 진행.
사전작업
1. 버전 확인
# lsb_release -d
2. 시스템 업데이트 (Ubuntu 22.04 LTS 최신 버전으로 업데이트 필요)
# apt update && apt upgrade
필요한 경우 다음 명령어를 통해 그레이드를 수행할 수 있으며,
apt upgrade 명령과 달리 의존성을 체크하여 일부 패키지를 추가로 설치하거나, 불필요한 패키지의 경우 제거를 진행함.
# apt dist-upgrade
3. 사용하지 않는 종속성 제거
# apt autoremove
4. 업데이트 매니저 설치
기본적으로 설치가 되나 가끔 설치가 안되어 있는 경우가 있음
# apt install update-manager-core
OS 업그레이드
do-release-upgrade 명령을 시작으로 업그레이드가 진행 됨
# do-release-upgrade
업그레이드를 진행할 건지 확인 -> y진행
Checking for a new Ubuntu release
= Welcome to Ubuntu 24.04 LTS 'Noble Numbat' =
The Ubuntu team is proud to announce Ubuntu 24.04 LTS 'Noble Numbat'.
To see what's new in this release, visit:
https://wiki.ubuntu.com/NobleNumbat/ReleaseNotes
Ubuntu is a Linux distribution for your desktop or server, with a fast
and easy install, regular releases, a tight selection of excellent
applications installed by default, and almost any other software you
can imagine available through the network.
We hope you enjoy Ubuntu.
== Feedback and Helping ==
If you would like to help shape Ubuntu, take a look at the list of
ways you can participate at
http://www.ubuntu.com/community/participate/
Your comments, bug reports, patches and suggestions will help ensure
that our next release is the best release of Ubuntu ever. If you feel
that you have found a bug please read:
http://help.ubuntu.com/community/ReportingBugs
Then report bugs using apport in Ubuntu. For example:
ubuntu-bug linux
will open a bug report in Launchpad regarding the linux package.
If you have a question, or if you think you may have found a bug but
aren't sure, first try asking on the #ubuntu or #ubuntu-bugs IRC
channels on Libera.Chat, on the Ubuntu Users mailing list, or on the
Ubuntu forums:
http://help.ubuntu.com/community/InternetRelayChat
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
http://www.ubuntuforums.org/
== More Information ==
You can find out more about Ubuntu on our website, IRC channel and wiki.
If you're new to Ubuntu, please visit:
http://www.ubuntu.com/
To sign up for future Ubuntu announcements, please subscribe to Ubuntu's
very low volume announcement list at:
http://lists.ubuntu.com/mailman/listinfo/ubuntu-announce
Continue [yN]
SSH 세션이 끊어질 가능성에 대한 경고 표시
업그레이드 진행 중 세션이 끊어지더라도 1022 포트를 통해 다시 접속 할 수 있도록 설정 -> y진행
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]
업그레이드 과정 중 추가 SSH 실행 표시 -> ENTER진행
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]
진행 시 변경되는 내용에 대한 설명,
상세 내역을 보려면 d, 아니면 -> y진행
Checking package manager
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating the changes
Calculating the changes
Do you want to start the upgrade?
49 packages are going to be removed. 163 new packages are going to be
installed. 528 packages are going to be upgraded.
You have to download a total of 973 M. This download will take about
3 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]
업그레이드 진행...
생략...
Get:656 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 python3-secretstorage all 3.3.3-3 [13.7 kB]
Get:657 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 python3-keyring all 24.3.1-1 [40.3 kB]
Get:658 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 python3-packaging all 24.0-1 [41.1 kB]
Get:659 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 python3-ptyprocess all 0.7.0-5 [15.1 kB]
Get:660 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 python3-pexpect all 4.9-2 [48.1 kB]
Get:661 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 python3-serial all 3.5-2 [78.6 kB]
Get:662 http://kr.archive.ubuntu.com/ubuntu noble-updates/main amd64 software-properties-common all 0.99.49.1 [14.4 kB]
생략...
설치되어 있는 패키지에 따라 추가 확인 메시지가 발생할 수 있음.
SSH 설정 파일은 기존 정보를 유지
업그레이드 후 기존 패키지 삭제 여부 확인 -> y진행
Searching for obsolete software
Reading state information... Done
Remove obsolete packages?
105 packages are going to be removed.
Removing the packages can take several hours.
Continue [yN] Details [d]
업그레이드 완료, 리부팅 -> y진행
System upgrade is complete.
Restart required
To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.
Continue [yN]
리부팅 후 확인
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble