2008年3月19日水曜日

FreeBSD 7.0-Release をインストール part2

自宅のPCも FreeBSD 7-stable にした. 多分, 普通に入れる人にはほとんど参考にならないだろうけど, 手順を公開してみる. メジャーバージョンアップの際はクリーンインストールをするようにしていて, そのため FreeBSD のために二つのパーティションを切っている. 普段使っていない方のパーティションに 7.0-release を入れて stable を追いかける.


  1. FreeBSD 7.0-release の CD1 を焼く
  2. CDブートして Expert モードで Minimum インストール
  3. リブート
  4. 最低限の設定をする
    /boot/loader.conf /etc/{resolv.conf, rc.conf, ntp.conf, hosts, fstab, aliases, sysctl.conf}

  5. (必要な人だけ) 以降のコンパイルのオプションを変更する
    # cp /usr/share/example/etc/make.conf /etc
    # vi /etc/make.conf

    ちなみに僕は tmpfs を mtmp にマウントして ports の一時ファイル置き場にしている.
    (/etc/make.conf)
    WRKDIRPREFIX=/mtmp/ports

  6. /usr/share/example/cvsup/stable-supfile をコピーして, cvsup のホスト名を変更しソースツリーをダウンロード.
    # csup stable-supfile

  7. OSのコンパイル
    # cd /usr/src
    # make buildworld
    # make buildkernel KERNCONF=GENERIC
    # make installkernel KERNCONF=GENERIC

    (必要なら, /usr/src/sys/i386/conf/GENERIC をコピーして編集する. しかし, すでに stable ではデフォルトスケジューラがULEになっていたので, GENERICのまま作業した)
  8. リブート
  9. single user mode で起動
  10. インストール
    # /sbin/mount -a
    # set HOME=/root
    # source ~/.cshrc
    # cd /usr/src
    # mergemaster -p
    # make installworld
    # mergemaster
    # exit
    (ここまでで所要時間1時間半ぐらい)
  11. ports ツリーのダウンロード.
    # portsnap fetch extract

  12. portupgrade のインストール
    # cd /usr/ports/ports-mgmt/portupgrade
    # make install

  13. いろんなアプリケーションのインストール
    # portinstall -RPwW --batch `cat pkg.list`

    前もって, "pkg.list" に必要なパッケージ名の一覧をコピーしておく. もともと使っているシステムがあるなら,
    # ls /var/db/pkg > pkg.list
    してから調整するのもあり.
  14. あとは無事インストールが終わるのを待つ. それなりにアプリを入れるとかなり時間がかかる. 僕の場合で3-4時間.
  15. アプリの設定をする. (今回は普段使っているホームディレクトリをそのまま使ったので省略)

おまけ1: linux-firefox について
今回インストールした 7-stable では linux-firefox が不安定になって困った. 理由は分からないが linux エミュレーションのバージョンを変えたら安定した.
(/etc/sysctl.conf)
compat.linux.osrelease=2.6.16

おまけ2: インストールしたパッケージのリスト
これだけ見るとパッケージ数はあまり多くないが, 実際には依存するパッケージも入れるので, 最終的にパッケージの数は580個ぐらいになった. xorg が細かく分割されてからパッケージ数がインフレだ.
(pkg.list)
aspell
autotools
bash
bitstream-vera
blas
boehm-gc
boost-python
bsfilter
cdrtools
compat5x-i386
db46
dnsmasq
dvipdfmx
fd
feh
ffmpeg
fluxbox
gcc42
gdk-pixbuf
ghostscript-gpl
gimp
global
glpk
gmake
gnuplot
google-perftools
graphviz
gsl
gv
hugs98
inkscape
ja-a2ps
ja-acroread7
ja-anthy-9100e
ja-dvipsk-tetex
ja-ipa-ttfonts
ja-kasumi
ja-mplusfonts
ja-nkf
ja-platex-jsclasses
ja-ptex-tetex
ja-qkc
ja-sazanami-ttf
ja-vlgothic-20071015
ja-w3m
ja-xdvik-tetex
ja-xpdf
kmovisto
lame
lapack
lftp
lha
linux-firefox
linux-flashplugin
linux-xorg-libs
linux_base-fc-4
lv
maxima
mbmon
mencoder
mercurial
mesa-demos
mlterm
mmsrip
mplayer
naturaldocs
octave
opengl-man
pkg_cleanup
pkg_remove
pkg_rmleaves
pngcrush
portupgrade
povray
pstoedit
psutils-a4
python25
qhull
queequeg
rlwrap
rpm
rsync
ruby
screen
smartmontools
source-highlight
subversion
sudo
sylpheed
transfig
unzip
valgrind
vim
wget
wine
wmmemfree
wmweather
wxMaxima
xfig
xmms
xorg
xvidcap
zip
zsh

0 件のコメント: