If you have installed multiple systems and want to prioritize deepin as a startup item, or if you encounter the problem that the default startup item is changed to "System Recovery" and in some cases the default startup item cannot be changed in the Control Center, you may want to take a look at this tutorial.

This tutorial was contributed by deepin community users Peng Ziming and hotime, and provides 2 solutions, the following is based on deepin V23 Beta2.


Using Grub Customizer

1. Install Grub Customizer

deepin V20 can be obtained from the app store, and deepin V23 can be installed by executing the following commands in the terminal (note that it will not show up when you enter your password):

sudo apt install grub-customizer


2. Open the application and enter the password for authorization


3. Modify startup items

Move specific startup items up or down in "List Configuration" (for the default startup of "System Recovery", you can move the Windows item up one place); or switch to "General Settings". or switch to "General Settings", change the "Predefined" of "Default items" to a specific startup item, and then click "Save".


Modify the configuration file

Open /etc/default/grub with an editor and change the value after GRUB_DEFAULT=, which is the number of the default startup item in the list of startup items (if you don't know it, you can reboot and check it against the startup menu. For problems with the default startup "System Recovery", add 1 to this value, e.g. replace 2 with 3). Take the Nano editor as an example, execute sudo nano /etc/default/grub in the terminal to open the file; after editing, press Ctrl+O, press Enter, and then press Ctrl+X.

After modification, execute the following command in the terminal to update Grub to make the configuration take effect:

sudo update-grub


User hotime provided another idea for modification:

Open a terminal, execute  "grep GRUB_DEFAULT /etc/default/grub", observe the value after GRUB_DEFAULT in the terminal output, if it is 2, replace it with 3, if it is 3, replace it with 4, and so on.

Note: If the current default startup item is "System Recovery", the number will almost always be 2. Changing it to 3 is fine, because the original startup item was inserted by "System Recovery" and then deferred to 3, and the number of the default startup item is not automatically changed in Grub.

Once the changes are complete, run  "sudo update-grub" in the terminal to make the changes take effect.


Commands involved:

sudo sed -i 's/GRUB_DEFAULT=2/GRUB_DEFAULT=3/' /etc/default/grub
sudo update-grub


Of course, if the above paragraph looks troublesome, you can also choose to directly modify to 0, that is, the first startup item is set as the default startup item, so that the Control Center can modify the default startup item normally.

sudo sed -i 's/GRUB_DEFAULT=[0-9]/GRUB_DEFAULT=0/' /etc/default/grub
sudo update-grub


To avoid the above problem, change the default startup item to the first startup item (deepin) in the Control Center > General > Startup menu before updating your system.


Content source: deepin community

Reprinted with attribution

Leave a Reply