FreeBSD 7.2-RELEASE

この記事は2年以上前に書いたものです。
そのため情報が古い可能性があります。ご了承ください。m(_ _)m

FreeBSD 7.2-RELEASE登場 – スラッシュドット・ジャパン

FreeBSD 7.2-RELEASE登場,安定ブランチの最新版 – Jail仮想化機能IPアドレス強化とスーパーページ改善|gihyo.jp … 技術評論社

FreeBSD 7.2-RELEASE Announcement

7.2-RELEASE Announcement

The FreeBSD Release Engineering Team is pleased to announce the availability of FreeBSD 7.2-RELEASE. This is the third release from the 7-STABLE branch which improves on the functionality of FreeBSD 7.1 and introduces some new features. Some of the highlights:

  • support for fully transparent use of superpages for application memory

  • support for multiple IPv4 and IPv6 addresses for jails

  • csup(1) now supports CVSMode to fetch a complete CVS repository

  • Gnome updated to 2.26, KDE updated to 4.2.2

  • sparc64 now supports UltraSparc-III processors

For a complete list of new features and known problems, please see the online release notes and errata list, available at:

For more information about FreeBSD release engineering activities, please see:

・・・
FreeBSD Update

The freebsd-update(8) utility supports binary upgrades of i386 and amd64 systems running earlier FreeBSD releases. Systems running 7.0-RELEASE, 7.1-RELEASE, 7.2-BETA, 7.2-RC1, or 7.2-RC2 can upgrade as follows:

# freebsd-update upgrade -r 7.2-RELEASE

During this process, FreeBSD Update may ask the user to help by merging some configuration files or by confirming that the automatically performed merging was done correctly.

# freebsd-update install

The system must be rebooted with the newly installed kernel before continuing.

# shutdown -r now

After rebooting, freebsd-update needs to be run again to install the new userland components, and the system needs to be rebooted again:

# freebsd-update install
# shutdown -r now

Users of earlier FreeBSD releases (FreeBSD 6.x) can also use freebsd-update to upgrade to FreeBSD 7.2, but will be prompted to rebuild all third-party applications (e.g., anything installed from the ports tree) after the second invocation of “freebsd-update install”, in order to handle differences in the system libraries between FreeBSD 6.x and FreeBSD 7.x.
・・・

freebsd-updateユーティリティでバイナリアップグレードが可能らしい。
以下が詳しい。

FreeBSD 7.0 へようこそ:第3回 freebsd-updateで楽々リリースサーフィン|gihyo.jp

UNIXの部屋 コマンド検索:freebsd-update (*BSD/Linux)

On-line Manual of “freebsd-update”

 

遠隔地のサーバを、でアクセスして、サクッとUpgradeしてみることにした。
途中で失敗して立ち上がらなくなったりしたら、飛行機代があれだけど。。

% uname -r
7.1-RELEASE-p4

% freebsd-update –help

usage: freebsd-update [options] command … [path]

Options:
  -b basedir   — Operate on a system mounted at basedir
                  (default: /)
  -d workdir   — Store working files in workdir
                  (default: /var/db/freebsd-update/)
  -f conffile  — Read configuration options from conffile
                  (default: /etc/freebsd-update.conf)
  -k KEY       — Trust an RSA key with SHA256 hash of KEY
  -r release   — Target for upgrade (e.g., 6.2-RELEASE)
  -s server    — Server from which to fetch updates
                  (default: update.FreeBSD.org)
  -t address   — Mail output of cron command, if any, to address
                  (default: root)
Commands:
  fetch        — Fetch updates from server
  cron         — Sleep rand(3600) seconds, fetch updates, and send an
                  email if updates were found
  upgrade      — Fetch upgrades to FreeBSD version specified via -r option
  install      — Install downloaded updates or upgrades
  rollback     — Uninstall most recently installed updates
  IDS          — Compare the system against an index of “known good” files.

 

/var の容量が少ないので、-d /home/tmp/freebsd-updateとかにしておく。

% sudo freebsd-update upgrade -r 7.2-RELEASE -d /home/tmp/freebsd-update

Looking up update.FreeBSD.org mirrors… 6 mirrors found.
Fetching public key from update1.FreeBSD.org… done.
Fetching metadata signature for 7.1-RELEASE from update1.FreeBSD.org… done.
Fetching metadata index… done.
Fetching 2 metadata files… done.
Inspecting system… done.

The following components of FreeBSD seem to be installed:
kernel/generic src/base src/bin 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/sys src/tools src/ubin src/usbin
world/base world/dict world/doc world/games world/info world/manpages
world/proflibs

The following components of FreeBSD do not seem to be installed:
src/cddl world/catpages world/lib32

Does this look reasonable (y/n)? y

Fetching metadata signature for 7.2-RELEASE from update1.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 7.1-RELEASE for merging… done.

Preparing to download files… done.           ← ここからがかなり長い
Fetching 30796 patches…..10….20….30….40….50….60….70….80….90….100….110….1

・・・

…30760….30770….30780….30790… done.
Applying patches… done.
Fetching 581 files… done.
Attempting to automatically merge changes in files… done.

The following file could not be merged automatically: /etc/mail/mailer.conf
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually…            ← 自動でマージ出来なかった場合(?)は、viが立ち上がって手動修正

この後、Updateで削除されるファイル、追加されるファイル、更新されるファイルの一覧が表示されて終了。

% sudo du -hs /home/tmp/freebsd-update
583M    /home/tmp/freebsd-update

と、それなりのサイズに。
次のコマンドで、実際にインストールされる。

% sudo freebsd-update install -d /home/tmp/freebsd-update

Installing updates…
Kernel updates have been installed.  Please reboot and run
“/usr/sbin/freebsd-update install” again to finish installing updates.

% sudo shutdown -r now

を叩いた後、1分ほど黙祷。その後、sshでログインしてみる。
ログインできたら、メッセージの通り再度、

% sudo freebsd-update install -d /home/tmp/freebsd-update
Installing updates… done.           ← そこそこ時間掛かる

でUpgrade完了。

% uname -r
7.2-RELEASE

ついでに、7.2-RELEASEが更新されたら通知してくれるよう、cronの設定もしておく。

% sudo vi /etc/crontab
0 3 * * * root /usr/sbin/freebsd-update cron -d /home/tmp/freebsd-update

を最終行に追加。

freebsd-update cron は、基本fetchと同じらしい。違いは、処理開始前に、1 ~ 3,600秒スリープすることと、結果をメールすることくらい。
man freebsd-update
に書いてある。
view /usr/sbin/freebsd-update
で、ソース見た方が早いかも。かなり見易く綺麗なソースだ。

カテゴリー: サーバ管理 タグ: , , , パーマリンク

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です