• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Boot Single User Mode from the Grub Boot Loader in Solaris 10

by admin

By default, in Solaris x86 10 1/06 the new GRUB bootloader does not provide a fully functional single user boot option in the menu that is presented upon booting. The default menu only has a GRUB “Safe Mode” boot option to choose from, but not the option to choose to boot to single user mode. A true “Single User” boot option is key for many users to apply patches and perform other administration needs.

The below steps will show you the procedures to boot into single user mode using GRUB. The first method shows how to do this temporarily, and the other shows how to do this permanently by modifying the GRUB menu.lst file. This is also known to work with Solaris 10 3/05 and the latest Solaris 10_x86 Recommended Patch Cluster (Version May/08/06 at least) installed.

1. Temporary Method

To boot single user mode temporarily from the GRUB menu, boot the system up and when the GRUB menu appears, type “e” for edit. You will then see a screen that will have “GNU GRUB plus a version number” centered at the top (i.e.GNU GRUB version 0.95), plus something like the below.

root (hd0,2,a) kernel /platform/i86pc/multiboot module /platform/i86pc/boot_archive
NOTE: The “root (hd0,2,a)” line in the example above may look different for your server.

Then use the up and down arrows to highlight the “kernel….multiboot” line entry and then again type “e” for edit. Once in edit mode add a space and “-s” on the end of the line, and hit enter. The new line should look like this:

grub edit> kernel /platform/i86pc/multiboot -s

After doing so, push the enter key. Back at the grub menu type “b” to boot to the modified line item. This will take you into a “real” single user mode boot level.

2. Permanent Method

To be presented with the option to boot single user mode on every boot, and thus make this change permanent, you would edit the /boot/grub/menu.lst file (grub boot loader) and add the lines below to give the single user mode boot option. If you are using ZFS for your boot disks your menu.lst will be in the location /rpool/boot/grub/menu.lst.

Note: Your entries in the menu.lst file will would look something like the example below, however, the root entry which points to the partition to boot should correspond to your current entries and may vary slightly from this example.

First, be sure to copy your existing menu.lst file:

# cp /boot/grub/menu.lst /boot/grub/menu.lst.old

When that is done, then you can edit the file with vi:

# vi /boot/grub/menu.lst

These are the lines to add to the file below the existing entries that are already there:

title Solaris 10 1/06 Single User Boot
root (hd0,2,a)   
kernel /platform/i86pc/multiboot -s  
module /platform/i86pc/boot_archive

When you add the above to the menu.lst and then boot your server, your GRUB boot menu will have a new line at the bottom reflecting the entry you put after “title”. In this example it will look like this:

"Solaris 10 1/06  Single User Boot"

The following outputs represent what you’ll see from GRUB if you enter “e” while highlighting the “Solaris 10 1/06 Single User Boot” entry:

root (hd0,2,a)   
kernel /platform/i86pc/multiboot -s 
module /platform/i86pc/boot_archive

You can then boot into single user mode in the future by simply highlighting the “Solaris 10 1/06 Single User Boot” entry and hitting enter. You will then see output like the following indicating you are entering single user mode:

SunOS Release 5.10 Version Generic_Patch 64-bit Copyright 1983-2005 Sun Microsystems, Inc.
All rights reserved. Use is subject to license terms. Booting to milestone "milestone/single-user:default".
Hostname: n30
Requesting System Maintenance Mode
SINGLE USER MODE
Root password for system maintenance (control-d to bypass):
single-user privilege assigned to /dev/console.
Entering System Maintenance Mode May 15 21:13:26
su: 'su root' succeeded for root on /dev/console
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
#

Filed Under: Solaris

Some more articles you might also be interested in …

  1. How to install a ZFS boot block in solaris
  2. Complete hardware reference : T1000 / T2000 / T5120 / T5140 / T5220 / T5240 / T5440
  3. How to setup a chroot ssh/sftp for specific users in Solaris 10
  4. Howto Verify If a Bootblk is Installed on the Boot Disk (SPARC)
  5. Troubleshooting solaris 10 boot issues related to SMF and milestones
  6. How To Delete Files on a ZFS Filesystem that is 100% Full
  7. How to Check and Analyze Memory Usage in Solaris
  8. Solaris 10 boot process : x86/x64
  9. The ultimate Solaris jumpstart troubleshooting guide
  10. How to Collect a Forced Crash Dump of a Hanging Solaris Guest LDom

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright