あう、compression=lzjb もダメじゃん。
というわけで、zfs boot で利用する zfs 領域には、compression を設定しちゃダメです。
http://mail.opensolaris.org/pipermail/zfs-discuss/2007-April/027525.html
zfsbootの最近のブログ記事
ZFS boot では、zfs set compression=gzip を指定するとダメとのこと。
ただ、compression=lzjb は、should work just fine とのこと。
http://mail.opensolaris.org/pipermail/zfs-discuss/2007-April/027519.html
Synopsis
ZFS boot to support gzip decompression
http://bugs.opensolaris.org/view_bug.do?bug_id=6538017
64 bit kernel で起動させようと、reboot してみました。
起動後、grub editor で、エントリを直接いじって起動させてみようと思いました。
しかし、「Vortual machine kernel stack fault」の message が出力されてしまい、そのディスクイメージからは、2度と起動できなくなってしまいますよ orz
*** Virtual machine kernel stack fault (hardware reset) ***
The virtual machine just suffered a stack fault in
kernel mode. On a real computer, this would amount to a reset of the processor.
It can be caused by an incorrect configuration of the virtual machine, a bug in
the operating system, or a problem in the VMware Fusion software. Press OK to reboot virtual machine or Cancel to shut it down.
VMware Fusion beta 3 の bug なのかな?
一度、ufs な Nevada b62 を起動して、installgrub してあげると、また、起動できるようになった。いま、立ち上がってるけど・・・
これ、落とすと・・・また、同じなのなか・・・
同じでした orz
とりあえず、zfsboot を作成するために使用した、ディスクイメージの grub を使えば、起動させることができた・・・
workaround しては、コレもありか。
やりなおし。
こんどは、zpool create で、スライスではなく、disk 丸ごと zfs に。
しかし、ここにも罠が。
EFI label だと、installgrub できない orz
# installgrub /zfsroot/boot/grub/stage1 /zfsroot/boot/grub/stage2 /dev/rdsk/c1t1d0s0cannot open/stat device /dev/rdsk/c1t1d0s2
そりゃそうだねぇ・・・
まぁ、冒険は後からでもいいので、とりあえずは最初に戻って、手順書通りにやってみる。
とりあえず、/rootpool/boot/grub/menu.lst は、こんな感じで設定し、32bit kernel が強制的に起動するようにしてみる。手順書には、console=ttya がついてるのだけど、それは外しときます。
title Solaris ZFSで、恐る恐る shutdown -y -i6 -g0 してみると・・・
root (hd0,0,a)
kernel$ /platform/i86pc/kernel/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/boot_archive
title Solaris ZFS - failsafe
root (hd0,0,a)
kernel /boot/platform/i86pc/kernel/unix
module /boot/x86.miniroot-safe
きたっ!zfsboot きたっ!
# mount -pいい感じです。read/write が速くなっています。
rootpool/rootfs - / zfs - no rw,noatime
/devices - /devices devfs - no
/dev - /dev dev - no
ctfs - /system/contract ctfs - no
proc - /proc proc - no
mnttab - /etc/mnttab mntfs - no
swap - /etc/svc/volatile tmpfs - no xattr
objfs - /system/object objfs - no
/usr/lib/libc/libc_hwcap1.so.1 - /lib/libc.so.1 lofs - no
fd - /dev/fd fd - no rw
swap - /var/run tmpfs - no xattr
/dev/dsk/c1t0d0s0 - /ufsroot ufs - no rw,intr,largefiles,logging,xattr,onerror=panic
rootpool - /rootpool zfs - no rw,devices,setuid,exec,xattr,atime
/hgfs - /hgfs vmhgfs - no
/tmp/VMwareDnD - /var/run/vmblock vmblock - no
とにかく、Manual Setup to boot ZFS on x86 を、きちんと読むのが成功の秘訣です。
section 4 の find と cpio による populate の次にある、「Run this script to create them.」これは、忘れずに実行することです。
コピペすると大変なことになるので、きちんと確認を。
あと、起動時に以下の WARNING が。
unknown genunix: [ID 921906 kern.warning] WARNING: Cannot find /etc/dfs/sharetabsharetab は、build 62 で、kernel が持つようになったので、以下のようにしてから再起動してあげればいいみたい。
unknown kcf: [ID 415456 kern.warning] WARNING: No randomness provider enabled for /dev/random. Use cryptoadm(1M) to enable a provider.
# touch /etc/dfs/sharetabcryptoadm は、わかんね。
いまのところ、さとうは VMware Fusion Beta 3 を使って実験しているので、仮想環境で練習してから挑むのをオススメ。
次は、64 bit kernel で起動させてみないと。
撃沈しまくりんぐ。
VMware Fusion Beta 3 を使って、別なディスクへ rootpool を作成し、ufs な / を populate しています。
grub の起動、kernel 読み込みまではうまくいきましたが、その後の /system/contract がないとか、/etc/svc/volatile がないとかうまく起動してくれず・・・
あっ。
犯人発見!
http://www.opensolaris.org/os/community/zfs/boot/zfsboot-manual/create_dirs/
コピペが原因ですか orz
こうなってました。
ZFSROOT=$1これを、web にあるように直してあげると、ないないいってたのができあがります。
createdir $ZFSROOT/system/object 555 root root createdir $ZFSROOT/system/contrac
t 555 root root createdir $ZFSROOT/tmp 1777 root sys createdir $ZFSROOT/proc 555
root root createdir $ZFSROOT/etc/svc/volatile 755 root sys createdir $ZFSROOT/v
ar/run 755 root sys createdir $ZFSROOT/dev/fd 555 root root
touch $ZFSROOT/etc/mnttab chmod 444 $ZFSROOT/etc/mnttab chown root $ZFSROOT/etc/
mnttab chgrp root $ZFSROOT/etc/mnttab echo "$ZFSROOT is created"
皆さんも注意してください・・・
さて、無事に boot するかな・・・
ディスクイメージファイルが、壊れたのかな? VMware 起動しない。 orz
こんなメッセージが出る。
*** Virtual machine kernel stack fault (hardware reset) ***こ、怖いな。
The virtual machine just suffered a stack fault in
kernel mode. On a real computer, this would amount to a reset of the processor.
It can be caused by an incorrect configuration of the virtual machine, a bug in
the operating system, or a problem in the VMware Fusion software. Press OK to reboot virtual machine or Cancel to shut it down.
ufs のほうは壊れてないので普通に起動する。
もう一回、作り直しか orz
install 時に、zfsboot で構成する場合は、patching kit が必要になるそうです。
ようは、Nevada b62 を network install できるようにして、patching kit を適用。
できあがった、install image を使って、そのまま network boot するか、boot できるように DVD に焼いて起動しろと。
ちょいと、敷居が高いでつね。
http://mail.opensolaris.org/pipermail/opensolaris-discuss/2007-April/027797.html
