Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: GRUB2 not detecting Ubuntu

  1. #1
    Join Date
    May 2012
    Location
    Kolkata, India
    Posts
    161

    Default GRUB2 not detecting Ubuntu

    I have Ubuntu 12.04.1 LTS and OpenSUSE 12.2. I was using GRUB2 v 2.00 as my default bootloader. In Ubuntu, there were some updates and my GRUB switched to 1.99 (the Ubuntu GRUB). So, in OpenSUSE I reinstalled GRUB using
    Code:
    grub2-install /dev/sda
    .

    Now, in the boot screen, GRUB displays only OpenSUSE and not Ubuntu.
    Code:
    grub2-mkconfig -o /boot/grub2/grub.cfg
    gives this output:
    Code:
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.4.11-2.16-default
    Found initrd image: /boot/initrd-3.4.11-2.16-default
      No volume groups found
    done
    Please help me restore Ubuntu, keeping GRUB 2 v 2.00.
    Thanx.....

  2. #2
    Join Date
    Sep 2012
    Posts
    4,977

    Default Re: GRUB2 not detecting Ubuntu

    os-prober is using syslog to log messages during execution. Please paste relevant part of /var/log/messages created during grub2-mkconfig execution.

  3. #3
    Join Date
    May 2012
    Location
    Kolkata, India
    Posts
    161

    Default Re: GRUB2 not detecting Ubuntu

    I ran mkconfig command again after mounting the Ubuntu partition and it solved my problem, most probably. Anyway, thanx.....

  4. #4

    Default Re: GRUB2 not detecting Ubuntu

    Quote Originally Posted by americast View Post
    So, in OpenSUSE I reinstalled GRUB using
    Code:
    grub2-install /dev/sda
    .
    Doing so, you just overwrote Ubuntu's Grub, which is installed in MBR by default.

    Quote Originally Posted by americast View Post
    Please help me restore Ubuntu, keeping GRUB 2 v 2.00.
    Well, you can not have both in MBR. You have to decide which one you want to see at boot. Then you would install this one in MBR and the other one in its root partition. The command is grub2-install under openSUSE and grub-install under Ubuntu. To install the boot loader to a partition boot sector, you have to use the option --force. Example (just an example!):

    Code:
    # sudo /usr/sbin/grub-install --force /dev/sda5
    Once you have installed the boot loader, you can refresh the menu with update-grub under Ubuntu oder grub2-mkconfig - as you already know - under openSUSE.

    Alternately, you can also use updategrub from my repo, which works on both systems (to use it on Ubuntu, make sure that you copy the script updateGrub2 and not "updategrub", which is just a symlink).

  5. #5
    Join Date
    Sep 2012
    Posts
    4,977

    Default Re: GRUB2 not detecting Ubuntu

    Quote Originally Posted by americast View Post
    after mounting the Ubuntu partition
    I would expect os-prober to work also for partitions that are not mounted (it mounts them as needed). Anyway, if you care enough and can reproduce it, bug report would be helpful.

  6. #6

    Default Re: GRUB2 not detecting Ubuntu

    Quote Originally Posted by arvidjaar View Post
    I would expect os-prober to work also for partitions that are not mounted (it mounts them as needed). Anyway, if you care enough and can reproduce it, bug report would be helpful.
    I actually have a bug report about it. It mostly affected Ubuntu 11.10 - seemed better with 12.04 - and more rarely other systems. For some reason I couldn't explain, os-prober would fail to mount Ubuntu's partition read only (it always mounts partitions read only). They are different workarounds:
    • mounting Ubuntu's partition (os-prober will detect it after this, even if you unmount it, because the next time it will succeed mounting it)
    • reboot/shutdown Ubuntu (so that the file systems will get mounted/unmounted), then boot openSUSE and try os-prober
    • I also tried to hack os-prober in different ways with more or less success on this issue.


    https://bugzilla.novell.com/show_bug.cgi?id=767272

  7. #7
    Join Date
    May 2012
    Location
    Kolkata, India
    Posts
    161

    Default Re: GRUB2 not detecting Ubuntu

    Quote Originally Posted by please_try_again View Post
    I actually have a bug report about it. It mostly affected Ubuntu 11.10 - seemed better with 12.04 - and more rarely other systems. For some reason I couldn't explain, os-prober would fail to mount Ubuntu's partition read only (it always mounts partitions read only). They are different workarounds:
    • mounting Ubuntu's partition (os-prober will detect it after this, even if you unmount it, because the next time it will succeed mounting it)
    • reboot/shutdown Ubuntu (so that the file systems will get mounted/unmounted), then boot openSUSE and try os-prober
    • I also tried to hack os-prober in different ways with more or less success on this issue.


    https://bugzilla.novell.com/show_bug.cgi?id=767272
    Yes, mounting Ubuntu's partition did solve my problem. But, I did not have to mount Ubuntu while installing GRUB2 a month back. Might be some update is causing the problem. Thanx....

  8. #8
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,729
    Blog Entries
    20

    Default Re: GRUB2 not detecting Ubuntu

    Quote Originally Posted by americast View Post
    Yes, mounting Ubuntu's partition did solve my problem. But, I did not have to mount Ubuntu while installing GRUB2 a month back. Might be some update is causing the problem. Thanx....
    I get the same with Fedora, have to mount Fedora / for os-prober to pick it up
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

  9. #9

    Default Re: GRUB2 not detecting Ubuntu

    Quote Originally Posted by caf4926 View Post
    I get the same with Fedora, have to mount Fedora / for os-prober to pick it up
    I occasionnaly did with Fedora too. If you mount and unmount Fedora, than run os-prober again it might work, meaning that os-prober will be able to mount it next time. It looks like some foreign system's root partition - whether Fedora or Ubuntu, or openSUSE the other way around - was not cleanly umounted as that system was shut down, but from the os-prober point of view only (because fsck shows no error otherwise). It's very tricky and believe me, I have spent a lot of time trying to solve or get around this problem in the past year or two.

    If you still have this issue, please add a comment to my bug report. I have been feeling quite lonely there, and Michael already suggested to close the bug report, also the problem is not solved AFAIK.


    Quote Originally Posted by Michael Chang 2012-07-05 06:45:29 UTC
    Agnelo,

    Ping. Do you think it ok we close this issue? Or do you have any finding on it?

    Thanks.

  10. #10
    Join Date
    Feb 2009
    Location
    Wavrin, north of France
    Posts
    13

    Default Re: GRUB2 not detecting Ubuntu

    I get the same problem

    on my pc I had

    windoxs xp
    opensuse 12.2
    xubuntu 12.04

    and 2 month ago I installed , Kubuntu 12.10 grub in the root not in the mbr reserved for suse 12.2

    I reboot , with grub customizer i modified the menu and it had lines for kubuntu
    I reboot , and finished and updated kubuntu

    after 1 or 2 weeks , aftrer updating I repeated with opensuse grub-customizer and I lost the line with Kbuntu

    strange but real after some week I Repeated Grubcustomizer and found Kubuntu 12.10

    I make a lot of experiences whitout good results

    yesterday I read this forum

    and

    In opensuse as root (superuser , with dolphin I mounted sda7 where wee find root of kubuntu )

    and repeat os-prober and grub-customizer

    and good result

    This morning

    new update of kubuntu ( important)
    reboot return on kubuntu , rebbot and return to suse

    before anything os-prober dont find kubuntu
    afert mounting sda7 (kubuntu) os-prober andgruncustomizer find kunbuntu !!!

    excuse me for my bad english ( I am french)



    I return

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •