Ubuntu 16.04LTS 에서 18.04LTS로 업그레이드 하기

2022. 4. 5. 12:58·Linux

데이터 백업 필수

업데이트 중 오류 발생 시 복원이 어려움

 

 

최신 업데이트 적용

설치 된 패키지를 최신으로 업데이트 적용 및 리부팅

# apt update && apt upgrade && apt dist-upgrad
# reboot now
  • apt update
    업데이트 할 패키지들의 목록을 최신으로 갱신 (실제 패키지 업그레이드는 아님)

  • apt upgrade
    update 로 갱신 된 최신 패키지를 실제로 업그레이드

  • apt dist-upgrad
    upgrade는 의존성 체크를 하지 않고 패키지를 설치하지만
    dist-upgrad는 의존성 체크를 하면서 upgrade에서 수행되지 못한 추가 패키지까지 설치

 

 

업데이트 매니저 설치

일반적으로는 설치가 되어 있지만 가끔 설치되지 않은 경우도 있음

# apt install update-manager-core

 

 

업그레이드 진행

 

업그레이드 진행을 위해 do-release-upgrade 입력

# do-release-upgrade

SSH를 통한 업그레이드를 계속 진행 할 건지에 대한 메시지 표시 -> y 진행

Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]
Get:2 Upgrade tool [1,251 kB]
Fetched 1,252 kB in 0s (0 B/s)
authenticate 'bionic.tar.gz' against 'bionic.tar.gz.gpg'
extracting 'bionic.tar.gz'

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 1022 포트에 대한 방화벽 설정 가이드 -> 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]

진행 ~~

Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Hit http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit http://security.ubuntu.com/ubuntu xenial-security InRelease
Get:1 https://esm.ubuntu.com/infra/ubuntu xenial-infra-security InRelease [7,515 B]
Get:2 https://esm.ubuntu.com/infra/ubuntu xenial-infra-updates InRelease [7,475 B]
Get:3 https://esm.ubuntu.com/infra/ubuntu xenial-infra-security/main amd64 Packages [371 kB]
Get:4 https://esm.ubuntu.com/infra/ubuntu xenial-infra-security/main i386 Packages [185 kB]
Get:5 https://esm.ubuntu.com/infra/ubuntu xenial-infra-updates/main amd64 Packages [4,746 B]
Get:6 https://esm.ubuntu.com/infra/ubuntu xenial-infra-updates/main i386 Packages [4,750 B]
Fetched 580 kB in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

스냅샷 스토어 연결과 관련 된 메시지 표기

프락시를 설정하여 업데이트를 진행하는 경우만 나오는 것 같음 -> y 진행

Your system does not have a connection to the Snap Store. For the
best upgrade experience make sure that your system can connect to
api.snapcraft.io.
Do you still want to continue with the upgrade?

업그레이드를 진행 여부 확인 -> y 진행

d 를 선택하면 상세 내역 확인 가능

Do you want to start the upgrade?


3 installed packages are no longer supported by Canonical. You can
still get support from the community.

3 packages are going to be removed. 125 new packages are going to be
installed. 450 packages are going to be upgraded.

You have to download a total of 496 M. This download will take about
1 minute 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 선택함

Configuration file '/etc/pam.d/systemd-user'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** systemd-user (Y/I/N/O/D/Z) [default=N] ?

업그레이드 완료 후 기존 패키지 삭제 여부 확인 -> y 진행

Processing triggers for sgml-base (1.29) ...
Processing triggers for resolvconf (1.79ubuntu10.18.04.3) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done

Searching for obsolete software
Reading state information... Done

Remove obsolete packages?


48 packages are going to be removed.

 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 18.04.6 LTS
Release:        18.04
Codename:       bionic

 

 

업그레이드 중 가끔 발생한 내용

가상머신으로 구성 된 일부 서버의 경우 아래와 같이 Grub를 구성하라는 메시지가 나타남

부트로더가 설치 된 장치를 선택 후 넘어가면 됨

이 후 Grub 구성 파일에 대한 업그레이드 여부 확인 메시지가 나타남 

안전하게 진행하려면 기존 파일 유지, 신규 버전으로 가는거라 관리 버전으로 설치함.

저작자표시 (새창열림)
'Linux' 카테고리의 다른 글
  • Ubuntu 18.04LTS 에서 20.04LTS로 업그레이드 하기
  • Ubuntu 20.04 LTS 버전 DNS 변경
  • 리눅스 프로세스 확인(PS)
  • RHEL7.x - rc.local 활성화
기억보다는 기록을...
기억보다는 기록을...
내가 보려고 정리하는 글..
  • 기억보다는 기록을...
    메모장
    기억보다는 기록을...
    • 분류 전체보기
      • 클라우드(Azure, AWS, Alibaba)
      • 모니터링(Zabbix,Grafana)
      • 가상화(VMWare, Hyper-V)
      • Docker
      • Ansible
      • Linux
      • Windows
      • 이것저것
      • SQL
      • -------------------------
      • 재테크
  • 전체
    오늘
    어제
  • hELLO· Designed By정상우.v4.10.2
기억보다는 기록을...
Ubuntu 16.04LTS 에서 18.04LTS로 업그레이드 하기
상단으로

티스토리툴바