Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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.

share|improve this answer
1  
Runlevels pertain to the init daemon. In Ubuntu, init is provided by Upstart. In what ways are traditional runlevels preserved in Ubuntu, and how are they not preserved? (If you wish, I'd recommend adding an explanation of this to your question.) –  Eliah Kagan Dec 31 '12 at 13:13
    
I am not quite sure about your question In what ways are traditional runlevels preserved in Ubuntu, and how are they not preserved ? Could you please elaborate a bit ? There is an ordered list of runlevels in my answer which is for Ubuntu, are you asking about Other distros than Ubuntu ? –  Gufran Dec 31 '12 at 15:11
  1. Single User Mode is a mode in which a multi-user system is booted into a single superuser environment. When in this mode, quite a few non-essential services are not run, such as the networking services (which also prevents an outside intrusion). It is often used when exclusive access to disks are required; for example when one needs to run fsck, as no other users will have access to the disks.
  2. Recovery Mode is essentially the same as Single User Mode.
  3. Getting a command line on an Ubuntu Live CD is a completely different matter. You have a session on the Live Environment that has been loaded into the memory from the CD. While you may have root privileges (if you use su to get a root shell), they are root privileges on the Live Environment, not on your installed environment. This is normally used if a problem has stopped you accessing your installation, in which case you would use the tools in the live environment directed at the installation; for example if you have killed GRUB, you could run sudo grub-install /dev/sda && sudo update-grub to fix it. If your problem can only be solved with access to the installed system, and you cannot access it, you can use chroot to make your terminal emulator act as if you are in the installed environment.

Too long; didn't read: If you can boot into the system, and you have a problem, use recovery mode (no-one really uses single user mode). If you can't boot into the system, and you need to fix something that doesn't need direct access to the system, use a Live CD. If you can't boot into the system, and you need to fix something that does need direct access to the system, use a Live CD and chroot.

share|improve this answer
1  
Root privileges on the live CD translate into root privileges on the installed system, as there are no restrictions on what the live CD can access on the installed system. Encryption on the installed system can make it difficult (sometimes even impossible) to recover data, but this does not distinguish a live CD being used to access an installed system from single user mode or recovery mode. chrooting is useful for fixing an installed system from a live environment, but it does not constitute an elevation of privileges. –  Eliah Kagan Dec 31 '12 at 13:10
    
@Eliah Kagan What I was trying to explain was that when you are using a live environment, you are not in the installed systems environment, and that chrooting effectively drops you into your installed system, so although your privileges are the same you can act as if you are logged in to your installed system, rather than the live environment –  jdp407 Dec 31 '12 at 13:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.