[Memo2011][ITPASS] tako アップグレード

[ITPASSサーバ構築ドキュメント へ戻る]

01/18 に tako アップグレードを行った.

作業者: 河合, 佐伯, 高橋(由), 赤松, 藤田

ロガー: 赤松, 高橋(由)

この作業は <URL:http://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.ja.html> に基づいて行った.

前準備

アップグレードする際に衝突する可能性のあるパッケージの消去・保留解除

  • splashy パッケージを消去
apt-get purge splashy

splashy はもともとインストールされていなかった.

  • サードパーティ製のパッケージを削除

dpkg で確認し, ひとまず sun-java 関連を remove した.

apt-get remove sun-java*
  • その他のパッケージの状態を確認・保留解除

次に aptitude のビジュアルモードでパッケージの状態を確認した.

aptitude
g を入力 

zip パッケージが保留状態だったので削除した.

apt-get remove zip

aptitude で zip が消えているのを確認.

また, exim 関連のパッケージが保留になっているので

dpkg-query --list | grep exim*

で状態確認した. pin されているので hold を解除する. 保留などを設定するとされているファイル /etc/apt/references がなかったので, wajig コマンドをつかって unhold した.

wajig unhold exim4

他に unhold したパッケージは exim4-base, exim4-config, exim4-daemon-light.

その後 aptitude で確認すると, インストール・削除・更新するパッケージは なくなった. あらゆる hold 状態を解除しておいたほうがよいということなので, 他の パッケージの状態を確認するコマンドを実行した.

dpkg --audit 
dpkg -l | pager
dpkg --get-selections "*" > ~/curr-pkgs.txt

いずれも何も出なかった.

アップグレード後の容量確認

sources.list の編集

  • /etc/apt/sources.list を編集
    • 衝突の可能性のある dennou に関する行をコメントアウト
    • lenny を squeeze に変えた
  • ここで記録を残すために以下のコマンドを使用
script -t 2>~/upgrade-squeezestep.time -a ~/upgrade-squeezestep.script

パッケージリストを更新

apt-get update

容量確認

アップグレードによってどれだけ容量が消費されるか, 容量が足りるかを確認.

apt-get --trivial-only dist-upgrade

最後に以下のように表示された.

1295 upgraded, 464 newly installes. 44 to remove and 1 not upgraded.
Need to get 2268MB of archives.
After this operation, 1952MB of additional disk space will be used.

空きスペースが十分あることを確認した.

最小アップグレード

システムの最小アップグレードを行った.

apt-get upgrade

途中以下のメッセージが出てきた.

service to restart for PAM library upgrade

デフォルトの cups cron atd と設定した.

また以下のようなメッセージがいくつか出たが, すべて default の N を選択した.

Setting up netbase (4.45) ...
 Configuration file `/etc/services'
 ==> 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     : background this process to examine the situation
  The default action is to keep your current version.
  *** services (Y/I/N/O/D/Z) [default=N] ? 

以下の設定ファイルについても同様のメッセージが出た.

Setting up fail2ban (0.8.4-3) ...
 Configuration file `/etc/fail2ban/filter.d/apache-auth.conf'
 Configuration file `/etc/csh.cshrc'
 Configuration file `/etc/fail2ban/filter.d/sshd.conf'
 Configuration file `/etc/fail2ban/jail.conf'

すべて default の N を選択した. なお fail2ban 関連については D を選択して差分をとっているので, アップグレードのあとで差分を編集した.

カーネルイメージをアップグレード

カーネルをアップグレードする. flavor は amd64 を選択.

apt-get install linux-image-2.6-amd64

途中青い画面が出て, PATA コントローラーに対する新しいドライバがある, 更新しますか?と言われたので, Yes を選択.

次に以下のメッセージが出た.

These devices will be assigned UUIDs or labels:
 /dev/sdb5: UUID=73b79584-a8c8-4e0a-9cce-b63bb255bae7 
 /dev/sda5: UUID=439010dc-8aef-4d94-a764-a4030b5e8456

 These configuration files will be updated:  

 /etc/fstab, /boot/grub/menu.lst, /etc/udev/rules.d/70-persistent-cd.rules, /etc/initramfs-tools/conf.d/resume

 The device IDs will be changed as follows:
 /dev/sda6: UUID=a9319389-b2a8-4a48-8431-703c86f11705
 /dev/sda1: UUID=f5487f4b-e283-4280-a64e-3aeeb7287c15
 /dev/sdb1: UUID=97349d12-43ba-4a92-87a6-a774b069702c
 /dev/sdb6: UUID=d935c640-1471-4a60-a6c1-8198fef034de
 /dev/sdb5: UUID=73b79584-a8c8-4e0a-9cce-b63bb255bae7
 /dev/sda5: UUID=439010dc-8aef-4d94-a764-a4030b5e8456
 + PATH=pci-0000:02:00.1-scsi-0:0:0:0
 Apply configuration changes to disk device IDs?

--> yes とした.

Required firmware files may be missing

 This system is currently running Linux 2.6.26-2-amd64 and you are installing Linux 2.6.32-5-amd64.  In the new version some of the
 drivers used on this system may require additional firmware files:

 r8169: rtl_nic/rtl8105e-1.fw, rtl_nic/rtl8168e-2.fw, 
 rtl_nic/rtl8168e-1.fw, rtl_nic/rtl8168d-2.fw, rtl_nic/rtl8168d-1.fw
 Most firmware files are not included in the system because they do not conform to the Debian Free Software Guidelines. You may need
 to reconfigure the package manager to include the contrib and non-free sections of the package archive before you can install these firmware files.

--> ok とした.

  • 再起動
    • w でログインユーザを確認
    • sync を 3 回
    • reboot

udev パッケージのインストール

ここで再起動の前に udev パッケージをインストールし忘れたことに気付いた. 再起動後

apt-get install udev

とすると以下のようなエラーがでた.

インストールすることができないパッケージがありました。おそらく、あり得
ない状況を要求したか、(不安定版ディストリビューションを使用しているの
であれば) 必要なパッケージがまだ作成されていなかったり Incoming から移
動されていないことが考えられます。
以下の情報がこの問題を解決するために役立つかもしれません:

以下のパッケージには満たせない依存関係があります:
 libc6-i386: 破壊: ia32-libs (< 20090804) しかし、2.7+lenny2 はインストールされようとしています
             破壊: lib32asound2 (< 1.0.20-3) しかし、1.0.16-2 はインストールされようとしています
E: 壊れたパッケージ

しかし, udev をインストールしなかったことと関係がなさそうだったので, 置いておくことにした.

システムのアップグレード

apt-get dist-upgrade

以下のコマンドでシステムのアップグレードを行った.

apt-get dist-upgrade

grub2 に関するメッセージが出た. <URL:http://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.ja.html#update-grub> を参照して, チェーンロード設定をした.

アップグレード中には以下のメッセージが出た. すべてデフォルトで設定した.

Setting up bash (4.1-3) ...
Configuration file `/etc/bash.bashrc'
==> 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.
*** bash.bashrc (Y/I/N/O/D/Z) [default=N] ? 

以下についても同様のメッセージが出た.

Configuration file `/etc/skel/.bashrc'
Setting up man-db (2.5.7-8) ...
 Configuration file `/etc/manpath.config'
Setting up exim4-base (4.72-6+squeeze2) ...
 Configuration file `/etc/cron.daily/exim4-base'
 Configuration file `/etc/init.d/exim4'
 Configuration file `/etc/init.d/apache2`

無事に終わった(`・ω・´)キリッ

udev の確認

アップグレード前にエラーが出た,

apt-get install udev

を実行すると, すでに最新バージョンとでて, エラーは出なくなった.

再起動

最後に再起動した. 最初の画面で, chainload to GRUB2 と出たのを確認した.

その後の作業

dennou のコメントアウト解除

  • /etc/apt/sources.list の dennou の行につけたコメントアウトを外した
  • apt-get update, upgrade を行った

exim4 に関する対応

翌日の daily report が届かなかったので, 以下の作業を行った. exim にシンボリックリンクが貼られていた, sendmail を qmail に置き換えた.

# chmod 000 /usr/lib/sendmail
# chmod 000 /usr/sbin/sendmail

# mv /usr/lib/sendmail /usr/lib/sendmail.bak
# mv /usr/sbin/sendmail /usr/sbin/sendmail.bak

# ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

次のコマンドでexim4関係のパッケージをholdして, 更新されないようにした.

# echo exim4 hold | dpkg --set-selections
# echo exim4-base hold | dpkg --set-selections
# echo exim4-config hold | dpkg --set-selections
# echo exim4-daemon-light hold | dpkg --set-selections

[ITPASSサーバ構築ドキュメント へ戻る]

Last modified:2012/01/20 14:20:31
Keyword(s):
References:[[ITPASS2011]2011年度サーバ構築ログ]