Loading...
Showing posts with label pkg image-update. Show all posts
Showing posts with label pkg image-update. Show all posts

2010-02-06

Update to OpenSolaris preview release, development build 132

OpenSolaris preview Development build b132 がリリースされた。
さっそく、 My Notebook PC (dev. b128a) を b132 にアップデートしてみる。
昨年末以来話題沸騰?の b130, b131 で問題となっていた、日本語ロケール(ja_JP.UTF-8) を設定すると GDM(Gnome Display Manager) ログインができない!という Bug は フィックスされているそうな。

Release Note はここを閲覧 ↓

[indiana-discuss] OpenSolaris package repository update, development build 132, x86/x64/SPARC
*.iso, *.usb イメージはここからダウンロードできる。↓
Thur Feb 04 2010 New OpenSolaris preview, based on build 132, is available!
 Description Arch  Download file
 ISO Universal x86  osol-dev-132-x86.iso
 USB Universal x86  osol-dev-132-x86.usb
 Automated Installer x86  osol-dev-132-ai-x86.iso
 Automated Installer USB  x86  osol-dev-132-ai-x86.usb
 Automated Installer   SPARC   osol-dev-132-ai-sparc.iso
 MD5 Hash all  md5sums_132.txt
# アップデート前の環境:
dev. build b128a をクリーンインストールしたのちに、gcc-dev, SUNWgftp のみ追加インストールした。

$ uname -a
SunOS satellite 5.11 snv_128a i86pc i386 i86pc Solaris

Platform: Toshiba dynabook Satellite J50 173L/5X

Stage-1: Development Build のアップデート(b128a to b129):
Stage-2: Development Build のアップデート(b129 to b132):
# pkg install SUNWipkg して # pkg image-update するのが定石であるが、今回は別法で build b129 にアップデートした後に、さらに b132 にアップデートを試みる。
*.iso または *.usb イメージをダウンロードせずに、アップデート対象の新しい boot environment を作成し、これを /mnt directory にマウントしてから、アップデートする build 対応の entire パッケージをインストールすることで、Dev. build をアップデートしてしまおうというものだ。

参考にしたのはここ ↓
The Observatory / Updating To A Specific Development Build
Stage-1: Development Build のアップデート(b128a to b129):
 
Step-1: root になる。

baian@satellite:~$ pfexec su

GDM (Gnome Display Manager) を一時的に無効にして、コンソールで作業を行なう。

baian@satellite:~# svcadm disable -t svc:/application/graphical-login/gdm:default

コンソールにログイン後に、Locale を Eng(USA): C locale に変更しておく。
baian@satellite:~# env LC_ALL=C

Step-2: 現在の IPS repository が /dev であることを確認しておく。
baian@satellite:~# pkg refresh --full
baian@satellite:~# pkg publisher
PUBLISHER                         TYPE     STATUS  URI
opensolaris.org      (preferred)  origin   online  http://pkg.opensolaris.org/dev/

baian@satellite:~# pkg install SUNWipkg
No updates necessary for this image.

Step-3: アップデートしたい build 対応の新しいブート環境(BE:boot environment) を作成する。
baian@satellite:~# beadm create snv_129



Step-4: 新しいブート環境を /mnt directory にマウントする。
baian@satellite:~# beadm mount snv_129 /mnt

Step-5: マウントされた新しいブート環境に対応した entire package をインストールする。

entire パッケージは、OpenSolaris distro. を生成させるのに必要なすべてのその他のパッケージの依存性を取り持つ meta-package なのだす。
それで、entire package をインストールすれば、Distribution 全体を効果的にインストールすることができる。

# entire package の内容を確認する。

baian@satellite:~# pkg contents -m entire | more

# すべてのリリースに対応した entire package のリストを閲覧するには、
baian@satellite:~# pkg list -avf entire

FMRI                                                                    STATE      UFOXI
pkg://opensolaris.org/entire@0.5.11,5.11-0.132:20100130T123058Z  known     u----
pkg://opensolaris.org/entire@0.5.11,5.11-0.131:20100115T044400Z  known     u----
pkg://opensolaris.org/entire@0.5.11,5.11-0.130:20091219T044839Z  known     u----
pkg://opensolaris.org/entire@0.5.11,5.11-0.129:20091205T134302Z  known     u----
pkg://opensolaris.org/entire@0.5.11,5.11-0.128:20091125T051747Z  installed -----
pkg://opensolaris.org/entire@0.5.11,5.11-0.127:20091111T131831Z  known     u----
pkg://opensolaris.org/entire@0.5.11,5.11-0.126:20091022T214456Z  known     u----

# ここで、dev. b129 に移行させるために、/mnt に新たにマウントしたブート環境に適応した entire package をインストールする。ここでは、entire@0.5.11,5.11-0.129 を選択する。
baian@satellite:~# pkg -R /mnt install entire@0.5.11,5.11-0.129


Step-6: /mnt にインストールした build b129 を有効にするために boot archive をアップデートする。
baian@satellite:~# bootadm update-archive -R /mnt

updating /mnt//platform/i86pc/boot_archive
updating /mnt//platform/i86pc/amd64/boot_archive

Step-7: 新しいブート環境:BE をアンマウントする。
baian@satellite:~# beadm unmount snv_129

Step-8: 新しいブート環境:BE をアクティブにする。
baian@satellite:~# beadm activate snv_129
baian@satellite:~# beadm list
BE          Active Mountpoint Space   Policy Created        
--          ------ ---------- -----   ------ -------        
opensolaris N      -          154.58M static 2010-02-06 12:13
snv_129     R      -          6.09G   static 2010-02-06 15:11

Step-9: システムを再起動する。
baian@satellite:~# reboot (or # init 6)

Step-10: Grub Boot Menu で dev.b129 を選択して起動させる。
baian@satellite:~$ cat /rpool/boot/grub/menu.lst
splashimage /boot/grub/splash.xpm.gz
background 215ECA
timeout 15
default 2
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title OpenSolaris Development snv_128a X86
findroot (pool_rpool,2,a)
bootfs rpool/ROOT/opensolaris
# splashimage /boot/solaris.xpm
# foreground d25f00
# background 115d93
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS -v
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------
title Windows XP professional +SP3
    rootnoverify (hd0,0)
    chainloader +1

title OpenSolaris preview Development based on snv_129 x86
findroot (pool_rpool,2,a)
bootfs rpool/ROOT/snv_129
# splashimage /boot/solaris.xpm
# foreground d25f00
# background 115d93
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS -v
module$ /platform/i86pc/$ISADIR/boot_archive
#============ End of LIBBE entry =============


baian@satellite:~$ more /etc/release
                       OpenSolaris Development snv_129 X86
           Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 04 December 2009

baian@satellite:~$ pfexec beadm list
BE          Active Mountpoint Space   Policy Created        
--          ------ ---------- -----   ------ -------        
opensolaris -      -          154.58M static 2010-02-06 12:13
snv_129     NR     /          6.10G   static 2010-02-06 15:11

Stage-2: Development Build のアップデート(b129 to b132):
Stage-1 の Dev. b128a から b129 へのアップデート手順 Step-1 〜 Step-10 と同様に作業を進める。

Step-1: baian@satellite:~$ pfexec su
Step-2: baian@satellite:~# pkg install SUNWipkg
Step-3: baian@satellite:~# beadm create snv_132

Step-4: baian@satellite:~# beadm mount snv_132 /mnt
Step-5: baian@satellite:~# pkg -R /mnt install entire@0.5.11,5.11-0.132
Step-6: baian@satellite:~# bootadm update-archive -R /mnt
Step-7: baian@satellite:~# beadm unmount snv_132
Step-8: baian@satellite:~# beadm activate snv_132
        baian@satellite:~# beadm list
Step-9: baian@satellite:~# reboot (or # init 6)
Step-10: Boot up from OpenSolaris dev. build b132.

とりあえず、OpenSolaris dev.b132 にアップデートできた。
追加パッケージのインストールとアプリケーションの諸設定はのちほど。

baian@satellite:~$ more /etc/release
                       OpenSolaris Development snv_132 X86
           Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                            Assembled 29 January 2010

baian@satellite:~$ cat /rpool/boot/grub/menu.lst

splashimage /boot/grub/splash.xpm.gz
background 215ECA
timeout 15
default 3
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title OpenSolaris Development snv_128a X86
findroot (pool_rpool,2,a)
bootfs rpool/ROOT/opensolaris
# splashimage /boot/solaris.xpm
# foreground d25f00
# background 115d93
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS -v
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------

title Windows XP professional +SP3
    rootnoverify (hd0,0)
    chainloader +1

# Unknown partition of type 0 found on /dev/rdsk/c5d0p0 partition: 4
# It maps to the GRUB device: (hd1,3) .

title OpenSolaris preview Development based on snv_129 x86
findroot (pool_rpool,2,a)
bootfs rpool/ROOT/snv_129
# splashimage /boot/solaris.xpm
# foreground d25f00
# background 115d93
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS -v
module$ /platform/i86pc/$ISADIR/boot_archive
#============ End of LIBBE entry =============
title OpenSolaris preview Development based on snv_132 x86
findroot (pool_rpool,2,a)
bootfs rpool/ROOT/snv_132
# splashimage /boot/solaris.xpm
# foreground d25f00
# background 115d93
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS -v
module$ /platform/i86pc/$ISADIR/boot_archive
#============ End of LIBBE entry =============

2009-06-01

OpenSolaris preview 2009.06 build on snv_111a, "pkg image-update" to snv_111b

On Sunday, 2009-May-31, via IPS, executed "# pkg image-update" command, then the kernel was upgraded snv_111a to snv_111b.

一昨日(2009-May-31)、パッケージ更新マネージャーの指示によって、アップデート有効なパッケージ情報を得る。
そこで、"pkg image-update" して新しいBE opensolaris-5 が作成された。システムの再起動後に、kernel が snv_111b にアップグレードされたことを知った。
これをデフォルトにして運用して行くことにした。ついでに ブートメニューを編集しておく。
以下は、この作業手順の覚え書きである。

$ pfexec pkg refresh --full
$ pfexec pkg install pkg:/SUNWipkg@0.5.11,5.11-0.111:20090508T161015Z
$ pfexec pkg image-update
$ reboot
$ pfexec beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
opensolaris - - 49.27M static 2009-04-20 16:49
opensolaris-4 - - 22.27M static 2009-05-07 10:11
opensolaris-5 NR / 18.38G static 2009-05-31 00:57

$ pfexec zfs list
NAME                       USED   AVAIL    REFER   MOUNTPOINT
rpool                     29.4G   9.73G     83K   /rpool
rpool/ROOT                15.0G   9.73G     19K   legacy
rpool/ROOT/opensolaris    49.3M   9.73G   7.02G   /BE/opensolaris
rpool/ROOT/opensolaris-4  22.3M   9.73G   11.3G   /
rpool/ROOT/opensolaris-5  14.9G   9.73G   11.4G   /
rpool/dump                1019M   9.73G   1019M   -
rpool/export              12.4G   9.73G     21K   /export
rpool/export/home         12.4G   9.73G   12.4G   /export/home
rpool/swap                1019M   10.1G    595M   -

Both opensolaris-4 and opensolaris-5 ware mounted in the "/" directory.
So to mount the only one BE:opensolaris-5 in there, took the following procedures.

Move the previous BE: opensolaris-4 to the directory /BE
# zfs set mountpoint=/BE/opensolaris-4 rpool/ROOT/opensolaris-4
# zfs mount rpool/ROOT/opensolaris-4
# zfs unmount rpool/ROOT/opensolaris-4

Then only the BE:opensolaris-5 ware mounted in the "/" directory.
$ pfexec zfs list
NAME                       USED    AVAIL   REFER   MOUNTPOINT
rpool                      29.4G   9.73G     83K    /rpool
rpool/ROOT                 15.0G   9.73G     19K    legacy
rpool/ROOT/opensolaris     49.3M   9.73G   7.02G    /BE/opensolaris
rpool/ROOT/opensolaris-4   22.3M   9.73G   11.3G    /BE/opensolaris-4
rpool/ROOT/opensolaris-5   14.9G   9.73G   11.4G    /
rpool/dump                 1019M   9.73G   1019M    -
rpool/export               12.4G   9.73G     21K    /export
rpool/export/home          12.4G   9.73G   12.4G    /export/home
rpool/swap                 1019M   10.1G    595M    -

BE(Boot Environment) の確認:confirm the current BE.
$ pfexec beadm list
BE          Active  Mountpoint  Space  Policy  Created
--          ------ -----------  -----  ------  -------
opensolaris -       -           49.27M static 2009-04-20 16:49
opensolaris-4 -     -           22.27M static 2009-05-07 10:11
opensolaris-5 NR /              18.38G static 2009-05-31 00:57

$ uname -a
SunOS xxxxxx 5.11 snv_111b i86pc i386 i86pc Solaris

$ more /etc/release
OpenSolaris 2009.06 snv_111b X86
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 07 May 2009  

Raw Disk Device の確認:
$ pfexec format
Searching for disks...done
AVAILABLE DISK SELECTIONS: 0.
c9d0 /pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0 
Specify disk (enter its number): 0 
selecting c9d0 
NO Alt slice No defect list found [disk formatted, no defect list found]
/dev/dsk/c9d0s0 is part of active ZFS pool rpool. 
Please see zpool(1M).  

GRUB ブートメニューの編集 (Edit my grub boot menu)  

$ pfexec vi /boot/grub/menu.lst 
------------------------------------------------------------------------

## Triple boot system: opensolaris preview snv_111b, ubuntu 9.04 Jaunty, Windoz XP SP3
## Grub Boot Menu has been modified by Baian on Sunday, May/31th/2009
##

splashimage /boot/grub/splash.xpm.gz 
background 215ECA 
timeout 15 
default 0 

# title opensolaris-5 verbose mode 
title opensolaris 2009.06 based on snv_111b (verbose mode) 
findroot (pool_rpool,2,a) 
bootfs rpool/ROOT/opensolaris-5 
# splashimage /boot/solaris.xpm 
# foreground d25f00 
# background 115d93 
# kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS -v
module$ /platform/i86pc/$ISADIR/boot_archive

# Unknown partition of type 5 found on /dev/rdsk/c9d0p0 partition: 4 
# It maps to the GRUB device: (hd0,3) . 

##
## ====== Added from ubuntu 9.04 /boot/grub/menu.lst =====

# title Ubuntu 9.04 Jaunty Jackalope, kernel 2.6.28-11-generic (quiet splashy mode)
# uuid dec16e4b-f793-46ad-ac09-09f80f8e41ba
# root (hd0,4)
# kernel /vmlinuz-2.6.28-11-generic root=UUID=3496cec6-c9bf-448c-96e2-b3ff63f4d1b8 ro quiet splash
# initrd /initrd.img-2.6.28-11-generic
# quiet

title Ubuntu 9.04 Jaunty Jackalope, kernel 2.6.28-11-generic 
root (hd0,4) # add boot directory
# uuid dec16e4b-f793-46ad-ac09-09f80f8e41ba
kernel /vmlinuz-2.6.28-11-generic root=UUID=3496cec6-c9bf-448c-96e2-b3ff63f4d1b8 NETWORKING_IPV6=no ro video=vesa:ywrap,mtrr vga=0x317
initrd /initrd.img-2.6.28-11-generic

title Ubuntu 9.04 Jaunty Jackalope, kernel 2.6.28-11-generic (recovery mode) 
root (hd0,4) # add boot directory
# uuid dec16e4b-f793-46ad-ac09-09f80f8e41ba
kernel /vmlinuz-2.6.28-11-generic root=UUID=3496cec6-c9bf-448c-96e2-b3ff63f4d1b8 NETWORKING_IPV6=no ro single video=vesa:ywrap,mtrr vga=0x317
initrd /initrd.img-2.6.28-11-generic

title Ubuntu Jaunty, memtest86+
#uuid dec16e4b-f793-46ad-ac09-09f80f8e41ba
root (hd0,4)
kernel /memtest86+.bin
quiet

title Windows XP Professional +SP3
rootnoverify (hd0,0)
chainloader +1 

##===== End of ubuntu 9.04 added from /boot/grub/menu.lst =====

title opensolaris preview 2009.06 based on snv_111a (prev) 
# title opensolaris-4 
findroot (pool_rpool,2,a) 
bootfs rpool/ROOT/opensolaris-4 
# splashimage /boot/solaris.xpm 
# foreground d25f00 # background 115d93 
# kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS, -v 
module$ /platform/i86pc/$ISADIR/boot_archive

#============ End of LIBBE entry ======================== 


GRUB の再インストール 
$ pfexec /sbin/installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/dsk/c9d0s0
$ reboot

*Note:
Platform/Dell Latitude D410, Intel Pentium M1.6GHz, Intel 915GM, SODIMM 2045MB(533MHz), 40GB/160GB

追記:2009-June-03(Wed) 一連のパッケージアップデートによって、OpenSolaris 2009.06 正式版にアップグレードされた模様である。