Ubuntu Server 14.04 LTS から 16.04 LTS にアップグレードした

最初はプレーンな Jenkins しか入っていないからクリーンインストールしたかったんだけど、
サーバマシンが古すぎるからなのか 16.04 のインストールイメージは NIC を認識しない。


$ sudo apt-get install update-manager-core


sudo vim /etc/update-manager/release-upgrades

Prompt=normal にする必要がある。

# Default behavior for the release upgrader.

# Default prompting behavior, valid options:
#  never  - Never check for a new release.
#  normal - Check to see if a new release is available.  If more than one new
#           release is found, the release upgrader will attempt to upgrade to
#           the release that immediately succeeds the currently-running
#           release.
#  lts    - Check to see if a new LTS release is available.  The upgrader
#           will attempt to upgrade to the first LTS release available after
#           the currently-running one.  Note that this option should not be
#           used if the currently-running release is not itself an LTS
#           release, since in that case the upgrader won't be able to
#           determine if a newer release is available.
wnoguchi@phy2:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [198 B]
Get:2 Upgrade tool [1230 kB]
Fetched 1230 kB in 0s (0 B/s)
authenticate 'wily.tar.gz' against 'wily.tar.gz.gpg'
extracting 'wily.tar.gz'
[screen is terminating]

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
Do you want to continue?

Continue [yN] N
=== Command terminated with exit status 1 (Thu May  5 13:20:06 2016) ===

まあ、 screen が立ち上がっているようなので、大丈夫みたいだが。

Ign http://us.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 5,083 kB in 6s (13.6 MB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done

Updating repository information

Third party sources disabled

Some third party entries in your sources.list were disabled. You can
re-enable them after the upgrade with the 'software-properties' tool
or your package manager.

To continue please press [ENTER]


Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done

Calculating the changes

Calculating the changes

Do you want to start the upgrade?

1 installed package is no longer supported by Canonical. You can
still get support from the community.

6 packages are going to be removed. 131 new packages are going to be
installed. 411 packages are going to be upgraded.

You have to download a total of 317 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]y


「libpam, libc, libssl とかのパッケージのインストール中はいくつかのサービスをリスタートする必要があるけど、なんにも聞かずにリスタートしてもいい?」と聞かれる。

 ┌────────────┤ Configuring libc6 ├──────────────┐
 │                                                                           │
 │ There are services installed on your system which need to be restarted    │
 │ when certain libraries, such as libpam, libc, and libssl, are upgraded.   │
 │ Since these restarts may cause interruptions of service for the system,   │
 │ you will normally be prompted on each upgrade for the list of services    │
 │ you wish to restart.  You can choose this option to avoid being           │
 │ prompted; instead, all necessary restarts will be done for you            │
 │ automatically so you can avoid being asked questions on each library      │
 │ upgrade.                                                                  │
 │                                                                           │
 │ Restart services during package upgrades without asking?                  │
 │                                                                           │
 │                    <Yes>                       <No>                       │
 │                                                                           │

Unpacking psmisc (22.21-2build1) over (22.20-1ubuntu2) ...
Preparing to unpack .../ubuntu-release-upgrader-core_1%3a15.10.14.4_all.deb ...
Unpacking ubuntu-release-upgrader-core (1: over (1:0.220.8) ...
Preparing to unpack .../python3-distupgrade_1%3a15.10.14.4_all.deb ...
Unpacking python3-distupgrade (1: over (1:0.220.8) ...
Preparing to unpack .../python3-update-manager_1%3a15.10.3_all.deb ...
Unpacking python3-update-manager (1:15.10.3) over (1:0.196.14) ...
Preparing to unpack .../update-manager-core_1%3a15.10.3_all.deb ...
Unpacking update-manager-core (1:15.10.3) over (1:0.196.14) ...
Preparing to unpack .../python3-gi_3.16.2-1build1_amd64.deb ...
Unpacking python3-gi (3.16.2-1build1) over (3.12.0-1ubuntu1) ...
Preparing to unpack .../rsync_3.1.1-3ubuntu0.15.10.1_amd64.deb ...
Unpacking rsync (3.1.1-3ubuntu0.15.10.1) over (3.1.0-2ubuntu0.2) ...
Preparing to unpack .../shared-mime-info_1.3-1_amd64.deb ...
Unpacking shared-mime-info (1.3-1) over (1.2-0ubuntu3) ...
Preparing to unpack .../tcpdump_4.7.4-1ubuntu1_amd64.deb ...


Setting up command-not-found (0.3ubuntu15.10.1) ...
Installing new version of config file /etc/zsh_command_not_found ...
Setting up plymouth-theme-ubuntu-text (0.9.0-0ubuntu9) ...
update-initramfs: deferring update (trigger activated)
Setting up python3-distupgrade (1: ...
Setting up python3-update-manager (1:15.10.3) ...
Setting up ubuntu-release-upgrader-core (1: ...

Configuration file '/etc/update-manager/release-upgrades'
 ==> 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.
*** release-upgrades (Y/I/N/O/D/Z) [default=N] ?N

LTS から変えたくないので N と答える。

Remove obsolete packages?

25 packages are going to be removed.

 Continue [yN]  Details [d]y
Fetched 0 B in 0s (0 B/s)


Processing triggers for man-db (2.7.4-1) ...
Processing triggers for libc-bin (2.21-0ubuntu4.1) ...

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

なんか途中で 15.10 とかプロンプト出たんだけど大丈夫かな、心配だなあ・・・・。
16.04 にしたかったんだけど・・・。

➜  ~ ssh phy2
Welcome to Ubuntu 15.10 (GNU/Linux 4.2.0-35-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Thu May  5 14:40:07 JST 2016

  System load:  1.76             Processes:           174
  Usage of /:   8.0% of 1.78TB   Users logged in:     0
  Memory usage: 5%               IP address for eth0:
  Swap usage:   0%               IP address for p7p1:

  Graph this data and manage this system at:

Last login: Thu May  5 13:22:30 2016
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.


Normal なの確認してもう一発あげる。

wnoguchi@phy2:~$ sudo vim /etc/update-manager/release-upgrades
wnoguchi@phy2:~$ sudo do-release-upgrade