Announcement

Collapse
No announcement yet.

update-grub no longer seeing windows 8 [work-around found]

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

    update-grub no longer seeing windows 8 [work-around found]

    Where does one sensibly report os-prober bugs? I google around and just end up in mystifying labrynths. I'm getting the impression that the code may have been given up on and hopefully something new/better is coming along? (e.g. intergration of boot-repair?)

    I noticed my grub menu lacked my windows 8 partition, probably due to a recent kernel update (and ensuing update-grub). (Previously I think I used boot-repair to get things going, so that may explain why i'm only seeing it now.)

    Investigating, it seems that os-prober can't see my windows 8 install partition, though it is perfectly bootable via grub CLI chainloader:

    # os-prober
    /dev/sdc6:Ubuntu 13.04 (13.04):Ubuntu:linux

    (it is not listing my main linux partition at /dev/sda2 either, but that shows up fine after update-grub, so presumably it's moot).

    Judging by the os-prober debug lines in /var/log/syslog and the script at /usr/lib/os-probes/mounted/20microsoft, it's because os-prober looks for "bootmgr" in the root of the windows partition, and then the directory/file "/boot/bcd" (case insensitive).

    I have no /boot dir or /boot/bcd file. There is a file "bootmgr" in the root, but it's invisible... I don't know if this is some kind of ntfs-3g bug or what... I can cat the file, but I can't see it in directory listings. I can obliterate it with a dummy file (which I very frustratingly did, believing that it wasn't there and wanting to debug os-prober -- fortunately i had a backup) and that new file will also be invisible. Crazy, and presumably related to why os-prober fails, since it looks for it with a simple "ls", just like I was.

    I hacked the 20microsoft file by adding this after the initial "case" statement:

    Code:
    #my hack:
    if [ "$partition" = "/dev/sda1" ]; then
    long="Windows 8 (loader)"
    short=Windows
    found=true
    label="$(count_next_label "$short")"
    result "${partition}:${long}:${label}:chain"
    exit 0                                                                                                                                                                                                                                                     
    fi
    ...this fakes a discovery of windows 8 on /dev/sda1:

    # os-prober
    /dev/sda1:Windows 8 (loader):Windows:chain
    /dev/sdc6:Ubuntu 13.04 (13.04):Ubuntu:linux

    ...and after that hack, update-grub works again, I can boot windows, etc. I'm sure i could have made a custom grub entry for it, but didn't feel like spending 4 hours deciphering grub and crafting an appropriate menu entry.

    I wanted to follow up on this weird "invisible bootmgr file" thing and os-prober's possible deficits, but don't know where to do it?

    Thanks!
    -c

    #2
    The "invisible file" is due to my /etc/fstab option of "hide_hid_files" - that hides the NTFS-hidden files. I'm my own worst enemy. :-)

    And this is why os_prober fails: i enabled that option and it can no longer see the files it uses to recognize the partition as windows 8.

    So the solution is to either use my hack (above) or remove the "hide_hid_files" option from fstab.

    Comment


      #3
      Nice work and thanks for reporting it. However, most of us fix this "problem" by reformatting our windows partitions and installing something useful on them.

      Just a joke - but I couldn't resist...

      Please Read Me

      Comment


        #4
        I'd love to. :-)

        Comment

        Working...
        X