Announcement

Collapse
No announcement yet.

os-probe identifies wrong in grub

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    os-probe identifies wrong in grub

    Hi,

    After dist-upgrade, I faced with two major problems. First was a classic "plasma-desktop" problem and resolved with by removing ~/.kde/ directory.

    For the second one, I am still looking for a solution There is a bug (which was noted before and seemed to be solved) for ubuntu.

    In the grub menu, I see "Windows Recovery Environment" but it is actually "Vista!" In the very first time, I was afraid but know get used it

    I tried to update grub/grub2 and force reinstall but no change. The exact problem occurs at os-probe! It actually identifies the partition correctly but not the label.

    I am curious about if I manually edit /etc/grub.d/30-os-prober whether a possible update can change the partition to real WinRE and some inexperienced user (could be my wife) just skip the confirmation dialogs and resets windows till back to big bang?

    Any suggestion?

    Edit: link of original bug.
    Multiboot<br />Linux: Kubuntu Lucid Lynx<br />M$: Vista Home Prem.<br />[hr]<br />Linux User #510714<br />Kubuntu User #31304<br />

    #2
    Re: os-probe identifies wrong in grub

    It might just be simpler to not use the 30_os-prober file, by removing the execute bit (sudo chmod -x 30_os-prober) and then making the 40_custom file executable (sudo chmod +x 40_custom) and putting your non-linux OS entries in it, as I (and others) have/are doing. In this way, you are controlling what you want to have in the Grub menu for your other, non-Linux OS's.

    This is my 40_custom file:
    #!/bin/sh
    exec tail -n +3 $0
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    menuentry "Other Operating Systems" {
    set root=
    }
    menuentry "Ubuntu, GNU/Linux - Jaunty 9.04 (KDE)" {
    set root=(hd0,1)
    chainloader +1
    }
    menuentry "Ubuntu, GNU/Linux - Lucid 10.04 (KDE)" {
    set root=(hd0,3)
    chainloader +1
    }
    While I don't have a non-linux OS on my laptop, the notation to include in this file for yours can be gotten by looking at your /boot/grub/grub.cfg file for the section/entry that contains the lines for Windows. Copy them and paste into your /etc/grub.d/40_custom file.

    If you are unsure, post your /boot/grub/grub.cfg contents and I can assist you with the changes.

    As always, ANY TIME you are going to work with system files, MAKE A BACKUP COPY FIRST.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: os-probe identifies wrong in grub

      Thanks for the brilliant idea! And also providing me a full control of my system
      Multiboot<br />Linux: Kubuntu Lucid Lynx<br />M$: Vista Home Prem.<br />[hr]<br />Linux User #510714<br />Kubuntu User #31304<br />

      Comment


        #4
        Re: os-probe identifies wrong in grub



        If you don't already know, you can also remove the execute bit on the 20_memtest86+ file also. This will prevent the memtest entry for each installed kernel from appearing in the Grub menu.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: os-probe identifies wrong in grub

          I got that info while searching but could not decide whether it is safe or not. I mean, if somehow I fail to start any of the OS'es installed, it may help me to check RAM modules. (Of course, I should have some live CD/DVD for such emergency situations, instead...)

          BTW, what is the linux/kubuntu user number in your signature? I have been using linux occasionally since 1997. The frequency changes from time to time, but I have to use MS for business restrictions Eventually, it will be my destination!

          I always recommend my students to use linux and as a first choice kubuntu but most of them ignore my advise. It might be a good idea to include these counters in my official signature in order to help to spread to word! (counter.li.org and ubuntucounter.geekosophical.net ? Are they trustworthy to share email address?)

          Cheers!

          PS: Should I change the topic (SOLVED)? I have seen some posts regarding this issue but this forum is not a tracking system or there is no awarding system. So, it is not necessary at all, I think. But if it is a new rule adjusted, then I will do so.
          Multiboot<br />Linux: Kubuntu Lucid Lynx<br />M$: Vista Home Prem.<br />[hr]<br />Linux User #510714<br />Kubuntu User #31304<br />

          Comment


            #6
            Re: os-probe identifies wrong in grub

            Linux Counter
            Ubuntu Counter
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Re: os-probe identifies wrong in grub

              os_prober worked for me, once. I honestly don't recall which distro or version it was but it was sometime last year. I predict that Grub2 will be ready for the masses by the end of the year. By then we should see it as a the default boot loader. :P

              Seriously, Grub2 has great potential over grub-legacy (and not just potential, but goods), but the documentation was slow in coming and os_prober so inefficient as to make me think it was just a tad bit ambitious to include in a distro that "just works" when it obviously doesn't.

              I've gotten over my initial shock and fear of the new Grub and I still recall the difficulty I had learning lilo and then learning grub (legacy). But back in that day there was no Ubuntu or if there was it was fledgling. Nevertheless, most of my problems with lilo and grub were alleviated with readily available, clear, and concise documentation. Grub2 will be what I use going forward -- I just wish that more newbie-friendly docs were obvious to find.

              BTW, os_prober finds my other distros alright, but they are not added to grub.cfg -- hacking 40_custom is the only (approved) way to get my grub.cfg set right.

              Comment


                #8
                Re: os-probe identifies wrong in grub

                os_prober definitely needs some work.

                I'm using a grub-pc dedicated partition so I'm manually editing my grub.cfg (gasp!) anyway...

                Please Read Me

                Comment


                  #9
                  Re: os-probe identifies wrong in grub

                  But editing /boot/grub/grub.cfg isn't permanent. The next Grub update or Kernel install results in that file being rebuilt, and any changes to it you made 'by hand' are gone. Do your editing using the /etc/grub.d/40_custom and if necessary, /etc/default/grub.
                  Windows no longer obstructs my view.
                  Using Kubuntu Linux since March 23, 2007.
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Re: os-probe identifies wrong in grub

                    Here is my new logo to spread the word:

                    Thanks for the fruitful discussion, I changed 30_os-prober to nonexecutable and added to 40_custom the necessary lines. Moreover, I did change /etc/default/grub for GRUB_DEFAULT not by number and rather by the name! This way, I think, it will be more stable for possible updates 8)

                    Cheers!
                    Multiboot<br />Linux: Kubuntu Lucid Lynx<br />M$: Vista Home Prem.<br />[hr]<br />Linux User #510714<br />Kubuntu User #31304<br />

                    Comment


                      #11
                      Re: os-probe identifies wrong in grub

                      Editing grub.cfg is permanent if you

                      a. Don't run update-grub (which automatically happens at kernel updates) or
                      b. have grub in a dedicated partition that is not mounted at /boot/grub

                      SInce os_prober doesn't work correctly, I choose the latter option. I can still run update_grub, but it overwrites /boot/grub/grub.cfg which isn't the configure file I'm using. I can copy stanzas from it if I choose and then I manually edit my grub.cfg

                      When grub is actually "ready" and os_prober does what it's supposed to, I plan on could remount grub in it's standard location. I likely won't because I want to control the order of the boot menu and grub-pc doesn't have that in their "todo" list.

                      ..and I totally agree with hunkirdowne...

                      Please Read Me

                      Comment

                      Working...
                      X