0

I would like report a problem which i faced after installing Ubuntu 12.04 64 bit

http://www.upubuntu.com/2011/11/how-to-change-default-os-at-boot-for.html

after following the instruction when i ran update-grub it asked me whether to generate menu.lst which is used older grub versions i told yes ..and the default os option still remained as the same.

Output of update-grub when i run is as follows

sudo update-grub 
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /vmlinuz-3.2.0-23-generic
Found GRUB 2: /boot/grub/core.img
Found kernel: /memtest86+.bin
Updating /boot/grub/menu.lst ... done
2
  • What Ubuntu version did you update from? (and using what method) What version of Grub were you using?
    – david6
    Apr 28, 2012 at 1:55
  • @joe1983 If you want to add the output from update-grub, please do it by editing your question not by forcing it into a comment. I am not sure why you would want to add this though. What aspect of your problem will the output from update-grub illustrate? Apr 28, 2012 at 13:11

3 Answers 3

2

I think that you are asking only for assistance in changing which OS GRUB boots by default on your system. This has been asked and answered previously. Please take a look at this question and its answers:
How do I set Windows to boot as the default in the boot loader?

Setting GRUB_DEFAULT= to the numeric position in the GRUB menu of the OS you want to boot is a "less special" approach. This method can break if new entries are added to your GRUB menu.

Two other approaches you could use which might serve you better are:

  1. Set GRUB_DEFAULT= to the title of the menu entry you want as your default. That method is described in this answer to the question above.
  2. Set GRUB_DEFAULT= so the default is to boot the operating system you booted the last time (also referred to as the "saved method"). This is discussed in this answer.

Please check the version of GRUB used on your computer


According to this section of the Ubuntu GRUB documentation, you can check the current version installed on your system ... from the command line by opening a Terminal and entering the following:

  grub-install -v

Grub 2 should display a version number of 1.96 or later. Grub Legacy is version 0.97.

Please also take a look at the version information displayed on your GRUB boot menu. It's pretty easy to find, but I provided an image to illustrate anyway. :-)

enter image description here


Another thing you could do which would help is to install the Boot-Repair tool and use it to Create a Bootinfo summary.

To do this you would first install the tool using apt-get. The terminal commands to do this are

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
  1. When this completes (successfully), enter the command boot-repair to start the tool.
  2. After a slight delay, boot-repair will prompt you to download the newest version. Since you just downloaded & installed the tool there is no need for this so answer No.
  3. If boot-repair requests to install the pastebinit package, respond with Yes.
  4. The tool will now scan your system and (eventually) display the window shown in the image below. For now just click on the box/button to Create a Bootinfo summary. This will collect information about your system's boot configuration, but will not make any changes.


    Initial Boot-Repair Window


    When the bootinfo summary has been created, boot-repair will display a message containing a URL like this: http://paste.ubuntu.com/123456/. Please add this URL to your question. The information this link points to will allow us to better understand how GRUB is set up on your computer.
3
  • still i could not change the default os and or os position as update-grub command is creating menu.lst instead of grub.cfg
    – joe1983
    May 1, 2012 at 1:32
  • ran this command and repaired it sudo grub-mkconfig -o /boot/grub/grub.cfg.
    – joe1983
    May 1, 2012 at 3:01
  • You could also have used sudo update-grub -o /boot/grub/grub.cfg. My understanding is that the command update-grub is just (some sort of) alias for grub-mkconfig. Did you re-try just a simple sudo update-grub to ensure that it directs its output to grub.cfg and not menu.lst now? This is how the system will do it if it feels it needs to after installing an update. May 1, 2012 at 3:48
1

I've had similar problems.

After my last couple of distribution upgrades, my grub didn't see the new kernel and update-grub didn't help. I needed to run grub-mkconfig -o /boot/grub/grub.cfg to let grub know that a new kernel existed.

I found out the reason after reading this article. I had grub2 installed on my disk, but only the grub package installed on the computer. Probably this is the reason why the dist-upgrade script (that probably uses update-grub) only updates the menu.lst and not grub.cfg.

I've just installed grub2 and now update-grub generates the grub.cfg

0

I hope a reinstall of the grub can resolve your issue. Try booting the OS by inserting the Ubuntu CD and try the following command.

sudo grub-install /dev/XXX

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .