Ubuntu – The difference between single user mode, recovery mode from GRUB, and booting with Ubuntu install disk

bootgrub2recovery-moderunlevel

What is the difference between the following:

  1. Entering single user mode, e.g. telinit 1
  2. Entering recovery mode, at the GRUB screen selecting Ubuntu ... (recovery mode)
  3. Using the Ubuntu installation DVD and entering the command line

In what cases would you use the different options for recovery/administration work?

Best Answer

Runlevel

Formal explanation
According to wikipedia, The term runlevel refers to a mode of operation in one of the computer operating systems that implement Unix System V-style initialization.

Basically every Multi-User or Time Sharing system allow several users to log in at same time when system is running in multi-user mode (Default mode of modern OS). However there are situations, like kernel upgrade or other maintenance, when you have to make sure that no other user is logged into system that can possibly alter the resources or processes, You can do same by bringing the runlevel down to single user mode so that only a single user is allowed to log in who is authorized to perform the desired task.
You can say that A runlevel is a software configuration of the system which allows only a selected group of processes to exist.
In linux system telinit utility is used to change system runlevel among 6 possible values:

0 System Halt
1 Single user
2 Full multi-user mode (Default)
3 Full multi-user mode
4 Full multi-user mode
5 Full multi-user mode
6 System Reboot

Recovery Mode

Recovery mode is same as the single user mode but it allows only a selected kind of programs to run, Recovery mode make sure that only a program which is absolutely necessary to run the system is loaded, It prevent any other programs to load by default to prevent a possible failure due to any malfunctioned configuration or program.

Live Mode

When you boot using a live linux CD you have a completely different operating system and configuration than that of pre-installed on your system, This is because of the fact that you are actually using the operating system made available through the live CD.

You can use telinit to switch between Single User mode or Multi user mode when there are more than one users who use the same Operating system and it is necessary to perform a task which might be interrupted by another user if logged in, such as fsck or kernel upgrade etc.

Rescue mode is best to overcome most of the system malfunctions such as an installed package which can prevent system to boot as it allows you to log into system even if you cannot boot into regular mode

You can boot into live mode for various testing or diagnostic purpose. Live mode provides you access to system hardware and even the installed OS using the chroot utility. When nothing helps and you cannot find a way to log into the system you can boot into live mode and chroot into the installed system.