This article presents how to setup a dual booting option using Grub to select between Ubuntu Desktop or Terminal Only modes.
Introduction
Desktop environments make development easy but the execution of an application often does not need the desktop GUI environment. Actually, the desktop environments deteriorate the performance of an application especially if the application needs an RT performance. For the comparison, see another article of mine.
- Tutorial: How to make RT Preempt Linux with Ubuntu 18.04.02
- C++ Class for Loop Time Histogram Statistics
Thus, when we develop an application, the desktop environment is more useful than desktop environment, and otherwise, vise versa. There are multiple ways to transit between these two modes. In my opinion, dual booting is a nice option to achieve this goal. Particularly GRUB allows us for setting up the dual booting option easily.
Setup
Installation of Grub cusotmizer
I am using Grub Customizer to ease the process. For the installation follow the command below:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer sudo apt update sudo apt install grub-customizer
Setup of Grub cusotmizer
Open Grub Customizer by typing “Grub customizer” after press Menu button. Then, you will see menu below:
Then, choose the first option which is for Desktop. Then, click edit (Pencil Icon). You will see some pop-up like below:
Copy the entire boot sequence and paste it at a text editor. We will use this one later. Press “Cancel”, then go back to the main menu and click “New” button “+” Icon. Write the name of new booting configuration and, choose type “Other”. Then paste the text you got from previous Boot option. Here what you need to do is add 3 for the line “linux”. For details, see below:
linux /boot/vmlinuz-4.4.208-rt191esmacat-master-s root=UUID=68f423de-1e99-43a2-a050-58e26b2ffb29 ro 3 quiet splash $vt_handoff
Once you finish, then press “Save” and “Exit”. Then boot again.
Result
Once you boot up, then you will see the menu allowing you to choose different options including “Command-line”. Once you choose the “Command-line” option, you can use Linux without loading desktop environments.
I hope this article helps your project. Good luck!