Ubuntu 10.04 및 11.04 -> 12.04 버젂업그레이드가이드 개요 - 이문서는업그레이드권고문서가아닌가이드문서임을알려드립니다. Olleh Ucloud biz 에서맊들어진 Ubuntu 10.04(lucid), Ubuntu 11.04(natty) VM 을 Ubuntu 12.04(precise) 로버전업그레이드위한 User 가이드입니다. 여기서말하는버전 (release) 업그레이드란 Ubuntu 10.XX 에서 Ubuntu 11.XX 로의업그 레이드, Ubuntu 11.XX 에서 Ubuntu 12.XX 로의업그레이드를말합니다. Ubuntu 에서버전업그레이드방법 https://help.ubuntu.com/community/upgradenotes 위링크에서확인가능하며, 상세설명에대해서는위링크를참조바랍니다. 또한이문서에서설명하는 통상버전업그레이드는 do-release-upgrade command를통해가능하며, do-releaseupgrade 을실행하면 kernel 또한업그레이드되며, do-release-upgrade 명령을통해버전업그레이드가아닌 apt-get install 을통해 Kernel 맊을 upgrade 실행시에도아래적용방법섹션의 grub 패키지설치및 /etc/fstab 을수정 부문을반드시참조하시기바랍니다. 버젂업그레이드는많은패키지들이자동업그레이드되므로, 버젂업그레이드는 Olleh Ucloud biz에서권고하는필수사항이아니며, 버젂업그레이드의실행유무는사용하시는고객님의선택이며, 버젂업그레이드로인한고객님의 Application 에대한이상유무에대한지원이불가함을미리알려드립니다.
적용방법 ubuntu 버젂체크 - 현재의 release 버전과 kernel 버전을확인합니다. - lsb_relase a command 를통해현재 release 버전을아래와같이확인가능하며, 확인된 release 버전에따라업그레이드과정이상이합니다. < release 버전확인 > @ ~# lsb_release a No LSB modules are available. Distributor ID: Description: Ubuntu Ubuntu 10.04.4 LTS Release: 10.04 Codename: lucid < kernel 버전확인 > @ ~# uname -a Linux ubuntupgrade46 2.6.38-13-virtual #57~lucid1-Ubuntu SMP Tue Mar 6 20:40:43 UTC 2012 x86_64 GNU/Linux 이제위에서확인된 release 에따라아래의두가지섹션중선택하시어진행하시면됩니다. 적용방법 1. release 10.04 를 release 12.04 로버젂업그레이드 적용방법 2. release 11.04 를 release 12.04 로버젂업그레이드 2/16
1. release 10.04 를 release 12.04 로버젂업그레이드 - 실행하기전에업그레이드이후빈번히발생되는문제를예방하기위해 grub 패키지설치및 /etc/fstab 을수정합니다. - 원할한패키지업그레이드를위해 apt repository source list 를아래와같이수정이필요합니다. [ /etc/apt/sources.list 파일을아래내용으로변경후 apt-get update 실행 ] deb http://ftp.daum.net/ubuntu lucid main multiverse restricted universe deb-src http://ftp.daum.net/ubuntu lucid main multiverse restricted universe deb http://ftp.daum.net/ubuntu lucid-backports main multiverse restricted universe deb-src http://ftp.daum.net/ubuntu lucid-backports main multiverse restricted universe deb http://ftp.daum.net/ubuntu lucid-proposed main multiverse restricted universe deb-src http://ftp.daum.net/ubuntu lucid-proposed main multiverse restricted universe deb http://ftp.daum.net/ubuntu lucid-security main multiverse restricted universe deb-src http://ftp.daum.net/ubuntu lucid-security main multiverse restricted universe deb http://ftp.daum.net/ubuntu lucid-updates main multiverse restricted universe deb-src http://ftp.daum.net/ubuntu lucid-updates main multiverse restricted universe @:~# apt-get update.. 출력내용생략 - grub 패키지확인 # dpkg --list egrep grub ## 이버젼이설치되어있다면생략가능 ii grub 0.97-29ubuntu60.10.04.2 GRand Unified Bootloader (Legacy version) - grub 패키지설치및 grub 업데이트실행 # apt-get y install grub Reading package lists... Done Building dependency tree Reading state information... Done 출력내용생략 Processing triggers for man-db... 3/16
Setting up grub (0.97-29ubuntu60.10.04.2)... [grub update 실행 ] # update-grub -y Searching for GRUB installation directory... found: /boot/grub Searching for default file... Generating /boot/grub/default file and setting the default boot entry to 0 Searching for GRUB installation directory... found: /boot/grub Testing for an existing GRUB menu.lst file... Could not find /boot/grub/menu.lst file. Generating /boot/grub/menu.lst Searching for splash image... none found, skipping... Found GRUB 2: /boot/grub/core.img Found kernel: /boot/memtest86+.bin Found kernel: /boot/vmlinuz-2.6.38-13-virtual Found GRUB 2: /boot/grub/core.img Found kernel: /boot/memtest86+.bin Updating /boot/grub/menu.lst... done - /etc/fatab 수정 : 변경필요부문은빨간색표시 ( 변경전 ) UUID= 00cf8b97-f9d2-4733-95e7-ef6352cdf125 / ext3 errors=remount-ro 0 1 ( 변경후 ) UUID= 00cf8b97-f9d2-4733-95e7-ef6352cdf125 / ext3 errors=remount-ro,nobarrier 0 1 - NonInteractive 모드로버전업그레이드 do-release-upgrade 명령어실행 NonInteractive : 업그레이드과정중 yes or no 사용자입력생략모드 Interactive : 업그레이드과정중 yes or no 과정절차를사용자가입력해야함 NonInteractive 업그레이드가아닌 Interactive 모드로업그레이드실행시업그레이드마지막과정의 reboot 물음에 n 선택해서자동 reboot 되지않도록주의해야합니다. # do-release-upgrade -f DistUpgradeViewNonInteractive Checking for a new ubuntu release Done Upgrade tool signature Done Upgrade tool Done downloading 4/16
authenticate 'precise.tar.gz' against 'precise.tar.gz.gpg' extracting 'precise.tar.gz' WARNING: Failed to read mirror file Selecting previously deselected package libapt-pkg4.12. (Reading database... 55723 files and directories currently installed.). 화면출력내용생략 update-initramfs: Generating /boot/.img-3.2.0-48-generic Processing triggers for resolvconf... (Reading database... 87872 files and directories currently installed.) Removing libbind9-60... Removing libisccfg60... Removing libdns64... Removing libisccc60... Removing libisc60... Removing liblwres60... Removing libmpfr1ldbl... Removing libpython2.6... Removing libxapian15... Removing linux-headers-2.6.32-40... Removing linux-headers-2.6.38-13-virtual... Removing linux-headers-2.6.38-13... Removing mkpasswd... Removing python2.6... Removing python2.6-minimal... release-upgrader-python-apt: >= 2.6 (['install', 'ok', 'installed']) Removing release-upgrader-python-apt... Processing triggers for libc-bin... ldconfig deferred processing now taking place Processing triggers for man-db... - do-release-upgrade 정상실행여부확인및 grub 확인정상적으로업그레이드가완료되었다면아래와같이 release 및커널이 2.6.x 에서 3.2.x 로반영됩니다. 커널버전은 Ubuntu 의 source repository 반영에따라다소차이가있을수있습니다. 5/16
VM을리부팅하기전에확인이필요합니다. # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.2 LTS Release: 12.04 Codename: precise # egrep -v "^#" /boot/grub/menu.lst default 0 timeout 3 hiddenmenu Ubuntu 12.04.2 LTS, kernel 3.2.0-48-generic kernel /boot/vmlinuz-3.2.0-48-generic =UUID=9407749f-f350-4305-a95b- 89c97a7a6dd0 ro quiet splash /boot/.img-3.2.0-48-generic Ubuntu 12.04.2 LTS, kernel 3.2.0-48-generic (recovery mode) kernel /boot/vmlinuz-3.2.0-48-generic =UUID=9407749f-f350-4305-a95b- 89c97a7a6dd0 ro single /boot/.img-3.2.0-48-generic Ubuntu 12.04.2 LTS, kernel 2.6.38-13-virtual kernel /boot/vmlinuz-2.6.38-13-virtual =UUID=9407749f-f350-4305-a95b- 89c97a7a6dd0 ro quiet splash /boot/.img-2.6.38-13-virtual Ubuntu 12.04.2 LTS, kernel 2.6.38-13-virtual (recovery mode) kernel /boot/vmlinuz-2.6.38-13-virtual =UUID=9407749f-f350-4305-a95b- 89c97a7a6dd0 ro single /boot/.img-2.6.38-13-virtual Chainload into GRUB 2 kernel /boot/grub/core.img Ubuntu 12.04.2 LTS, memtest86+ kernel /boot/memtest86+.bin 6/16
- 이제업그레이드버전및커널을실행한 VM에반영하기위해 VM을 reboot 합니다. 아래는 reboot 완료후 VM 정보입니다. release 버전및커널이업그레이드완료됨을알수있습니다. # lsb_release a No LSB modules are available. Distributor ID: Description: Ubuntu Ubuntu 12.04.2 LTS Release: 12.04 Codename: precise # uname -a Linux ubuntu1004 3.2.0-48-generic #74-Ubuntu SMP Thu Jun 6 19:43:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux 7/16
2. release 11.04 를 release 12.04 로버젂업그레이드 - 버전업그레이드전에업그레이드이후빈번히발생되는문제를예방하기위해 grub 패키지설치및 /etc/fstab 을수정합니다. - 원할한패키지업그레이드를위해 apt repository source list 를아래와같이수정이필요합니다. [/etc/apt/sources.list 파일을아래내용으로변경후 apt-get update 실행 ] deb http://ftp.daum.net/ubuntu lucid main multiverse restricted universe deb-src http://ftp.daum.net/ubuntu lucid main multiverse restricted universe deb http://ftp.daum.net/ubuntu lucid-backports main multiverse restricted universe deb-src http://ftp.daum.net/ubuntu lucid-backports main multiverse restricted universe deb http://ftp.daum.net/ubuntu lucid-proposed main multiverse restricted universe deb-src http://ftp.daum.net/ubuntu lucid-proposed main multiverse restricted universe deb http://ftp.daum.net/ubuntu lucid-security main multiverse restricted universe deb-src http://ftp.daum.net/ubuntu lucid-security main multiverse restricted universe deb http://ftp.daum.net/ubuntu lucid-updates main multiverse restricted universe deb-src http://ftp.daum.net/ubuntu lucid-updates main multiverse restricted universe @:~# apt-get update.. 출력내용생략 - grub 패키지버전확인 # dpkg --list egrep grub ## 이버젼이설치되어있다면생략가능 ii grub 0.97-29ubuntu60.10.04.2 GRand Unified Bootloader (Legacy version) - grub 패키지설치및 grub 업데이트실행 # apt-get y install grub Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: grub-legacy-doc mdadm The following packages will be REMOVED: grub-gfxpayload-lists grub-pc 8/16
The following NEW packages will be installed: grub 0 upgraded, 1 newly installed, 2 to remove and 4 not upgraded. Need to get 929 kb of archives. After this operation, 864 kb disk space will be freed. Get:1 http://ftp.daum.net/ubuntu/ lucid-updates/main grub amd64 0.97-29ubuntu60.10.04.2 [929 kb] Fetched 929 kb in 0s (5,744 kb/s) Preconfiguring packages... (Reading database... 41267 files and directories currently installed.) Removing grub-gfxpayload-lists... Removing grub-pc... Processing triggers for man-db... Selecting previously deselected package grub. (Reading database... 41018 files and directories currently installed.) Unpacking grub (from.../grub_0.97-29ubuntu60.10.04.2_amd64.deb)... Processing triggers for man-db... Setting up grub (0.97-29ubuntu60.10.04.2)... [grub update 실행 ] # update-grub -y Searching for GRUB installation directory... found: /boot/grub Searching for default file... Generating /boot/grub/default file and setting the default boot entry to 0 Searching for GRUB installation directory... found: /boot/grub Testing for an existing GRUB menu.lst file... Could not find /boot/grub/menu.lst file. Generating /boot/grub/menu.lst Searching for splash image... none found, skipping... Found GRUB 2: /boot/grub/core.img Found kernel: /boot/memtest86+.bin Found kernel: /boot/vmlinuz-2.6.38-13-virtual Found GRUB 2: /boot/grub/core.img Found kernel: /boot/memtest86+.bin Updating /boot/grub/menu.lst... done 9/16
- /etc/fatab 수정 : * 변경필요부문은빨간색표시 ( 변경전 ) UUID=9407749f-f350-4305-a95b-89c97a7a6dd0 / ext3 errors=remount-ro 0 1 ( 변경후 ) UUID=9407749f-f350-4305-a95b-89c97a7a6dd0 / ext3 errors=remount-ro,nobarrier 0 1 - NonInteractive 모드로버전업그레이드 (do-release-upgrade) 실행 NonInteractive : 업그레이드과정중 yes or no 사용자입력생략모드 Interactive : 업그레이드과정중 yes or no 과정절차를사용자가입력해야함 NonInteractive 업그레이드가아닌 Interactive 모드로업그레이드실행시업그레이드마지막과정의 reboot 물음에 n 선택해서자동 reboot 되지않도록주의해야합니다. # do-release-upgrade -f DistUpgradeViewNonInteractive Checking for a new ubuntu release Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife Get:1 Upgrade tool signature [198 B] Get:2 Upgrade tool [1471 kb] Fetched 1471 kb in 0s (0 B/s) authenticate 'oneiric.tar.gz' against 'oneiric.tar.gz.gpg' extracting 'oneiric.tar.gz' 화면출력내용생략 Processing triggers for initramfs-tools... update-initramfs: Generating /boot/.img-3.0.0-12-virtual (Reading database... 64475 files and directories currently installed.) Removing discover... Removing libdiscover2... Removing discover-data... Removing libboost-iostreams1.42.0... Removing libffi5... Removing libssl0.9.8... Processing triggers for man-db... Processing triggers for libc-bin... 10/16
ldconfig deferred processing now taking place - do-release-upgrade 정상실행여부확인및 grub 확인 정상적으로업그레이드가완료되었다면아래와같이 release 및커널이 2.6.x 에서 3.0.x 로반영됩니다. 커널버전은 Ubuntu 의 source repository 반영에따라다소차이가있을수있습니다. # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 11.10 Release: 11.10 Codename: oneiric @ubuntu1004:~# egrep -v "^#" /boot/grub/menu.lst default 0 timeout 3 hiddenmenu Ubuntu 11.10, kernel 3.0.0-12-virtual kernel /boot/vmlinuz-3.0.0-12-virtual =UUID=00cf8b97-f9d2-4733-95e7- ef6352cdf125 ro quiet splash /boot/.img-3.0.0-12-virtual Ubuntu 11.10, kernel 3.0.0-12-virtual (recovery mode) kernel /boot/vmlinuz-3.0.0-12-virtual =UUID=00cf8b97-f9d2-4733-95e7- ef6352cdf125 ro single /boot/.img-3.0.0-12-virtual Ubuntu 11.10, kernel 2.6.38-13-virtual kernel /boot/vmlinuz-2.6.38-13-virtual =UUID=00cf8b97-f9d2-4733-95e7- ef6352cdf125 ro quiet splash /boot/.img-2.6.38-13-virtual 11/16
Ubuntu 11.10, kernel 2.6.38-13-virtual (recovery mode) kernel /boot/vmlinuz-2.6.38-13-virtual =UUID=00cf8b97-f9d2-4733-95e7- ef6352cdf125 ro single /boot/.img-2.6.38-13-virtual Chainload into GRUB 2 kernel /boot/grub/core.img kernel Ubuntu 11.10, memtest86+ /boot/memtest86+.bin - 이제업그레이드버전및커널을실행한 VM 에반영하기위해 VM 을 reboot 합니다. 아래는 reboot 완료후 VM 정보입니다. release 버전및커널이업그레이드완료됨을 알수있습니다. # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 11.10 Release: 11.10 Codename: oneiric # uname -a Linux ubuntu11-64bit 3.0.0-12-virtual #20-Ubuntu SMP Fri Oct 7 18:19:02 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux 여기서주의할점은 release 11.04 의경우는 12.04 로버젂업그레이드위해최초 11.10 버젂으로먼저업그레이드이후 11.10 에서다시한번 do-release-upgrade 를 통해 12.04 로업그레이드가능합니다. 11.04 11.10 12.04 - 원하시는최종버전이 12.04 라면 do-release-upgrade 를재실행합니다. # do-release-upgrade -f DistUpgradeViewNonInteractive Checking for a new ubuntu release 12/16
Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife Get:1 Upgrade tool signature [198 B] Get:2 Upgrade tool [1551 kb] Fetched 1551 kb in 0s (0 B/s) extracting 'precise.tar.gz' authenticate 'precise.tar.gz' against 'precise.tar.gz.gpg' No candidate ver: discover No candidate ver: libboost-iostreams1.42.0 No candidate ver: libdiscover2 No candidate ver: libffi5 No candidate ver: libssl0.9.8 WARNING: Failed to read mirror file No candidate ver: discover No candidate ver: libboost-iostreams1.42.0 No candidate ver: libdiscover2 No candidate ver: libffi5 No candidate ver: libssl0.9.8 apport: unrecognized service Extracting templates from packages: 100% Preconfiguring packages... 화면출력생략 update-initramfs: Generating /boot/.img-3.2.0-23-virtual Processing triggers for resolvconf... (Reading database... 89817 files and directories currently installed.) Removing libapt-inst1.3... Removing libept1... Removing libapt-pkg4.11... Removing libbind9-60... Removing libisccfg62... Removing libdns69... Removing libisccc60... Removing libisc62... Removing liblwres60... 13/16
Removing liblzma2... Removing libpod-plainer-perl... Removing linux-headers-2.6.38-13-virtual... Removing linux-headers-2.6.38-13... Removing linux-headers-3.0.0-12-virtual... Removing linux-headers-3.0.0-12... Removing python-central... Removing python-gobject-cairo... Removing python-support... Processing triggers for libc-bin... ldconfig deferred processing now taking place Processing triggers for man-db... - 재실행후 do-release-upgrade 정상실행여부확인및 grub 확인 # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04 LTS Release: 12.04 Codename: precise # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04 LTS Release: 12.04 Codename: precise # egrep -v "^#" /boot/grub/menu.lst default 0 timeout 3 hiddenmenu Ubuntu 11.10, kernel 3.0.0-12-virtual kernel /boot/vmlinuz-3.0.0-12-virtual =UUID=00cf8b97-f9d2-4733-95e7- ef6352cdf125 ro quiet splash /boot/.img-3.0.0-12-virtual 14/16
이하생략 위에서와같이 12.04 를위한 release 는반영되었으나, grub 리스트에최신커널 3.2.x 가반영되지않았음을알수있습니다. 최종반영을위한 reboot 전에 update-grub 을재실행후반영여부를확인합니다. # rm -f /boot/grub/menu.lst && update-grub -y Searching for GRUB installation directory... found: /boot/grub Searching for default file... found: /boot/grub/default Testing for an existing GRUB menu.lst file... Could not find /boot/grub/menu.lst file. Generating /boot/grub/menu.lst Searching for splash image... none found, skipping... Found kernel: /boot/vmlinuz-3.2.0-23-virtual Found kernel: /boot/vmlinuz-3.0.0-12-virtual Found kernel: /boot/vmlinuz-2.6.38-13-virtual Found GRUB 2: /boot/grub/core.img Found kernel: /boot/memtest86+.bin Updating /boot/grub/menu.lst... done # egrep -v "^#" /boot/grub/menu.lst default 0 timeout 3 hiddenmenu Ubuntu 12.04 LTS, kernel 3.2.0-23-virtual kernel /boot/vmlinuz-3.2.0-23-virtual =UUID=00cf8b97-f9d2-4733-95e7- ef6352cdf125 ro quiet splash /boot/.img-3.2.0-23-virtual Ubuntu 12.04 LTS, kernel 3.2.0-23-virtual (recovery mode) kernel /boot/vmlinuz-3.2.0-23-virtual =UUID=00cf8b97-f9d2-4733-95e7- ef6352cdf125 ro single /boot/.img-3.2.0-23-virtual 15/16
Ubuntu 12.04 LTS, kernel 3.0.0-12-virtual kernel /boot/vmlinuz-3.0.0-12-virtual =UUID=00cf8b97-f9d2-4733-95e7- ef6352cdf125 ro quiet splash /boot/.img-3.0.0-12-virtual.. 이하생략 표시부문이추가됨을알수있습니다. 이제마지막으로최종반영을위해 VM 을 reboot 후 release 확인및커널버전을확인 합니다. #lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04 LTS Release: 12.04 Codename: precise # uname -a Linux (none) 3.2.0-23-virtual #36-Ubuntu SMP Tue Apr 10 22:29:03 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux 16/16