After reinstalling Linux Mint, Windows 7 does not boot

9,945

Solution 1

Ok, per request, I'm answering my own question:

  • I tried every single available and provided command. In the original post are both links I found while trying to solve this and links provided with possible solutions.
  • The answer of Firelord, even though wasn't useful, is the more insightful for this kind of problems.
  • It seemed that the problem was with Windows, not with Linux or its installation. My bet is that the problem was caused after installing Linux and marking its partition for boot. Not exactly sure of what or why.

The solution was "just" reinstalling windows from an original image (just to be sure that everything could go bck to normal) and restoring an old image of my windows installation (an image of the partition) that I made months ago with clonezilla. After restoring it grub failed and I used rescatux to repair it. Everything went back to normal.

Solution 2

You need to be certain whether the Windows loader is intact and readable by Linux or not in order to try Linux specific recovery. If you're certain that Linux Mint installation went fine and is working good, open the Terminal, and type

  • sudo os-prober, alternatively, you can press TAB key two times after writing os to see what is the actual command for os-prober on Mint.

It should return an output like this:

/dev/sda1:Windows 7 (loader):Windows:chain

It means that Linux detects your Windows loader, so let's proceed further. Since Mint uses Grub 2.0, fire up Terminal and type

  • sudo grub-mkconfig

It should print some configuration related output. Search your Windows entry after ### BEGIN /etc/grub.d/30_os-prober ###. If the output shows such entry, type in Terminal

  • grub-mkconfig -o /boot/grub/grub.cfg ,or the location of your grub.cfg, depending upon the installation.
  • Now type grub-install /dev/sda, where sda is the primary HDD for me.

Reboot your system normally, and select the Windows entry from Grub, it should boot.

If this doesn't work, then there must a problem with Windows loader, you need to recover it. Recovering Windows loader is trivial if Windows Installation Disk is provided. Boot into the installation Disk , proceed to the window where it shows Install, click the Repair option at the bottom of the same screen, wait for the Windows to do some searching, it will eventually show some output (irrelevant for now), click on Advanced Recovery, and find the Command Prompt from there. You can follow HTG guide here if you are uncertain where to go next. Open Command Prompt, and type

  • bootrec.exe /fixboot
  • bootrec.exe /fixmbr

Reboot the System and you should directly be able to boot into Windows. But now you can't boot into Linux Mint. To enable GRUB again, download the SuperGrub 2 disk, burn it, boot into it and it will show you a Grub Menu with OS it can find. You can boot into Mint from there, and repeat the aforementioned Grub steps to restore it.

If all else fails, Windows must be freshly installed. But, I'm always able to recover it from aforementioned techniques.

About SuperGrub 2 Disk :

Super GRUB2 Disk helps you to boot into most any Operating System (OS) even if you cannot boot into it by normal means...it’s a boot disk that will try to find all of your Operatings Systems and build a boot menu so that you can choose the one you want to boot from. From inside your booted Gnu/Linux you will be able to restore Grub by using one straight-forward command.

Link to SuperGrub 2 Disk :

Here. Choose the Stable one.

Share:
9,945

Related videos on Youtube

Neuromante
Author by

Neuromante

Updated on September 18, 2022

Comments

  • Neuromante
    Neuromante over 1 year

    Final edit: I tried each and every single fix on the question, but I ended up just restoring an image I made a year ago of the freshly installed system using clonezilla. After that, I ran rescatux to restore the grub and everything went back to "normal."

    I had a dualboot setup in my computer: On one side, Linux Mint ( /dev/sda2 ), on the other, Windows 7 ( /dev/sda3 ). I ran into some weird problems with Mint, so I decided to install the last version and give it a try.

    The thing is that, after install the new Linux Mint, Windows 7 don't boot. I got to the Grub screen, select Windows 7, accept and then grub appears again. Linux mint boots normally.

    • I downloaded rescatux and tried to restore grub (I battled time ago with similar problems). Nothing.
    • Also tried the MBR restore for windows. Nothing.
    • Boot-repair did nothing.
    • I installed grub customizer and put Windows 7 the first on the list and nothing.

    So... I'm pretty much clueless. Most of the questions are the other way around (Installing Windows "hides" grub, then Linux Mint does not start), so it seems if someone has had the same problem that me, is very well hidden in the internet. Any idea?

    Edited, this is the script for Windows:

    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos3'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  264CA3CF4CA39857
    else
      search --no-floppy --fs-uuid --set=root 264CA3CF4CA39857
    fi
    parttool ${root} hidden-
    chainloader +1
    

    Second edit, after Firelord answer:

    With the Windows installation disk, I went into the console and executed bootrec.exe /fixmbr and /fixboot. Everything seemed to be fine, so I rebooted and waited for Windows to launch.

    Then, got an \Boot\ BCD Status: 0xc000000f error when starting Windows. I Found this question on the topic and tried to follow the first 2 answers to no avail:

    • The first answer (delete and copy again bcd), gets a "Failure when attempting to copy boot files").
    • Trying bootrec .exe /fixmbr replies with success, trying with /fixboot ends with "The volyume does not contain a recognized file system. Please make sure that all required file system drivers are loaded and that the volume is not currupted."
    • It seems that rescatux can reinstall grub with no problem, but still, Windows does not boot.
    • Admin
      Admin about 9 years
      Have you tried editing the boot order for Windows?
    • Neuromante
      Neuromante about 9 years
      Just tried it (Installing [grub customizer, handy tool, by the way])askubuntu.com/questions/100232/…) and nothing.
  • Neuromante
    Neuromante about 9 years
    Wow, thanks for the lengthy answer. But the problem persist: With the Windows installation disk, I went into the console and executed bootrec.exe /fixmbr and /fixboot. Everything seemed to be fine, so I rebooted and waited for Windows to launch. Then, got an \Boot\ BCD Status: 0xc000000f error when starting Windows. I Found this question on the topic and tried to follow the first 2 answers to no avail. Now, /fixboot replies with a "The volume does not contain a recognized file system." (More on OP)
  • Firelord
    Firelord about 9 years
    sevenforums.com/installation-setup/… Somebody here used chkdsk to correct the filesystem and then run bootrec.exe. It worked for him.
  • Firelord
    Firelord about 9 years
    There is also a step-by-step guide here which involves chkdsk, bootrec and diskpart. I'm hoping this should work out.
  • Neuromante
    Neuromante about 9 years
    Well, I've ended up restoring an image of the OS that I made back in the day. I tried everything and no fix, euh, fixed it, so there we go. Blessed be clonezilla.
  • Neuromante
    Neuromante about 9 years
    Done and done, thanks for the input! For home, software like Clonezilla is the best thing: You install your stuff, take the image and save it. If you break something, no need to reinsall every single application. Really useful if you are tinkering with a raspbian installation for a mini server at home and broke everything right after take an image.
  • German
    German about 6 years
    Thanks, but please format this as an answer to the question.