FreeBSD8.0から8.1にアップデートしてみた
初のバイナリアップデートに挑戦してみました.
# freebsd-update -r 8.1-RELEASE fetch (snip) /usr/src/usr.sbin/jail/jail.c /var/db/freebsd-update /var/db/mergemaster.mtree WARNING: FreeBSD 8.0-RELEASE is approaching its End-of-Life date. It is strongly recommended that you upgrade to a newer release within the next 1 week. 一週間以内にアップデートしろと...ま,いますぐアップデートします # freebsd-update -r 8.1-RELEASE upgrade Looking up update.FreeBSD.org mirrors... 4 mirrors found. Fetching metadata signature for 8.0-RELEASE from update5.FreeBSD.org... done. Fetching metadata index... done. Fetching 1 metadata patches. done. Applying metadata patches... done. Fetching 1 metadata files... done. Inspecting system... done. The following components of FreeBSD seem to be installed: kernel/generic src/base src/sys world/base world/dict world/doc world/info world/manpages world/proflibs The following components of FreeBSD do not seem to be installed: src/bin src/cddl src/contrib src/crypto src/etc src/games src/gnu src/include src/krb5 src/lib src/libexec src/release src/rescue src/sbin src/secure src/share src/tools src/ubin src/usbin world/catpages world/games Does this look reasonable (y/n)? y Fetching metadata signature for 8.1-RELEASE from update5.FreeBSD.org... done. Fetching metadata index... done. Fetching 1 metadata patches. done. Applying metadata patches... done. Fetching 1 metadata files... done. Inspecting system... done. Fetching files from 8.0-RELEASE for merging... done. Preparing to download files... done. Fetching 9369 patches.....10....20....30....40....50....60....70....80....90.... 100....110....120....130....140....150....160....170....180....190....200....210 ....220....230....240....250....260....270....280....290....300....310....320....330....340....350....360....370....380....390....400....410....420....430....440....450....460....470....480....490....500....510....520....530....540....550....560....570....580....590....600....610....620....630....640....650....660....670....680....690....700....710....720....730....740....750....760....770....780....790....800....810....820....830....840....850....860....870....880....890....900....910....920....930....940....950....960....970....980....990....1000....1010....1020....1030....1040....1050....1060....1070....1080....1090....1100....1110....1120....1130....1140....1150....1160....1170....1180....1190....1200....1210....1220....1230....1240....1250....1260....1270....1280....1290....1300....1310....1320....1330....1340....1350....1360....1370....1380....1390....1400....1410....1420....1430....1440....1450....1460....1470....1480....1490....1500....1510....1520....1530....1540....1550....1560....1570....1580....1590....1600....1610....1620....1630....1640....1650....1660....1670....1680....1690....1700....1710....1720....1730....1740....1750....1760....1770....1780....1790....1800....1810....1820....1830....1840....1850....1860....1870....1880....1890....1900....1910....1920....1930....1940....1950....1960....1970....1980....1990....2000....2010....2020....2030....2040....2050....2060....2070....2080....2090....2100....2110....2120....2130....2140....2150....2160....2170....2180....2190....2200....22 (大量に中略) 10....9120....9130....9140....9150....9160....9170....9180....9190....9200....9210....9220....9230....9240....9250....9260....9270....9280....9290....9300....9310....9320....9330....9340....9350....9360.... done. Applying patches... done. Fetching 5731 files...done. Attempting to automatically merge changes in files... done. The following file could not be merged automatically: /etc/amd.map Press Enter to edit this file in vi and resolve the conflicts manually... /var/named/etc/namedb/named.conf /var/named/etc/namedb/named.root /var/yp/Makefile.dist # freebsd-update -r 8.1-RELEASE install Installing updates... Kernel updates have been installed. Please reboot and run "/usr/sbin/freebsd-update install" again to finish installing updates. # reboot ここでアップデート後のリブートに大失敗.以下のようなエラーが大量に発生. init: NSSWITCH(nslexer): /etc/nsswitch.conf line 3: syntax error at '<' init: NSSWITCH(nslexer): /etc/nsswitch.conf line 5: syntax error at '=' init: NSSWITCH(nslexer): /etc/nsswitch.conf line 7: syntax error at '>' login_getclass: unknown class 'root' login_getclass: no default/fallback class 'default' /etc/login.access: line 1: bad field count /etc/login.access: line 3: bad field count /etc/login.access: line 5: bad field count pam_acct_mgmt(): error in service module
rootでもログインできないので,CTRL-ALT-DELでリブートしてメニューからシングルユーザモードで起動してrootログインして確認します.
cat etc/nsswitch.conf # # nsswitch.conf(5) - name service switch configuration file <<<<<<< current version # $FreeBSD: src/etc/nsswitch.conf,v 1.1.8.1 2009/04/15 03:14:26 kensmith Exp $ ======= # $FreeBSD: src/etc/nsswitch.conf,v 1.1.10.1.4.1 2010/06/14 02:09:06 kensmith Exp $ >>>>>>> 8.1-RELEASE
なんやこりゃ...マージミス...
仕方がないのでCTRL-ALT-DELでリブートして,メニューからシングルユーザモードで起動して,
# mount / # mount /usr # usr/local/bin/emacs etc/nsswitch.conf etc/login.conf (略) /etc/*で,マージ失敗しているファイルを全部編集 # cap_mkdb etc/*.conf
取りあえず起動.
コンフィグファイルのマージミスがかなり面倒でした.
grep -E ^=======$ /etc/*
が消えるまで,手動で編集しました...
編集は,とりあえずエラーになる行を全部コメントにしました.
# nsswitch.conf(5) - name service switch configuration file<<<<<<< current version
# $FreeBSD: src/etc/nsswitch.conf,v 1.1.8.1 2009/04/15 03:14:26 kensmith Exp $
=======
# $FreeBSD: src/etc/nsswitch.conf,v 1.1.10.1.4.1 2010/06/14 02:09:06 kensmith Exp $
>>>>>>> 8.1-RELEASE
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
# nsswitch.conf(5) - name service switch configuration file
#<<<<<<< current version
# $FreeBSD: src/etc/nsswitch.conf,v 1.1.8.1 2009/04/15 03:14:26 kensmith Exp $
#=======
# $FreeBSD: src/etc/nsswitch.conf,v 1.1.10.1.4.1 2010/06/14 02:09:06 kensmith Exp $
#>>>>>>> 8.1-RELEASE