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 have a computer with multiple OS's, one of them is Ubuntu (others Win7, XP, Vista), and recently I added openSuSe to it. Now when it boots the computer go to the openSuSe grub menu. I would like to change it to the Ubuntu grub menu that I had before this install.

Any idea how I can do it ?

thanks, best regards.

share|improve this question
FYI - OpenSUSE still does this. Very disappointing when you've explicitly told it which partition to boot from. – Simon Hoare Jan 31 '13 at 10:29
up vote 1 down vote accepted

Yep. First, boot from your Ubuntu LiveCD, and choose "Try Ubuntu"; let it continue until you get the default Live desktop. From the Dash, open a terminal and enter the command:

sudo fdisk -l

This is to find out the partition to which you have installed Ubuntu. It'll be sdXY, where X is the drive: it'll be a letter such as a or b; and Y is the number that has been given to the partition on that drive: it'll be a number. Find your Ubuntu partition there, if you can. You need to know X and Y. (If you can't tell which is the right partition, you can open GParted from the Dash to get a graphical view of your partitions, and maybe figure it out from there.)

Once you know that, then enter the command:

sudo mount /dev/sdXY /mnt

where X and Y are the partition that you found in the previous step. For example, if your Ubuntu partition is sda1, you'll enter "sudo mount /dev/sda1 /mnt". This is to mount the partition so that you can work with files on it.

Now you need to reinstall grub to that partition. If you're running Ubuntu 11.04 or later, enter this command:

sudo grub-install --boot-directory=/mnt/boot /dev/sdX

where X is the partition (a, b, c, etc.) that you obtained above: note that it does not take a number this time.

If your version of Ubuntu is older than 11.04, then enter this command instead:

sudo grub-install --root-directory=/mnt /dev/sdX

This will reinstall the Ubuntu grub you had been using before. When you reboot, you'll have your old grub. Once in to your Ubuntu, open a terminal and run this command:

sudo update-grub
share|improve this answer
ok, I have ubuntu 12.04 in sda3, I mounted it to /mnt (livecd), i can see it's mounted as ls /mnt shows all the folders. then I issued the command: 'sudo grub-install --boot-directory=/mnt/boot /dev/sda' and I got this: '/usr/sbin/grub-setup: warn: your embedding area is unusually small. core.img won't fit in it .. Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and the use is discourage. Will not proceed with blocklists. – rocketero Apr 11 '12 at 22:43
forgot to mention, the ubuntu sda3 partition does have still around 40GB free. – rocketero Apr 11 '12 at 22:48
Let me just be clear: you ran "sudo mount /dev/sda3 /mnt" followed by "sudo grub-install --boot-directory=/mnt/boot /dev/sda", right? And you're sure you have Ubuntu on sda3? (I believe you; I just don't get the error.) – Kelley Apr 11 '12 at 22:57
yes, I did : 'sudo mount /dev/sda3 /mnt' then the 'sudo grub-install --boot-directory=/mnt/boot /dev/sda' as I have ubuntu in sda3, and I got that warning and I don't think it install grub. – rocketero Apr 11 '12 at 23:04
this is the info for the disk. the asterisk is the one that is booting from. is there a way to change just the asterisk to /sda3 ? – rocketero Apr 11 '12 at 23:31

Use SuperGrub2Disk [Google for it..You will get it]. Insert it and it will boot. It will give you the long list of options. It will also detect your Ubuntu for which you don't have access to....

If you are unsure about the methods just re-install GRUB once you boot into your old Ubuntu [still residing on your Hard Disk Partition]

share|improve this answer
SuperGrub2Disk is basically to boot a system that has problme booting, it does not write to the MBR or the /dev/sda. I DON't have a problem booting into Ubuntu. OpenSuSe_12.1 replaaced the grub menu with its own (on dev/sda4) and now Ubuntu grub menu does NOT come up (located on /dev/sda3). But I can boot ubuntu from the openSuse grub menu, I would like to have back the Ubuntu grub menu instead. So the problem now is this issue that appear when issuing the command 'code'(sudo grub-install --boot-directory=/mnt/boot /dev/sds) results in a WARNING: YOUR EMBEDDING AREA IS UNUSUALLY SMAL – rocketero Apr 12 '12 at 22:06
you can have older GRUB configuration files detected in that one!! – Suchith JN Apr 13 '12 at 4:06
  1. Login using an Ubuntu LiveCD.
  2. Open a terminal.
  3. Update GRUB:

    sudo update-grub
  4. Restart.
share|improve this answer
I started compu with ubuntu (12.04) LIVECD, opened a terminal and issue command 'sudo update-grub'. It gives an error: /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?). .......... and I see /dev is mounted as it contains many files in it. also the command 'mount' shows " udev on /dev type devtmpfs (rw,mode-0755) – rocketero Apr 11 '12 at 22:09
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 7 heads, 8 sectors/track, 34884378 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x51c9b120 – rocketero Apr 11 '12 at 23:34
Device Boot Start End Blocks Id System /dev/sda1 8 204802047 102401020 7 HPFS/NTFS/exFAT /dev/sda2 204802048 360177103 77687528 7 HPFS/NTFS/exFAT /dev/sda3 360177664 547284991 93553664 83 Linux /dev/sda4 * 547286416 1953525111 703119348 f W95 Ext'd (LBA) /dev/sda5 547286418 725543594 89128588+ 83 Linux /dev/sda6 725543658 726973379 714861 82 Linux swap / Solaris /dev/sda7 726973443 1136566619 204796588+ 7 HPFS/NTFS/exFAT – rocketero Apr 11 '12 at 23:35
I cannot press enter on this box to separate the /dev/sdaX so it look horrible the above comment. – rocketero Apr 11 '12 at 23:36
[SOLVED]... I solved the problem buy booting from the openSuSe Grub Menu into UBUNTU 12.04 and issuing the command: codesudo apt-get upgrade. I did update many libraries and the grub utility located on /etc/default/grub. After rebooting, voila! the Ubuntu Grub Menu had replaced the OpenSuSe Grub Menu. Thanks to all who gave me options to find the solution. – rocketero Apr 12 '12 at 22:41

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.