Archive

Archive for the ‘OpenIndiana / Illumos’ Category

Altering the GRUB menu in OpenIndiana

September 29, 2011 6 comments

So you have just gone and updated to the latest build of OpenIndiana and now you reboot to find that your GRUB menu just lists the new version as openindiana-1, it doesnt seem very helpful if you need to change to a older or newer build in the future.

We want to be able to change the name to something more informative, this is quite simple to do, we just need to alter the GRUB boot menu and update the title information for the entries in the menu.

Firstly we need to open the terminal and give ourselves root permissions by typing “su” and our root password:

OpenIndiana (powered by illumos)    SunOS 5.11    oi_151a    September 2011
scotty@storage-server:~$ su
Password:
scotty@storage-server:~#

Once we have root access type in the below to get to the GRUB folder:

cd /rpool/boot/grub

Now that we are in the correct folder it is best to backup the exising menu in case something goes wrong, do the below:

cp menu.lst menu.lst.orig

Now we need to edit the menu.lst, to do this type the below:

gedit menu.lst

Now we will be presented with the Gnome Editor and we can modify the menu as required, pleasedont change anything else than mentioned as you can break your system. If you want to change the default timeout to select the Boot Environment you may also change the timeout at the top of the file. I have updated the menu names something that is easier to recognise when starting my server. All changes I have made are in blue. Your menu.lst file will most likely look different to mine as I have a mirror for my OS drives and I have done two updates to my system so there will be more entires in this file.

splashimage /boot/grub/splash.xpm.gz
background 215ECA
default 2
timeout 10
#———- ADDED BY BOOTADM – DO NOT EDIT ———-
title OpenIndiana Development oi_147 X86
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/openindiana
splashimage /boot/solaris.xpm
foreground d25f00
background 115d93
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
module$ /platform/i86pc/$ISADIR/boot_archive
#———————END BOOTADM——————–

# Unknown partition of type 0 found on /dev/rdsk/c5d0p0 partition: 2
# It maps to the GRUB device: (hd0,1) .

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

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

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

# Unknown partition of type 0 found on /dev/rdsk/c6d0p0 partition: 2
# It maps to the GRUB device: (hd1,1) .

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

# Unknown partition of type 0 found on /dev/rdsk/c6d0p0 partition: 4
# It maps to the GRUB device: (hd1,3) .
title OpenIndiana Development oi_148 X86
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/openindiana-1
splashimage /boot/solaris.xpm
foreground d25f00
background 115d93
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
module$ /platform/i86pc/$ISADIR/boot_archive
#============ End of LIBBE entry =============
title OpenIndiana Development oi_151 X86
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/openindiana-2
splashimage /boot/splashimage.xpm
foreground d25f00
background 115d93
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
module$ /platform/i86pc/$ISADIR/boot_archive
#============ End of LIBBE entry =============

Once we have made the required changes make sure you save the changes and close Gnome Editor.

Lastly to check that the changes have been made simply reboot OpenIndiana with  the below command:

reboot

Hope this was helpful, its made it easier to identify some issues I have had of recent.

Advertisements

OpenIndiana oi_151a officially released

September 16, 2011 Leave a comment

The OpenIndiana team has offically announced the release of the OpenIndiana oi_151a, an updated fork of the community developed OpenSolaris, now supporting Kernel Virtual Machine (KVM).

DISCLAIMER: I take no responsibilty for any data loss during this process, it is assumed that you make regular backups of all data in case of data loss.

Updating your exisiting build is very simple, just enter these commands in terminal:

pfexec pkg install pkg:/package/pkg
pfexec pkg refresh --full
pfexec pkg image-update -v

This may take several minutes to complete but once completed you can check the version with the below command:

uname -a

You should then see the version running on your system displayed similar to the below:

SunOS <systemname> 5.11 oi_151a i86pc i386 i86pc

You are now running the latest version of OpenIndiana 🙂

PS. Dont forget about your running zones also, you can follow my post here to update your zones.

Updating an OpenIndiana Zone

September 7, 2011 1 comment

So you have updated your main system to the latest bleeding edge build but your zone is still running an old version and you want all the updates and fixes from the latest version. Its a simple few steps and we are able to update our zone and keep both the sytem and zone on the same version.

DISCLAIMER: I take no responsibilty for any data loss during this process, it is assumed that you make regular backups of all data in case of data loss.

Firstly we need to ensure that the zone is not running, this can be checked with the below terminal commands:

zoneadm list

This will list all of the currently running zones, if it is not running we can issue the below command to see all of the zones installed on this system:

zoneadm list -i

Now that we know the zone name we must ensure it is not running, to stop the zone do the below, if your zone is currently not running please sip this command. Replace <zonename> with the name of the zone show from the above commands:

zoneadm -z <zonename> halt

This will stop our zone and allow us to make changes to it. Now we need to find the location of the zone on the system, this is done with the below:

zfs list

Look for the mountpoint which should be something like the below:

/zones/<zonename>

Yours will most likely differ depending on the location of the zone. Now we need to issue the below to commence the update of the zone:

pkg -R /zones/<zonename>/root image-update -v

You will see something similar to the below when the update is completed:

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                              139/139 15502/15502  144.5/144.5

PHASE                                        ACTIONS
Removal Phase                              4238/4238
Install Phase                            14695/14695
Update Phase                               7913/7913

PHASE                                          ITEMS
Package State Update Phase                   264/264
Package Cache Update Phase                   127/127
Image State Update Phase                         2/2

PHASE                                          ITEMS
Reading Existing Index                           8/8
Indexing Packages                            139/139
Indexing Packages                            139/139
Optimizing Index…

PHASE                                          ITEMS
Indexing Packages                            137/137

—————————————————————————
NOTE: Please review release notes posted at:

http://docs.sun.com/doc/821-1479
—————————————————————————

Now finally we can boot the zone and log into the zone:

zoneadm -z <zonename> boot
zlogin -C <zonename>

When logged in to the zone issue the below command:

uname -a

You should see something similar to the below to confirm the upgrade of the zone:

SunOS <zonename> 5.11 oi_151a i86pc i386 i86pc

Hope this helps to make things nice and easy.

Updating OpenIndiana from 147 to 151

September 7, 2011 Leave a comment

So I finally decided to finally go ahead and update my OpenIndiana file server and had experienced a multitude of problems, luckily most of them were easy fixes due to stupid mistakes made to my permissions on the filesystem. Anyways moving on to the more important stuff like getting ready to update the image from 147 to 151.

DISCLAIMER: I take no responsibilty for any data loss during this process, it is assumed that you make regular backups of all data in case of data loss.

Firstly we need to make sure we have root privledges for the system, this can be achieved by openning the Terminal and entering the below:

scotty@storage-server:~$ su
Password: <enter your password>
scotty@storage-server:~#

You will notice the prompt change slightly to show that we now have root access.

Now that we have root access we need to ensure that the latest version of pkg is installed, to update do the following:

pkg install pkg:/package/pkg

Now we need to update the package repositories to get the latest bleeding edge development files:

pkg set-publisher -O http://pkg.openindiana.org/dev-il openindiana.org
pkg set-publisher --non-sticky opensolaris.org
pkg refresh --full

Finally we can update to the latest packages using the below:

pkg update-image -v

This will take a few minutes depending on the speed of your Internet conection and the packages that need to be downloaded and updated.

Hope this has helped to do an upgrade of your system to the latest bleeding edge Illumos 151 build of OpenIndiana.

%d bloggers like this: