2009年 2月 08日 日曜日
|
|
Messages in cipher reflected in the looking glass [ Yasuhiro Fujitsuki's Weblog ] |
(JA) OpenSolaris b106 : installation into usb memory
すでに Solaris Express で同様のことはテスト済みなのですが、
OpenSolaris b106 の ISO イメージが配布され始めたので、こちらでもテストをしてみました。
USBへのインストールは LiveCD / LiveUSB のどちらでも行えます。
下図は LiveUSB から USBメモリへのインストールを行っているところです。
インストール方法は以下の通りです。たいしたモノではありませんが…。
- OpenSolaris LiveCD もしくは OpenSolaris LiveUSB を起動する。
この時点ではインストール用USBメモリは接続しません。 (起動時にエラーが出たりすることがあるので) - OpenSolaris 起動後、USBメモリを接続。FATでフォーマットされている場合などは 自動マウントされるので、念のため、アンマウントしておく。
- インストーラアイコンをダブルクリックし、起動。
- インストールディスクに USB メモリを選択し、普通にインストール。
これだけです。^-^;
インストールは基本的に通常のインストールと変わりません。
一応、インストール手順のスクリーンショットを後半に貼り付けておきます。
================================
(参考) USBメモリブートの安定性向上?
USBメモリからのZFSブートが非常に不安定な場合があります。
GRUBからカーネルを選択後、OpenSolaris起動時に
「ブートできないデバイスです」という趣旨の英語の警告が一瞬表示され、
リブートを繰り返す現象に遭遇しました。
私の環境では /kernel/drv/scsa2usb.conf に
OpenSolaris をインストールしたUSBメモリ情報を追加することにより、
この現象が軽減しましたので、参考までに書いておきます。
ただ、設定後でも利用する USB ポートを変えると同じ現象が再現したりする場合もあるので、
USBポートは固定した方が良いのかもしれません。
今回は removable設定のみを上書きするように設定していますが、
他の情報を書き換えたりすることで状況が改善したりするかもしれません。
この辺は今後情報が増えてくると期待。
USBメモリの情報を/kernel/drv/scsa2usb.confに追加する方法は下記のとおりです。
- LiveUSB / LiveCD を起動する。
- rpool を強制的にインポートする。
$ zpool import -f -a
おまけ rpool が複数ある場合、作業を行いたいrpoolをインポートできない場合があります。この場合は zfs の id を利用してインポートします。
まず、下記のように zpool import で zpool 情報を取得します。インポートしていないpoolが複数のある場合は複数行表示されます。$ zpool import pool: rpool id: 6178916327464335414 state: ONLINE status: The pool is formatted using an older on-disk version. action: The pool can be imported using its name or numeric identifier, though some features will not be available without an explicit 'zpool upgrade'. config: rpool ONLINE c12t0d0s0 ONLINEid を利用してインポートします。
$ zpool import -f 6178916327464335414
- / ディレクトリのマウントポイントをlegacyに変更する
$ zfs set mountpoint=legacy rpool/ROOT/opensolaris
- /mnt でマウントする
$ mount -F zfs rpool/ROOT/opensolaris /mnt
- /mnt/kernel/drv/scsa2usb.conf に OpenSolaris をインストールしたUSBメモリ情報を追加する。
まず rmformat コマンドで USBメモリの製品名を調べておきます。 この場合は、製品名PicoDUAL になります。
$ rmformat Looking for devices... 1. Logical Node: /dev/rdsk/c11t0d0p0 Physical Node: /pci@0,0/pci1462,6510@1d,7/storage@2/disk@0,0 Connected Device: GH PicoDUAL PMAP Device Type: Removable Bus: USB Size: 15.3 GB Label:Access permissions: 次のコマンドを実行します。
$ prtconf -v > /tmp/a
USBメモリ名を利用して、USBメモリの情報を探します。
必要な情報は usb-vendor-id, usb-product-id, usb-revision-id(オプション) です。
下記は prtconf -v 出力の PicoDUAL が該当する部分です。
name='usb-product-name' type=string items=1 value='PicoDUAL' name='usb-vendor-name' type=string items=1 value='GH' name='usb-serialno' type=string items=1 value='078C06810B04' name='usb-raw-cfg-descriptors' type=byte items=32 value=09.02.20.00.01.01.00.80.64. 09.04.00.00.02.08.06.50.00.07.05.81.02. 00.02.00.07.05.02.02.00.02.00 name='usb-dev-descriptor' type=byte items=18 value=12.01.00.02.00.00.00.40.6b.0a.0f.00.10.01.01.02.03.01 name='usb-release' type=int items=1 value=00000200 name='usb-num-configs' type=int items=1 value=00000001 name='usb-revision-id' type=int items=1 value=00000110 name='usb-product-id' type=int items=1 value=0000000f name='usb-vendor-id' type=int items=1 value=00000a6b/mnt/kernel/drv/scsa2usb.conf に USBメモリの情報を追加します。
追加するものは下記のとおりです。vid に usb-vendor-id、 pid に usb-product-id、 rev に usb-revision-id (下記は * を利用し、省略)、 removable = true を指定します。# ANYTHING CHANGED BEFORE THIS POINT MAY BE OVERWRITTEN IN UPGRADE attribute-override-list = "vid=0xa6b pid=0x0f rev=* removable=true";
- /mnt をアンマウント
$ umount /mnt
- マウントポイントを元に戻す
$ zfs set mountpoint=/ rpool/ROOT/opensolaris
書き換え間違い等があった場合、OSの起動時(OSバージョン等が表示され、Hostnameが表示される前)に
/kernel/drv/scsa2usb.conf がおかしい趣旨の
警告が表示されます。
====================================
インストーラのスクリーンショット
ここで、インストール先に USB メモリを指定しています。
今回は USB メモリ全体を利用するため、選択オプションを変更しました。
インストール後の rmformat, zpool status の情報は次のような感じです。
user@opensolaris:~$ uname -a
SunOS opensolaris 5.11 snv_106 i86pc i386 i86pc Solaris
user@opensolaris:~$ cat /etc/release
OpenSolaris 2009.06 snv_106 X86
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 28 January 2009
user@opensolaris:~$ rmformat
Looking for devices...
1. Logical Node: /dev/rdsk/c10t0d0p0
Physical Node: /pci@0,0/pci10f7,8338@1d,7/storage@1/disk@0,0
Connected Device: GH PicoDUAL PMAP
Device Type: Removable
Bus: USB
Size: 15.3 GB
Label:
Access permissions:
2. Logical Node: /dev/rdsk/c8t0d0p0
Physical Node: /pci@0,0/pci10f7,8338@1d,7/cdrom@3/disk@0,0
Connected Device: MATSHITA DVD-RAM UJ-823S 1.50
Device Type: CD Reader
Bus: USB
Size:
Label:
Access permissions:
user@opensolaris:~$ zpool status
pool: rpool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c10t0d0s0 ONLINE 0 0 0
errors: No known data errors
今回の USB ブート環境は Let's Note W4 で作成したわけですが、
試しに別のノートPC(MCJ Co,.Ltd m-book P650)に入れて起動してみたところ、
普通に起動しました。
Let's Note W4 は内臓グラフィックスで、こちらは GeForce 9600M GT だったりしますが、
普通に認識してます。
GrubもUSBのものが使われていて、Windows等を起動する場合は
USBを引っこ抜けば良いので関係ないですし、WindowsのFATで共有領域を作っている場合は
多少テクニックが必要ですが、1つ入れといて使いまわしが効きそうです。
(ひとりごと)
いつの間にか 2009.06 になってますね…。
Posted at 01:23午前 2 08, 2009 by Yasuhiro Fujitsuki in Linux & Solaris |
(EN) OpenSolaris b106 : Installation into USB Memory
OpenSolaris b106 supports to install OSes into USB memory.
The way to install OpenSolaris into USB memory is written in this content.
- Boot OpenSolaris with LiveCD or LiveUSB.
In this time, does not connect USB memory, you want to install OpenSolaris, to PC. - After boot OpenSolaris LiveCD/LiveUSB, connect USB memory for installation.
When OpenSolaris mount usb memory automatically, unmount it.
- Double click Installer icon and start the Installer.
- Install OpenSolaris into USB memory with the Installer.
=========================================================================
Additional Infomation
In my environment, OpenSolaris often output warning message like
" this device cannot boot "
and reboot in the boot phase.
I have decreased the trouble by addition of the usb memory information into /kernel/drv/scsa2usb.conf .
I do not know whether this way is best way to reduce trouble or not.
The way to edit is as follows.
- Boot OpenSolaris with LiveUSB or LiveCD.
- Import rpool with -f option.
$ zpool import -f -a
A Small Tip If two or more pools named "rpool" exists in your pc, for example OpenSolaris and Solaris Express are in the same box, you can import the pool, you want to import, using pool id.
At first, execute zpool import with no option, zpool command output pool informations, which does not be imported.
When two or more pool exists, everything is displayed.
$ zpool import pool: rpool id: 6178916327464335414 state: ONLINE status: The pool is formatted using an older on-disk version. action: The pool can be imported using its name or numeric identifier, though some features will not be available without an explicit 'zpool upgrade'. config: rpool ONLINE c12t0d0s0 ONLINESecond, import pool by zpool import with pool id.
$ zpool import -f 6178916327464335414
- Change mount point of rpool/ROOT/opensolaris from / to legacy.
$ zfs set mountpoint=legacy rpool/ROOT/opensolaris
- mount rpool/ROOT/opensolaris with mount -F zfs command.
$ mount -F zfs rpool/ROOT/opensolaris /mnt
- Add USB memory information into /mnt/kernel/drv/scsa2usb.conf as follows.
At first, find USB memory name by rmformat command.
Name of the USB memory of the following sample is " PicoDUAL " .
$ rmformat Looking for devices... 1. Logical Node: /dev/rdsk/c11t0d0p0 Physical Node: /pci@0,0/pci1462,6510@1d,7/storage@2/disk@0,0 Connected Device: GH PicoDUAL PMAP Device Type: Removable Bus: USB Size: 15.3 GB Label:Access permissions: Second, execute the following command.
$ prtconf -v > /tmp/a
Third, find usb-vendor-id , usb-product-id and usb-revision-id of your USB memory.
In this sample, usb-vendor-id is 00000a6b, usb-product-id is 0000000f and usb-revision-id is 00000110 .
name='usb-product-name' type=string items=1 value='PicoDUAL' name='usb-vendor-name' type=string items=1 value='GH' name='usb-serialno' type=string items=1 value='078C06810B04' name='usb-raw-cfg-descriptors' type=byte items=32 value=09.02.20.00.01.01.00.80.64. 09.04.00.00.02.08.06.50.00.07.05.81.02. 00.02.00.07.05.02.02.00.02.00 name='usb-dev-descriptor' type=byte items=18 value=12.01.00.02.00.00.00.40.6b.0a.0f.00.10.01.01.02.03.01 name='usb-release' type=int items=1 value=00000200 name='usb-num-configs' type=int items=1 value=00000001 name='usb-revision-id' type=int items=1 value=00000110 name='usb-product-id' type=int items=1 value=0000000f name='usb-vendor-id' type=int items=1 value=00000a6bAdd USB memory information and removable=false option into attribute-override-list in /mnt/kernel/drv/scsa2usb.conf like following.
# ANYTHING CHANGED BEFORE THIS POINT MAY BE OVERWRITTEN IN UPGRADE attribute-override-list = "vid=0xa6b pid=0x0f rev=* removable=true";
- umount mountpoint.
$ umount /mnt
- Back mountpoint information to / .
$ zfs set mountpoint=/ rpool/ROOT/opensolaris
=========================================================================
The followings are outputs of rmformat, zpool status.
user@opensolaris:~$ uname -a
SunOS opensolaris 5.11 snv_106 i86pc i386 i86pc Solaris
user@opensolaris:~$ cat /etc/release
OpenSolaris 2009.06 snv_106 X86
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 28 January 2009
user@opensolaris:~$ rmformat
Looking for devices...
1. Logical Node: /dev/rdsk/c10t0d0p0
Physical Node: /pci@0,0/pci10f7,8338@1d,7/storage@1/disk@0,0
Connected Device: GH PicoDUAL PMAP
Device Type: Removable
Bus: USB
Size: 15.3 GB
Label:
Access permissions:
2. Logical Node: /dev/rdsk/c8t0d0p0
Physical Node: /pci@0,0/pci10f7,8338@1d,7/cdrom@3/disk@0,0
Connected Device: MATSHITA DVD-RAM UJ-823S 1.50
Device Type: CD Reader
Bus: USB
Size:
Label:
Access permissions:
user@opensolaris:~$ zpool status
pool: rpool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c10t0d0s0 ONLINE 0 0 0
errors: No known data errors
I was installed OpenSolaris b106 into USB memory on Panasonic Let's note W4.
And, other computer (MCJ Co,.Ltd m-book P650) can boot with this usb memory.
Let's note W4 is centrino technology environment, display size is 1024x768(XGA).
m-book P650 is centrino 2 technology environment, and graphics chip is GeForce 9600M GT,
display size is 1650x1050(WSXGA).
OpenSolaris, install into USB memory, automatically recognize graphics chip and display size and so on.
I think that OpenSolaris USB Memory version is very useful!
Posted at 01:23午前 2 08, 2009 by Yasuhiro Fujitsuki in Linux & Solaris(EN) |