• 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

CentOS / RHEL 6 : how to start the services interactively during boot (to disable/abort some services)

by admin

There is an option with RHEL / CentOS 6 to start the services interactively during system boot up. We can use it to troubleshoot any booting issues related to services. By default, this feature is not available and you need to enable it using either of the 2 methods described below.

Method 1 – Using Keypress during boot

This method involves editing the /etc/sysconfig/init file. Assign value “yes” to the parameter PROMPT in order to boot system interactively. For example :

# vi /etc/sysconfig/init
# Set to anything other than 'no' to allow hotkey interactive startup...
PROMPT=yes

The above parameter is set to “yes” by default. Once you have confirmed that it is set to yes, you have to interrupt the booting process using the key “i” a couple of time and start the services interactively.

start services interactively CentOS 6

Type “Y” to allow a service to start, “N” to stops a service from starting and “C” to exit from the interactive startup.

Method 2 – adding kernel parameter

Alternatively, we can append “confirm” to the end of the kernel boot line either during boot (at GRUB) or in the /etc/grub.conf file to have it persistent.

1. add kernel parameter in GRUB during boot
To do this, restart the system and when the GRUB splash screen comes:

1. Select/highlight the kernel you wish to boot using the up/down arrow keys. In my case, I have only one kernel to select :)

select kernel to boot service interactively

2. Press the e key to edit the entry. Select/highlight the line starting with the word kernel.

edit kernel to boot services interactively

3. Press the e key to edit the line. Add confirm word to the end of line. Press ENTER to accept the changes.

add confirm to kernel line to boot services interactively

7. Press the b key to boot the kernel with the modified command line. You should enter into the interactive mode while starting services.

start service interactively RHEL 6

2. Add kernel parameter in /etc/grub.conf file
Another way to add kernel parameter is to edit the /etc/grub.conf file and add the confirm at the end of the kernel line which you want to boot up with. For example :

kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/vg_os-lv_os rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg_os/lv_os  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet confirm

Reboot the system to check if the settings have been applied.

Filed Under: Linux

Some more articles you might also be interested in …

  1. checkupdates : Command Examples in Linux
  2. What is Anacron and usage of Anacron in Linux
  3. Detect rootkits & malware on Linux Servers using rkhunter
  4. bluetoothctl Command Examples in Linux
  5. flameshot: command not found
  6. debsecan Command Examples in Linux
  7. How to enable SFTP Logging without chroot in CentOS/RHEL
  8. chage: command not found
  9. Reducing/Limiting the CPUs in CentOS/RHEL 5,6
  10. faketime Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • fprintd-delete Command Examples in Linux
  • fprintd-delete: command not found
  • foreman: command not found
  • foreman Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright