• \[SOLVED\] grub thinks Win7 is Antergos


    Hello, I recently installed on my laptop alongside Windows 7 and at the moment grub is treating Windows 7 as another version of Antergos. It says it’s Antergos on sda2, but sda2 is where Windows is installed. Antergos is working fine, but if I try to even boot into what is really Windows, it tries to load Linux but obviously it cannot because it’s Windows. So it fails. And I tried running os-prober (which still thinks it’s Antergos) and then rebuilding grub.cfg. So, if anyone can help me, then that would be very awesome! I’ve mounted sda2 and looked at it and it appears to be undamaged. (All the Windows files are there.)

    EDIT: Hmm… on second thought I probably should have posted this elsewhere. Sorry.

  • Hello, I recently installed on my laptop alongside Windows 7 and at the moment grub is treating Windows 7 as another version of Antergos. It says it’s Antergos on sda2, but sda2 is where Windows is installed. Antergos is working fine, but if I try to even boot into what is really Windows, it tries to load Linux but obviously it cannot because it’s Windows. So it fails. And I tried running os-prober (which still thinks it’s Antergos) and then rebuilding grub.cfg. So, if anyone can help me, then that would be very awesome! I’ve mounted sda2 and looked at it and it appears to be undamaged. (All the Windows files are there.)

    EDIT: Hmm… on second thought I probably should have posted this elsewhere. Sorry.

  • Hi,

    The osprober script should not be used directly. The grub-mkconfig handles that. Is this how you rebuilt grub.cfg

    sudo grub-mkconfig -o /boot/grub/grub.cfg
    

    If that is not detecting Windows properly then add the following to /etc/grub.d/40_custom and rerun grub-mkconfig:

    menuentry "Windows 7 (loader) (on /dev/sda2)" {  
    insmod part\_msdos  
    insmod ntfs  
    set root='(hd0,msdos2)'  
    chainloader +1  
    }
    

    Now, if it still doesn’t work then it means your windows boot manager is either not present or corrupted. You can fix it by booting from a Windows install disc or manufacturer recovery media and selecting “Repair My System”. Hope that helps!

    Best Regards,

  • Okay, so I’ve figured out what happened… well sort of… I did what you said (actually earlier on someone else’s advice) and it fixed the grub issue. However, I then got the Windows error:
    "BOOTMGR is missing"
    When I installing it, this is what I had set up:
    [img:2ep7larn]https://scontent-b-iad.xx.fbcdn.net/hphotos-prn2/v/1462175_756579297689796_204212858_n.jpg?oh=a3404b8231f6c1688bffae8b2771e97a&oe=5299AEE9[/img:2ep7larn]
    But then my friend who is way more knowledgeable on this kind of stuff told my I should put /boot on sda1 and that it was okay to overwrite Window’s system reserve saying that it was for installing service packs which you can do manually. So, reluctantly I did that trusting him. Upon seeing something online later, it seems this is the problem. But wait, there’s more!
    The first time I tried installing Antergos, which is when THAT PICTURE was from, it didn’t work. (And Windows was not an entry in grub) Antergos wouldn’t boot. So, I re installed it with those exact settings for partitions and it worked, and I had the issues I’m having now. So, I put in a Windows restore disk and it doesn’t see any operating systems. It doesn’t see Windows, so in the file browser I noticed that the Windows partition has not only the Windows files, but also all of the folders characteristic of Linux.
    [img:2ep7larn]http://i1093.photobucket.com/albums/i428/agentorange96/Internet/Screenshotfrom2013-11-28120807_zpsb966df43.png[/img:2ep7larn]
    I suspect that the installer installed Antergos to the Windows partition (sda2) despite me telling it to install to sda6 (and to format it) as clearly shown in the first image.
    Now, I am very aware that computers almost never make mistakes and do exactly what they are told to do and that glitches are on the part of the user or the programmer. (As an amateur programmer I know I’ve made lots of programming mistakes) And with this installer having such a good track record it makes no sense whatsoever. I have pictorial evidence showing that I set root to sda6 and not sda2 so this seems to make no sense whatsoever, and I can only think that I’ll have to reinstall Windows which really really sucks.

  • Hi,

    I’ll do some tests with your setup, but what I don’t get is:

    So, I re installed it with those exact settings for partitions and it worked, and I had the issues I’m having now.

    It’s a bit of strange that the second time worked with the same settings… it’s a pity you didn’t make a screenshot of the “changes” dialog (the one that Cnchi shows when you click “install” in the advanced installer screeen). Also a copy of /tmp/cnchi.log would have been nice.

    Anyway, I’ll do some tests to see if I can reproduce the error you’re reporting, but I’m not very optimistic about it.

    I only can apologize for making you reinstall Windows7. Maybe somebody has a solution to restore your Windows7 without reinstalling, but I’m afraid I can’t help in this matter (I’m not a windows user).

  • Thanks!
    Really I’m just confused. I had that one image because I was showing my friend asking if it looked good. (Then he told me I should do the /boot thing.) I would hope someone could figure something out, but yeah, I’m neither optimistic that you’ll be able to reproduce this nor that someone can find a way to fix it otherwise at this point. Did I mention I’m very confused?
    As for what I meant there was that after my Antergos installation didn’t work, I went about re-installing it with the same partitions I did the time that it did not work doing the same things.
    sda1 as /boot
    sda2 left alone (Windows)
    sda3 as /home/pmiller (but not formatted)*
    sda5 as / (root-formatted)
    sda6 as swap

    *This is also mounted in windows as the My Documents folder which works really well I must say.
    I previously had ArchBang and Windows sharing this but ArchBang was formatted over by swap space as I previously had 8GB for Linux and 45GB for swap which I assume was a mix up on my part a long time ago.

  • I must say this is a rather odd bug indeed. The only thing that I can think of that could possibly explain that behavior is that the partitions were unmounted and then remounted- but the order in which they were recognized got changed somehow. ("/dev/sdxX" is not guaranteed to persist between mounts) I’m not sure if we are using those paths or the newly preferred UUID paths in Cnchi. We will definitely look into this further. Thanks for bringing it to our attention.

    Now, about your Windows install…Most likely what has happened is the partition that has a boot flag set is empty. I’m a little confused at why your friend would tell you its okay to overwrite the smaller hidden partition that Windows created. Yes, it’s correct that it mostly stores information for using the system restore (rollback) feature BUT as you have found out it is also the partition that has the boot instructions for Windows, I’m not 100% sure, as its been over a year since I last had a Windows install, BUT I do believe if you remove the boot flag from the smaller partition that you formatted and add a boot flag to your main Windows partition the Windows Repair Media will be able to fix everything without reinstalling. You can add/remove boot flags easily by booting into Antergos and installing gparted (partition manager).

    Let me know if everything works out ok. Good luck!

    Best Regards,

  • I LOVE YOU!!!
    The only thing I did differently from what you said is that I did not [i:l3rvjvuk]remove[/i:l3rvjvuk] the boot flag from that partition because it is the boot partition for Linux. But the first time after that when I loaded the Windows repair disk it said it had to repair some boot stuff and it did, and the second time it saw Windows and fixed it and it all works and THANK YOU!!!

    EDIT: Is there something I’m supposed to do to mark this as solved?
    EDIT: Also, I suppose I ought to clean the Linux out of Windows now… :/

  • Another success by lots.0.logs !!!

    Yes please, mark it as solved (I’ll look into your Cnchi problems, though).

  • Glad to hear you got it working

Posts 10Views 1121
Log in to reply