Home > OpenIndiana / Illumos > Altering the GRUB menu in OpenIndiana

Altering the GRUB menu in OpenIndiana

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
  1. zombie343
    October 9, 2011 at 6:10 pm

    Thank you!

  2. Tom Stwart
    August 30, 2012 at 12:20 am

    Thank you very much.

  3. hvn
    September 19, 2012 at 4:44 am

    Right now I have a list in my grub of all releases. How do I get rid of say, pre-release 1 to 4 ?

    • September 19, 2012 at 3:01 pm

      hvn,

      Just remove this whole section from the menu.lst file for example:

      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 =============

      Then this whole entry will be removed from GRUB.

  4. hvn
    October 10, 2012 at 1:47 am

    Thank you. I assume that removing the old kernels is safely done by pkgrm ? Using pkginfo I find some core files (assuming those are the kernel files), but which ones should I remove ?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: