A easy way to achieve what you want is editing the file /etc/grub.d/40_custom
and create there a manual entry:
menuentry 'Ubuntu (Text mode)' --class ubuntu {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
linux /vmlinuz root=/dev/sda1 ro text
initrd /initrd.img
}
of course, you need to replace sda1 and msdos1 with the correct partition (or UUID if you prefer).
After that run sudo update-grub
and the new entry should be added at the end of the list.
This only creates a manual entry. If you want a automatic entry for each kernel then you must edit /etc/grub.d/10_linux
.
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.
Best Answer
Open a terminal with Ctrl+Alt+T shortcut and type this command and then hit Enter.
The above command will open GRUB default file in gedit text editor. Search for a section like this one:
Remove the
#
mark from the line#GRUB_DISABLE_RECOVERY="true"
. The changed section should look like this:Save the file by pressing Ctrl+S, then exit gedit.
Then again going to the terminal, execute the below command:
Restart to see that the recovery option has gone.