You can use an easy-to-use the GUI application called Grub Customizer to make your life a little bit easier. As the name suggests, you can do much more than just reordering GRUB menu entries with it.
You can install it by:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
(See Ask Ubuntu question Are PPA's safe to add to my system and what are some “red flags” to watch out for?.)
There is an How-To Geek article about it, How to Configure the Linux GRUB 2 Boot Menu the Easy Way. Take a look at it if you're interested. Also, there is a solved thread on the Ubuntu Forums, Change boot order in GRUB 2 that mentions this tool.
Here are some screenshots:
Some troubleshooting:
The Grub Customizer settings may work only from within the latest Linux/Ubuntu installation, the one that installed the Grub.
For example, if somebody has two OS-es installed (Windows and Ubuntu), and then installs a third OS (Manjaro, etc) and then tries to follow the above answer, Grub Customizer changes will not work when made from the second OS (Ubuntu, in the example). The program has to be installed in the thirs OS, as it seems that Grub Customizer can only edit the Grub files created by the installation of the system on which itself is installed.
The files that determine the Grub boot menu come in most cases with the latest system installed on a machine, so Grub Customizer has to be installed and used from that Linux system.
I know you posted this back in May, but I found some stuff that might help anyone looking at this article. I have the same exact problem, and I have not found a true fix for my symptoms yet, but I figured I would post some of my findings.
First, the trick with running some apt-get
updates can be found here:link.
I modified mine a bit based on some other articles I read, and also because I encountered one error message with the cp command while trying to copy:
(This is assuming you did the first two steps from the link above and are running from a Live CD that you booted from)
sudo mkdir /media/precise
sudo mkdir /media/precise/proc /media/precise/dev /media/precise/etc
sudo mount /dev/sda1 /media/precise
sudo mount -o bind /proc /media/precise/proc
sudo mount -o bind /dev /media/precise/dev/
sudo mount -o bind /dev/pts /media/precise/dev/pts
sudo cp --remove-destination /etc/resolv.conf /media/precise/etc/resolv.conf
sudo chroot /media/precise apt-get update
sudo chroot /media/precise apt-get upgrade
sudo chroot /media/precise apt-get update --fix-missing
sudo chroot /media/precise dpkg --configure -a
sudo chroot /media/precise dpkg-reconfigure keyboard-configuration
sudo chroot /media/precise apt-get -f install
The reason I had to add the --remove-destination
is because I was getting an error message that read something to the effect of:
cp: not writing through dangling symlink path/to/danling/symlink/a-file
(found the solution for that here: force cp to copy on dangling symlinks)
Secondly, it wasn't until the OS booted that the problem presented itself (hence why the Live Disk worked just fine). So, choosing different option in Grub was possible. I had gone back by two kernels and still had the problem.
Finally, while working on it with someone else at work, he had looked the computer the day before, and said that he booted back several kernels and got into command line, but not GUI. This was a great start because I had an Apache Web Server I needed to get up and available for people again ASAP. So, right now, the machine is running on an old kernel with a broken GUI but apparently working CLI and I am not sure what to do next. Try to remove the kernel? Remove and reinstall X? Not totally sure, but at least its a start, and maybe the link and code I listed above will be a fix for someone else with this problem.
Best Answer
Using
awk
gives you a full list of all menu entries in
grub.cfg
.