Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer
That was the case, thanks. I actually uninstalled grub-pc and made sure grub was installed because I am not familiar with Grub2 syntax, and grub seemed easier to deal with. – DanielGibbs Oct 19 '12 at 0:47

It is important to point out here that the word "installed" has two meanings for grub (or lilo). You have installed in your filesystem the tools and images for two grub packages. You have installed in your MBR (probably) one version of the actual grub bootloader. Uninstalling the packages won't affect your bootloader, although you might find yourself wanting to use the packages to modify your bootloader configuration later.

share|improve this answer

Yeah, I think I also have 2 versions of GRUB. First I used 12.04, and I used Grub Customizer to give it background image and give Windows & Ubuntu friendlier entry names (instead of 'Ubuntu with Linux 3.0234.123.5.12412-02131/2.321-generic on /dev/sda4'). Then I installed 12.10, and it replaced Grub with an ugly black screen, and now Ubuntu 12 has 3 entries, 2 of which lead to the same sda7. However, when I run GRUB Customizer, it still displays the old entries from when I used to have 12.04.

How do I get only 1 copy of grub on my machine? As in, how can I know for sure I have 2, and how can I delete one?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.