mfsBSD続き
一番肝心なインストールの所が抜けてました。
という事で続mfsBSD・・・といきたいんですが、ここばかりは読者の各HDD事情で変わってくるので、今回はVMwareを使います。
mfsBSDが正常に起動したらまずはSSHでのログイン。
デフォルトから弄っていない場合はroot:mfsbsdでログインできます。
login: root password: (mfsbsd)
ログインできたらまずはHDDの初期化を行います。
データが完全に消えるのでバックアップ等はお忘れなきよう。
# dd if=/dev/zero of=/dev/ad0 bs=512 count=32
次にパーティションの作成。
FreeBSDのfdiskは使い勝手が悪いので、ここだけは他のツールを使ったほうがいいかもしれません。
# vi vmware.conf g c17753 h15 s63 p 1 165 63 4193847 p 2 165 4193910 4193910 p 3 165 8387820 4193910 p 4 165 12581730 4194855 a 1
# fdisk -f vmware.conf -iv ad0 ******* Working on device /dev/ad0 ******* fdisk: invalid fdisk partition table found fdisk: WARNING line 5: number of cylinders (17753) may be out-of-range (must be within 1-1024 for normal BIOS operation, unless the entire disk is dedicated to FreeBSD) parameters extracted from in-core disklabel are: cylinders=17753 heads=15 sectors/track=63 (945 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=17753 heads=15 sectors/track=63 (945 blks/cyl) Information from DOS bootblock is: 1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 4193847 (2047 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 341/ head 14/ sector 63 2: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 4193910, size 4193910 (2047 Meg), flag 0 beg: cyl 342/ head 0/ sector 1; end: cyl 683/ head 14/ sector 63 3: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 8387820, size 4193910 (2047 Meg), flag 0 beg: cyl 684/ head 0/ sector 1; end: cyl 1/ head 14/ sector 63 4: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 12581730, size 4194855 (2048 Meg), flag 0 beg: cyl 2/ head 0/ sector 1; end: cyl 344/ head 14/ sector 63 fdisk: Geom not found: "ad0"
次にスライスの作成。
上記のパーティション作成にも言える事ですが、HDDなんて滅多に交換する事もないので、一度領域を決めてしまえば後は自動化できます。
# vi label_ad0s1 # /dev/ad0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 256M 16 4.2BSD b: 1G * swap c: * * unused d: 256M * 4.2BSD e: 256M * 4.2BSD f: * * 4.2BSD
# vi label_ad0s2 # /dev/ad0s2: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: * * unused d: 1G * 4.2BSD e: * * 4.2BSD
# vi label_ad0s3 # /dev/ad0s3: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: * * unused d: 1G * 4.2BSD e: * * 4.2BSD
# vi label_ad0s4 # /dev/ad0s4: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: * * unused d: 1G * 4.2BSD e: * * 4.2BSD
スライスの書き込み。
# bsdlabel -R ad0s1 label_ad0s1 # bsdlabel -R ad0s2 label_ad0s2 # bsdlabel -R ad0s3 label_ad0s3 # bsdlabel -R ad0s4 label_ad0s4
次にHDDのフォーマット。
今回は適当にやっちゃっていますが、適切なオプションを設定すれば高速化もできます。
# newfs ad0s1a # newfs -U ad0s1d # newfs -U ad0s1e # newfs -U ad0s1f # newfs -U ad0s2d # newfs -U ad0s2e # newfs -U ad0s3d # newfs -U ad0s3e # newfs -U ad0s4d # newfs -U ad0s4e
次にフォーマットしたHDDをマウントします。
# swapon /dev/ad0s1b # mount /dev/ad0s1a /mnt # mkdir /mnt/var /mnt/tmp /mnt/usr # mount /dev/ad0s1d /mnt/var # mount /dev/ad0s1e /mnt/tmp # mount /dev/ad0s1f /mnt/usr # mkdir /mnt/usr/src /mnt/usr/ports /mnt/usr/obj # mkdir /mnt/usr/local /mnt/usr/jail /mnt/home # mount /dev/ad0s2d /mnt/usr/src # mount /dev/ad0s2e /mnt/usr/ports # mount /dev/ad0s3d /mnt/usr/obj # mount /dev/ad0s3e /mnt/usr/local # mount /dev/ad0s4d /mnt/usr/jail # mount /dev/ad0s4e /mnt/home
ここまではFreeSBIEの時と一緒なので、単なる焼き直しに見えます。
が、mfsBSDのハンドブックを見て気がついたのですが、sysinstallにはInstall Rootオプションというのが存在します。
今までFreeSBIEを使っていた時は気がつかなかったのですが、このInstall Rootオプションは通常ならルートディレクトリを基準としてインストールするのを、任意のディレクトリを基準にインストールする事が出来るということです。
これに気がついていれば今頃FreeSBIEでもっと遊べていたのに・・・。
とまぁそんな愚痴はおいて置いて、続きです。
まずはsysinstallを起動して、Custumメニューを選択します。
するとOptionsという項目があるのでそれを選択します。
いろいろと項目がありますが、その中のInstall Rootをスペースを押して選択し、/mntに変更します。
次にDistributionsを選択し、Minimalを選択します。
次にMediaメニューを選択し、FTPを選択、ミラーサイトは日本国内のサーバを指定すれば良いでしょう。
ローカルにミラーサーバを立てている場合はそちらを指定してください。
最後に一番下のCommitメニューを選択して、インストールします。
ローカルにミラーサーバを立てている場合はものの数分で終わるかと思います。
インストールが終了したらsysinstallを終了してください。
正常にインストールされていれば/mnt以下にFreeBSDのファイル郡があるかと思います。
ちょっと長くなったので続きは後半戦へ。