What is the difference between single user mode, recovery mode from GRUB, and booting with Ubuntu install disk?
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.
Related videos on Youtube
user779159
Updated on September 18, 2022Comments
-
user779159 almost 2 years
What is the difference between the following:
- Entering single user mode, e.g.
telinit 1
- Entering recovery mode, at the GRUB screen selecting
Ubuntu ... (recovery mode)
- Using the Ubuntu installation DVD and entering the command line
In what cases would you use the different options for recovery/administration work?
- Entering single user mode, e.g.
-
Eliah Kagan over 11 yearsRoot 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.
chroot
ing is useful for fixing an installed system from a live environment, but it does not constitute an elevation of privileges. -
Eliah Kagan over 11 yearsRunlevels 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.) -
Admin over 11 years@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
chroot
ing 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 -
Gufran over 11 yearsI 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 ?