Ubuntu 18.04(LTS)→20.04(LTS) 업그레이드 방법

소개



2020년 4월 23일 우분투 20.04가 출시되었습니다.

우분투는 일반적으로 짝수 연도의 4월 릴리스는 장기 지원 버전(LTS: Long Term Support)입니다.

지원 기간은 5년간! (~2025년 4월까지)

지난번 LTS인 Ubuntu 18.04부터 업그레이드하는 분들도 계신다고 생각하므로 업그레이드 절차의 메모를 여기에 남깁니다.


Released (Current & Stable)
버전
릴리즈 스케줄
Support Date


Xenial Xerus
16.04 LTS
2016/04/21
2021년 4월까지

Bionic Beaver
18.04 LTS
2018/04/26
2023년 4월까지

Focal Fossa
20.04 LTS
2020/04/23
2025년 4월까지


전제 조건



다음의 조건을 만족하는 VPS/온프레 서버를 보유하고 있는 것을 전제 조건으로 합니다.
  • Ubuntu Server 18.04 LTS가 실행 중입니다.
  • 인터넷에 접속하는 경로를 가지는 일.
  • 리모트 환경으로부터 SSH 접속이 가능한 것.

  • 절차


  • sudo apt update 를 실행합니다.
  • ubuntu@ubuntu:~$ sudo apt update
    [sudo] password for ubuntu: 
    Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
    Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease                    
    Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]      
    Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
    Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [915 kB]
    Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,065 kB]
    Fetched 2,233 kB in 3s (639 kB/s)
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    25 packages can be upgraded. Run 'apt list --upgradable' to see them.
    ubuntu@ubuntu:~$ 
    

    2. sudo apt install update-manager를 실행합니다.
    ubuntu@ubuntu:~$ sudo apt install update-manager
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    (以降、省略)
    

    3. sudo apt dist-upgrade를 실행합니다.
    ubuntu@ubuntu:~$ sudo apt dist-upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Done
    The following packages were automatically installed and are no longer required:
      linux-headers-4.15.0-60 linux-headers-4.15.0-60-generic
      linux-image-4.15.0-60-generic linux-modules-4.15.0-60-generic
      linux-modules-extra-4.15.0-60-generic
    Use 'sudo apt autoremove' to remove them.
    The following packages will be upgraded:
      bsdutils distro-info-data fdisk grub-common grub-pc grub-pc-bin grub2-common
      kmod landscape-common libblkid1 libfdisk1 libkmod2 libmount1 libsmartcols1
      libuuid1 linux-firmware lxcfs mount open-vm-tools python3-update-manager
      sosreport unattended-upgrades update-manager-core util-linux uuid-runtime
    25 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Need to get 81.2 MB of archives.
    After this operation, 739 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    (以降、省略)
    

    이 명령을 실행하지 않고 다음 단계로 진행하면 다음 오류가 표시되고 작업이 중단됩니다.
    ubuntu@ubuntu:~$ sudo do-release-upgrade -d
    Checking for a new Ubuntu release
    Please install all available updates for your release before upgrading.
    ubuntu@ubuntu:~$ 
    

    4. sudo do-release-upgrade -d를 실행합니다. -d 옵션은 필수입니다.

    ※ LTS에서 LTS로 업그레이드하는 경우는 /etc/update-manager/release-upgrades를 편집할 필요가 없습니다.
    ubuntu@ubuntu:~$ sudo do-release-upgrade -d
    Checking for a new Ubuntu release
    Get:1 Upgrade tool signature [1,554 B]                                         
    Get:2 Upgrade tool [1,344 kB]                                                  
    Fetched 1,346 kB in 0s (0 B/s)                                                 
    authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg' 
    extracting 'focal.tar.gz'
    

    5. 이 화면에서 y를 입력합니다. 기본값은 N이므로 반드시 입력하십시오.
    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
    
    

    6. 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]
    

    7.upgrade 시작 확인이 표시되면 y를 입력합니다. 기본값은 N이므로 반드시 입력하십시오.
    Do you want to start the upgrade? 
    
    
    20 installed packages are no longer supported by Canonical. You can 
    still get support from the community. 
    
    7 packages are going to be removed. 141 new packages are going to be 
    installed. 496 packages are going to be upgraded. 
    
    You have to download a total of 354 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
    

    8. 잠시 후 아래 화면이 표시됩니다. Enter를 누르십시오.


    9. 잠시 후 아래 화면이 표시됩니다. Enter를 누르십시오.


    10. 잠시 후 아래 화면이 표시됩니다. Enter를 누르십시오.


    11.Enter를 누르십시오.
    Configuration file '/etc/cloud/cloud.cfg'
     ==> 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.
    *** cloud.cfg (Y/I/N/O/D/Z) [default=N] ? 
    

    12. 이전 패키지 목록이 표시되므로 y를 입력하여 삭제합니다. 기본값은 N이므로 반드시 입력하십시오.
    Found linux image: /boot/vmlinuz-4.15.0-88-generic
    Found initrd image: /boot/initrd.img-4.15.0-88-generic
    Found linux image: /boot/vmlinuz-4.15.0-60-generic
    Found initrd image: /boot/initrd.img-4.15.0-60-generic
    done
    Processing triggers for dbus (1.12.16-2ubuntu2) ...
    Reading package lists... Done    
    Building dependency tree          
    Reading state information... Done
    
    Searching for obsolete software
    Reading state information... Done
    
    Remove obsolete packages? 
    
    
    61 packages are going to be removed. 
    
     Continue [yN]  Details [d] y
    

    13. 업그레이드를 완료하려면 y를 입력하고 다시 시작합니다. 기본값은 N이므로 반드시 입력하십시오.
    Purging configuration files for linux-image-4.15.0-60-generic (4.15.0-60.67) ...
    Purging configuration files for python3.6-minimal (3.6.9-1~18.04ubuntu1) ...
    
    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] y
    

    14.ubuntu가 다시 시작됩니다.

    15. SSH에서 다시 연결합니다.

    16. more /etc/os-release를 실행하여 Ubuntu 버전을 확인합니다.
    ubuntu@ubuntu:~$ more /etc/os-release 
    NAME="Ubuntu"
    VERSION="20.04 LTS (Focal Fossa)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 20.04 LTS"
    VERSION_ID="20.04"
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-poli
    cy"
    VERSION_CODENAME=focal
    UBUNTU_CODENAME=focal
    ubuntu@ubuntu:~$ 
    

    17. 이상으로 업그레이드가 완료되었습니다, 고마워요.

    desktop 설치 & RDP 설정은 이쪽.



    참고 자료



    우분투 위키
    htps : // 우우키. 어쩌면. 코m/

    좋은 웹페이지 즐겨찾기