Debian GNU/Linux 2.2 (potato) から 3.0 (woody) へのアップグレード記録

1. 準備

/etc/* のバックアップをとる. (念のため…) .

$ sudo rsync -avz  /etc /home/odakker/tmp/umineko/

全てのパッケージの状態をチェックし, アップグレード可能な状態になっているかどうか調べましょう.

$ dpkg --audit

/etc/rcS.d があるかを確認する. これがないと libc6 のインストールに失敗する.

$ ls /etc/rcS.d

/usr/share/doc ディレクトリ (が既に存在している場合) は, シンボリックリンクでないことを確認する. シンボリックリンクの場合, アップグレード作業中に /usr/doc ディレクトリが削除できない, というメッセージが大量に出ることになる.

$ ls -l /usr/share/doc

2. オリジナルパッケージのアンインストール

以下のパッケージをアンインストールする. アンインストールする順番によっては削除できない場合もあるので注意する.

$ sudo -s 
# dpkg --purge gtool4-ffc gtool4-doc
# dpkg --purge dcl-f90-ffc dcl-ffc dcl 
# dpkg --purge ispack-doc ispack-ffc
# dpkg --purge ffc
# dpkg --purge dcnote dennou-sty-6

さらにソースからコンパイルした gtool4, netcdf をアンインストール. 詳細は gtool4 インストール手引き, netcdf インストール手引き を参照し, バイナリとシンボリックリンクを削除する.

3. アップグレード

/etc/apt/sources.list を 以下のように書換える.

deb woody main contrib non-free
deb woody-jp main non-free contrib
deb woody/non-US main non-free contrib
deb woody/updates main non-free contrib


# script -a ~/upgrade-to-woody.typescript


# apt-get update
# apt-get install dpkg apt debconf
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  binutils cpp cpp-2.95 defoma dialog esound esound-common g++ g++-2.95 g77
  g77-2.95 gcc gcc-2.95 hermes1 ja-trans language-env libasound0.4 libasound1
  libasound2 libaudiofile0 libbz2-1.0 libc6 libc6-dev libdb2 libdb3 libdps1
  libesd0 libfreetype6 libgimpprint1 libgtk1.2-common libncurses5
  libncurses5-dev libnewt0 libperl5.6 libpng2 libpopt0 librpm4
  libstdc++2.10-dev libstdc++2.10-glibc2.2 locales perl perl-5.005
  perl-5.005-base perl-5.005-suid perl-base perl-modules perl-suid rpm slang1
  suidmanager sysvinit user-ja whiptail xfonts-100dpi xfonts-75dpi
  xfonts-a12k12 xfonts-base xfonts-intl-japanese xfonts-intl-japanese-big
  xfonts-marumoji xfonts-scalable xfree86-common xserver-common
  xserver-common-v3 xserver-mach64 xserver-vga16 xutils zlib1g 
The following packages will be REMOVED:
  gamix gcc-doc gimp1.1 gimp1.1-nonfree gkrellm gphoto gsfonts-x11 kterm
  libgimp1.1.17 libgtk-perl libgtk1.2 librpm1 locale-ja mozilla
  mozilla-browser mozilla-mailnews sane-gimp1.1 smpeg-gtv timidity wmakerconf
  wmppxp xbase-clients xf86setup xfonts-cjk xmms xsane-gimp1.1 xscreensaver 
The following NEW packages will be installed:
  cpp-2.95 defoma g++-2.95 g77-2.95 gcc-2.95 hermes1 language-env libasound1
  libasound2 libbz2-1.0 libdb3 libdps1 libfreetype6 libgimpprint1
  libgtk1.2-common libperl5.6 librpm4 libstdc++2.10-glibc2.2 perl perl-modules
  perl-suid xserver-common-v3 xutils 
48 packages upgraded, 23 newly installed, 27 to remove and 314 not upgraded.
Need to get 45.6MB of archives. After unpacking 25.2MB will be freed.
Do you want to continue? [Y/n] y
Checking for services that may need to be restarted...done.

Name Service Switch has changed in the C Library.
Running programs may not be able to do NSS lookups until they are
restarted (for services such as ssh, this can affect your ability to
Note: restarting sshd should not affect any existing connections.

The services detected are: inetd lprng cron ssh 

If other services begin to fail mysteriously after this upgrade,
it may be necessary to restart them too.

Do you wish to Restart Services? [Y/n] 
onfiguration file `/etc/init.d/'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   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.
*** (Y/I/N/O/D/Z) [default=N] ? y


#  apt-get -f install

realplayer の影響で xfree86-common がインストールできない. そこで realplayer を一端削除.

以下のコマンドでリハーサル. アップグレード時に何が起きるかが示されるので確認.

# apt-get --fix-broken --show-upgraded --simulate dist-upgrade | pager

remove されるパッケージは以下.

The following packages will be REMOVED:
  alsa-base alsaconf blas1 flim jgroff latex2html libsidplay1.36 libsnmp4.1
  libwmf0 libxfont-xtt liece liece-dcc mswordview netpbm octave octave-sp
  platex semi-gnus semi1.12 tetex-lib xcontrib xdvi-config xfonts-cjk xpm4g


The following NEW packages will be installed:
  asclock-themes atlas2-base bind9-host blas console-common debconf-utils
  defoma expect fetchmail-common fftw2 gettext gettext-el groff-base gs-common
  hermes1 html2text ifupdown ipchains klogd libapm1 libasound2 libcap1
  libdigest-md5-perl libdns5 libdps1 libexpat1 libfreetype6 libgc6
  libgimpprint1 libgtk1.2 libgtk1.2-common libhtml-tagset-perl libisc4
  libjcode-pm-perl libkpathsea3 liblcms liblwres1 libmagick5 libmng1 libnetpbm9
  libogg0 libpcap0 librplay3 libsdl1.2debian libsdl1.2debian-oss libsidplay1
  libsnmp-base libsnmp4.2 libssl0.9.6 libttf2 libungif4g libusb-0.1-4
  libvorbis0 libwmf0.2-2 libwraster2 libxaw6 libxaw6-dev libxaw7 libxml2
  navigator-base-477 navigator-smotif-477 net-tools netkit-inetd netkit-ping
  netscape-base-477 netscape-java-477 perl-doc powermgmt-base tcl8.3 texinfo
  ttf-xtt-wadalab-gothic ttf-xtt-watanabe-mincho x-ttcidfont-conf xlibs
  xlibs-dev xpdf xpdf-common xpdf-reader xpdf-utils xutils


The following packages have been kept back
  navigator netpbm-nonfree


The following packages will be upgraded
  a2ps-perl-ja aalib1 acct ack adduser aflatex afterstep aish alien apel apmd
  apt ascd ascdc asclock asiya24-vfont asmixer at auctex base-config base-files
  base-passwd bash bc bin86 bison bitmap-mule blas-dev bootpc bsdmainutils
  bsdutils bzip2 canna canna-utils console-data console-tools
  console-tools-libs cpio cron cvs dc debhelper debian-jp-keyring
  debian-keyring debian-policy debianutils debmake debsums devscripts dh-make
  diff dnsutils doc-debian doc-debian-ja doc-linux-html doc-linux-text dpkg-awk
  dpkg-dev dpkg-ftp dvi2ps dvi2ps-fontdata-ja dvipsk-ja dviutils e2fsprogs ed
  edict elvis-tiny emacs-dl-canna emacs-lisp-intro-ja emacs20-dl emacs20-dl-el
  emacsen-common esound esound-common expect5.31 fakeroot fbset fdutils
  fetchmail file file-kanji fileutils findutils flex freetype2 freewnn-common
  freewnn-jserver ftp fttools gawk gawk-ja gdb gdk-imlib1 gettext-base
  ghostview gifsicle giftrans glutg3 gnupg gnuplot grep grep-ja gs
  gs-pdfencrypt gsfonts gsfonts-other gv gzip hdparm hostname iamerican
  ibritish imagemagick imlib-base imlib1 info isapnptools ispell jdvi2kps
  jfbterm jless jtex-base jtex-bin jvim-canna jvim-doc kcc kernel-package
  kinput2-canna kinput2-common kon2 konfont lapack lapack-dev lapack-doc ldso
  lesstif1 lha libasound0.4 libaudiofile0 libbz2 libc5 libcanna1g libcompfaceg1
  libesd0 libft-perl libgdbmg1 libggi2 libgii0 libglib1.2 libgpmg1 libgsm1
  libhdf4g libhtml-parser-perl libjcode-perl libjpeg-progs libjpeg62
  liblockfile1 libmpeg1 libnet-perl libnspr4 libopenldap-runtime libopenldap1
  libpam-modules libpam-runtime libpam0g libpaperg libpng2 libproplist0 libqt2
  libreadline4 libsane libsmpeg0 libsnmp-session-perl libssl09 libstdc++2.10
  libterm-readkey-perl libtiff-tools libtiff3g libungif3g libwrap0 lilo login
  lprng lv lynx m4 make makedev man-db manpages manpages-dev manpages-ja mawk
  mbr menu mesag3+ggi mgp mime-support modconf modutils mount mpack mpg123
  mtools ncftp ncurses-base ncurses-bin ncurses-term netbase netscape-base-4
  nkf octave-ci passwd patch pciutils pdl perl-5.005-doc perlmagick ppp
  pppconfig ppxp ppxp-tcltk prn procps psmisc psutils ptex-base ptex-bin
  ptex-jtex pump rsync sdic sdic-edict sdic-gene95 sed sed-ja setserial
  sharutils shellutils smpeg-plaympeg snmp sox ssh ssh-askpass strace sudo
  svgalibg1 sysklogd syslinux sysutils t1lib1 tar tasksel tcl8.0 tcl8.2
  tcl8.2-dev tcpd tcsh-kanji telnet tetex-base tetex-bin tetex-extra textutils
  tgif time tk8.0 tk8.2 tk8.2-dev traceroute-nanog untex unzip update
  util-linux uudeview vflib2 vflib2-misc w3m watanabe-vfont whois wmaker
  wmaker-data wmakerconf-data wmapm wmbattery workman xanim xanim-modules
  xaw3dg xbase-clients xblast xcolors xcolorsel xdvik-ja xfig xfonts-100dpi
  xfonts-75dpi xfonts-a12k12 xfonts-base xfonts-intl-japanese
  xfonts-intl-japanese-big xfonts-marumoji xfonts-scalable xfs-xtt xinvaders
  xlib6g xlib6g-dev xloadimage xlockmore xmanpages-ja xmp xpdf-i xplanet
  xsidplay xterm xtt-fonts xview-clients xviewg yatex zmailer-ssl

では, 本番.

# apt-get --fix-broken --show-upgraded dist-upgrade

アップグレードの最中に, いくつかのパッケージの設定・再設定に関する質問が表示されます. /etc/init.d と /etc/terminfo ディレクトリに置かれるファイルと /etc/manpath.config に関しては, パッケージメンテナのバージョンに置き換えるようにしてください. システムの整合性を保つためには `yes' と答えることが必要になります. 古いバージョンも .dpkg-old という拡張子で 保存されていますので, 戻すのはいつでもできます.

Preparing to replace base-passwd 3.1.10 (using .../base-passwd_3.4.1_i386.deb) ...
Unpacking replacement base-passwd ...
Setting up base-passwd (3.4.1) ...

update-passwd has found some differences between your system accounts
and the current Debian defaults. It is advisable to allow update-passwd
to change your system; without those changes some packages might not work
correctly.  For more documentation on the Debian account policies please
see /usr/share/doc/base-passwd/README.

The list of proposed changes is:

Changing home-directory of mail to /var/mail
Would commit 1 changes

It is highly recommend that you allow update-passwd to make these changes
(a backup file of modified files is made with the extension .org so you can
always restore the current settings).

May I update your system? [Y/n] y
Installing new version of config file /etc/login.defs ...

Configuration file `/etc/pam.d/login'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   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.
*** login (Y/I/N/O/D/Z) [default=N] ?y
*** man.local (Y/I/N/O/D/Z) [default=N] ? y
*** (Y/I/N/O/D/Z) [default=N] ? y
*** /etc/manpath.config (Y/I/N/O/D/Z) [default=N] ? y
*** /etc/ggi/mesa/targets/fbdev.conf (Y/I/N/O/D/Z) [default=N] ? y
*** /etc/ggi/ggimesa.conf (Y/I/N/O/D/Z) [default=N] ? y
*** /etc/vfont/00vflib2 (Y/I/N/O/D/Z) [default=N] ? y
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)


# apt-get --fix-broken --show-upgraded install

ものによっては, dpkg --remove packagename としてしまってもよい

*** /etc/cron.d/zmailer-ssl (Y/I/N/O/D/Z) [default=N] ? y
You already have a LILO configuration in the file /etc/lilo.conf
Checking your /etc/lilo.conf for incompatible options...
Install a boot block using your current LILO configuration? [Yes] y
*** /etc/lynx.cfg (Y/I/N/O/D/Z) [default=N] y
*** /etc/hosts.canna (Y/I/N/O/D/Z) [default=N] ? n
*** /etc/ppp/options.ttyXX (Y/I/N/O/D/Z) [default=N] ? n
*** /etc/ppxp/modem/aterm (Y/I/N/O/D/Z) [default=N] ? n
*** /etc/ppxp/modem/mc6530 (Y/I/N/O/D/Z) [default=N] ? n
*** /etc/ppxp/modem/standard (Y/I/N/O/D/Z) [default=N] ? n
*** /etc/lprng/lpd.conf (Y/I/N/O/D/Z) [default=N] ? n
*** /etc/lprng/lpd.perms (Y/I/N/O/D/Z) [default=N] ? n
*** /etc/emacs/site-start.d/70sdic-edict.el (Y/I/N/O/D/Z) [default=N] ? y
*** /etc/emacs/site-start.d/70sdic-gene95.el (Y/I/N/O/D/Z) [default=N] ? y
*** /etc/X11/fonts/misc/xfonts-intl-japanese.alias' (Y/I/N/O/D/Z) [default=N] ? y
*** /etc/emacs/site-start.d/50yatex-init.el (Y/I/N/O/D/Z) [default=N] ? y
Package: xtt-fonts will be removed by itself
dpkg: dependency problems prevent removal of xtt-fonts:
 task-1st-tettei-addonjp depends on xtt-fonts.
dpkg: error processing xtt-fonts (--purge):
 dependency problems - not removing
Errors were encountered while processing:


# apt-get --fix-broken --show-upgraded dist-upgrade


# apt-get install locales util-linux
# dselect

[update] -> [Select] -> [install] とし,

The following packages will be REMOVED:
  pnmtopng task-1st-tettei-addonjp ucbmpeg xtt-fonts* 
The following NEW packages will be installed:
  apt-utils biff cpp-3.0 debconf-tiny esound-clients finger gcc-3.0
  gcc-3.0-base gimpprint-locales gnupg-doc groff ipmasqadm iptables less
  libgcc1 libggi-target-x libggimisc2 libldap2 libnet-ph-perl libnet-snpp-perl
  libnet-telnet-perl libnss-db libpcre3 libsasl7 libstdc++3 logrotate lsof
  mailx mtr-tiny mutt nano nfs-common octave2.0 octave2.1 pidentd portmap
  procmail psfontmgr rcs sidplay-base texi2html transfig util-linux-locales
  vacation wenglish xfonts-bitmap-mule xplanet-images 
0 packages upgraded, 47 newly installed, 4 to remove and 2  not upgraded.
Need to get 13.9MB of archives. After unpacking 41.5MB will be used.
*** /etc/ggi/libggimisc.conf' (Y/I/N/O/D/Z) [default=N] ? y

vacation_3.2.3_i386.deb のインストールに失敗するが無視.

# chmod 755 /etc/init.d/portmap 


# apt-get --fix-broken --show-upgraded install

4. 後始末

/etc/locale.gen に以下の記述を加える.



# locale-gen 

を実行. ロケールデータの生成, 以下のコマンドで確認.

$ export LANG=ja_JP.eucJP  
$ man man

.bashrc にも書いておく. ついでに jless の alias の設定も行う. 以上の後, システムを再起動.

# reboot


$ dmesg |less
$ sudo less /var/log/syslog 

console-toolsパッケージのアップデートによってはキーマップが us101 になることがあります. この場合はつぎのようにします.

# install-keymap jp106

5. 参考サイト


6. 参考サイト

最終更新日: 2002/12/13(小高正嗣) Copyright (C) 2002- ODAKA Masatsugu