Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 3175  / 2 Years ago, sun, february 20, 2022, 9:13:25

I am running Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-generic-pae i686) which according to the Ubuntu documentation contains Grub2.



However grub --version gives me grub (GNU GRUB 0.97), but grub-mkconfig --version gives me grub-mkconfig (GRUB) 1.99-21ubuntu3.4



Do I have 2 versions of Grub installed simultaneously? If so, what is the easiest and safest way to remove one.



If not, which configuration file should I edit? I have edited /etc/grub.d/40_custom to contain a password, but running update-grub does not appear to include this in the grub.cfg file.


More From » grub2

 Answers
4

grub2 doesn't have a "grub" command, only grub legacy has that. And grub legacy does not have a grub-mkconfig command, only grub2 has that. So yes, you have two versions of grub installed. My guess is that you have the grub-common package installed, which contains grub-mkconfig but you do not have the grub-pc package which contains most of grub2's files and is needed for grub on a BIOS based PC (if you have UEFI firmware, you may want grub-efi-amd64). I believe that to be the case because the package "grub" (containing grub-legacy) and the package "grub-pc" (containing most of grub2) conflict and therefore cannot be installed at the same time. Because you have grub legacy installed, "update-grub" is modifying grub legacy's /boot/grub/menu.lst rather than using grub-mkconfig to write a /boot/grub/grub.cfg.



The solution is simple:



If you have a BIOS based system then just install the grub-pc package (which will automatically remove the grub package).



If you have a UEFI based system then install grub-efi-amd64.



If you don't know which you have, say so in a comment and I will help you figure that out.


[#34891] Monday, February 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
anxietunnel

Total Points: 66
Total Questions: 120
Total Answers: 115

Location: Norway
Member since Sat, Mar 4, 2023
1 Year ago
;