52

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.

What can I do to fix this?

12
  • can you give more details. whether GRUB menu has windows and when selected it doesn't boot or GRUB menu itself doesn't have an entry about windows 8. Nov 16, 2012 at 9:07
  • Geting Ubuntu Grub Menu And When Selecting The Windows8 /sda1/ press ctrl+alt+del It`s Shwoing Like That Nov 16, 2012 at 11:14
  • Please indicate the URL provided by the Boot-Repair utility.
    – LovinBuntu
    Aug 8, 2013 at 13:22
  • 1
    This is a shot in the dark but maybe worth the try; Try booting into Ubuntu, open Gparted, select your windows partition, right click and select check. This will run a disk-check and try and repair errors. This has once done the trick for me while fixing boot trouble on a non-primary partition. It will probably yield no result but it wouldn't hurt. Aug 11, 2013 at 7:34
  • 3
    Most people will want to ignore the accepted answer and use karel's much better answer below
    – Zanna
    Aug 18, 2017 at 7:36

20 Answers 20

33

GRUB menu does not appear

If the computer boots into Ubuntu automatically without showing the GRUB menu at all, sometimes you can press the manufacturer's BIOS/UEFI key at boot time and while in UEFI or BIOS mode from the firmware menus select the operating system you need. Common keys used are Esc, Delete, F1, F2, F10, F11, or F12. On tablets, common buttons are Volume up or Volume down. During startup, there's often a screen that mentions the key. If there's not one, or if the screen goes by too fast to see it, check your manufacturer's website.*

If this doesn't work when the GRUB menu does not appear at boot time, immediately after the motherboard / computer manufacturer logo splash screen appears when the computer is booting, with BIOS, quickly press and hold the Shift key, which will bring up a GNU GRUB menu screen. With UEFI press (perhaps several times) the Esc key to get to the GNU GRUB menu screen. Sometimes the manufacturer's splash screen is a part of the Windows bootloader, so when you power up the machine it goes straight to the GNU GRUB menu screen, and then pressing Shift is unnecessary.

If this doesn't work when the GRUB menu does not appear at boot time, then try the answers to:


Boot Repair

From Ubuntu open the terminal and type:

sudo add-apt-repository ppa:yannubuntu/boot-repair  
sudo apt update  
sudo apt install -y boot-repair
sudo boot-repair  

Open the Boot Repair application and select Advanced Options -> Other Options tab -> Repair Windows boot files. The boot flag should be placed on the same partition on which Ubuntu is installed. The partition on which Ubuntu is installed can be identified from the Disks application which is built-in in Ubuntu.

enter image description here

If you're unable to select the Repair Windows boot files option because it's grayed out, refer to this answer.


Rescatux

Rescatux is a free bootable live CD/USB that can repair GRUB and the Windows bootloader. Rescatux has a graphical interface with a menu of operating system rescue tasks. If your hard disk has the MBR partitioning format, you can select the Restore Windows MBR (BETA) option to repair the Windows bootloader. If your computer has UEFI firmware, you can select among the UEFI boot options.

Boot options:

  • (>=0.41 beta 1) Update UEFI order
  • (>=0.41 beta 1) Create a new UEFI Boot entry
  • (>=0.41 beta 1) UEFI Partition Status
  • (>=0.41 beta 1) Fake Microsoft Windows UEFI
  • (>=0.41 beta 1) Hide Microsoft Windows UEFI
  • (>=0.41 beta 1) Reinstall Microsoft Windows EFI
  • (>=0.41 beta 1) Check UEFI Boot

GRUB options:

  • (>=0.40 beta 11) Easy GNU/Linux Boot Fix
  • Restore GRUB and GRUB2
  • (>=0.31 beta 4) Update any GRUB2 menu
  • Update Debian/Ubuntu GRUB menus

Windows options:

  • Restore Windows MBR (BETA)
  • Clear Windows passwords
  • (>=0.31 beta 4) Promote a Windows user to Administrator role
  • (>=0.41 beta 1) Reinstall Microsoft Windows EFI
  • (>=0.31 beta 4) Unlock Windows user

Password options:

  • Change GNU/Linux Password
  • Regenerate sudoers file
  • Clear Windows passwords

Expert tools:

  • Boot-Repair
  • GParted
  • OS-Uninstaller
  • Clean-Ubiquity
  • PhotoRec
  • TestDisk

enter image description here
Rescapp is a nice wizard that will guide you through your rescue tasks.


How to make a Rescatux live USB from Ubuntu

  1. Install GParted partition editor with sudo apt install gparted.

  2. Insert a USB flash drive and check if the boot flag has been enabled on the flash drive using the GParted application. Unmount the USB flash drive. Open GParted and select the USB flash drive from the menu list of drives. From the GParted menu select: Partition -> Manage Flags -> check boot.

  3. It is very important to verify that the device that you are installing the Rescatux live USB to is indeed your flash drive, so that you don't overwrite any of your system or personal files which may make your operating system unbootable. In Ubuntu you can find the device name of the flash drive using the Disks application.

  4. Unmount the USB partition device. Let's say the USB partition device is /dev/sdc1

     sudo umount /dev/sdc1 # replace sdc1 with the partition name of your USB drive
    
  5. Change directories using cd to the path of the directory where the Rescatux iso file that you downloaded is located.

  6. Write the Rescatux iso file to the USB flash drive. In the following command replace rescatux_0.xxxx.iso with the name of the Rescatux iso file you downloaded.

     sudo dd if=rescatux_0.xxxx.iso of=/dev/sdc # this command also works in Windows Subsystem for Linux 2 
     sudo sync  
    

I have also been able to make a Rescatux live USB using the built-in Startup Disk Creator app.

Windows 10/11 factory reset repair of the Windows bootloader

source

Open Settings

On the pinned apps section on the left side of the Start menu, locate the Settings app. It's typically represented by a gear icon. Click the Settings app to open the Windows Settings app. You can also select the Settings app from the app list. Under Settings, click Update & Security to continue.

Choose Recovery Options

Click the Recovery tab and select Get started under Reset this PC.

Save or Remove Files

At this point, you have two options. You can either choose to keep your personal files and only remove downloaded apps and settings, or you can wipe everything and start from scratch. Each choice will also give you an additional setting to change.

If you choose Keep my files, apps and settings will default to what they were when the PC was brand new. This setting can be turned off by clicking the Change settings link and switching it off. If you choose Remove everything, there's also a way to remove your personal files while saving apps and settings. Click the Change settings link and toggle the Data erasure option to on.

Reset Your Computer

Once you decide what should be removed from the computer, hit Next and Windows will tell you what will be deleted before you make a final decision. If you selected Keep my files, you can look at a list of apps that will be removed with the reset.

Finally, click Reset to actually commit. Your computer will restart, and after several minutes, it will boot back up again. When you return to Windows, you'll see that whatever you selected to be removed has been wiped from the machine. If you backed up your files, they can now be restored to the machine.

2
  • I've been dual booting for a long time and I never knew about either of these, I always pulled out my Windows repair disk. This is a really helpful answer.
    – cat
    Jun 3, 2017 at 13:45
  • 2
    It should be noted that the recent version of grub has os_prober disabled for some reason (I think for security?). So it doesn't detect the Windows bootloader. I had to enable this in /etc/default/grub by adding the line: GRUB_DISABLE_OS_PROBER=false and then I had to run sudo update-grub and reboot. Now, I have a grub menu with the option to boot Windows. Super easy fix.
    – mchid
    Feb 6, 2022 at 14:15
21

I am going to make some assumptions:

  1. That Windows is installed and configured to boot via UEFI.
  2. Ubuntu is installed and configured to boot via UEFI.
  3. You're currently seeing the grub menu at boot.

If any of those assumptions is false, then the following advice will not help you (though it won't hurt anything either):

Create a file, /boot/grub/custom.cfg (by running sudo -H gedit /boot/grub/custom.cfg) with these contents:

#This entry should work for any version of Windows installed for UEFI booting

menuentry "Windows (UEFI)" {
 search --set=root --file /EFI/Microsoft/Boot/bootmgfw.efi
 chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

(Copy and paste the above into the Gedit window that comes up, then save and quit Gedit)

Reboot and you should see an entry titled "Windows (UEFI)" and if you select it then Windows should boot. If that does not work, please run boot info script (http://bootinfoscript.sourceforge.net/ ) and post the RESULTS.txt that it produces so that I have the information needed to give you proper advice.

5
  • 1
    thanks for the reply and i fixed this with easily by installing Grub Tool Nov 16, 2012 at 11:15
  • 2
    I had Mint19 and Windows 10 dual boot system. That was working fine. For some reason, I decided to replace mint19 with ubuntu 18. After the installation, I can only boot Ubuntu. My win 10 doesn't boot anymore. I have the result.txt after executing the script. The RESULTS.txt in my Google Drive:- drive.google.com/file/d/1JAOcZaEGZZbV4q96ADw9cqDnaK_bNLwI/…
    – masiboo
    Oct 30, 2019 at 9:51
  • This gave me: Error: no such device: /EFI/Microsoft/Boot/bootmgfw.efi found Dec 3, 2019 at 21:31
  • I do now have a windows boot option in my grub menu, but it does not boot correctly. errors: invalid signature. Press any key to continue... Jan 28, 2020 at 0:43
  • Thanks. This worked for me, after running boot repair as in @karel's answer
    – effel
    Mar 14, 2021 at 17:23
14

There is no way to undo the partition changes to Windows. You will have to reinstall or recover Windows, then reinstall Ubuntu.

First, try running Boot-Repair(info) and see if this helps. To run this:

  1. Boot from a Ubuntu live DVD or USB.

  2. Type these lines in the terminal one line at a time.

    sudo add-apt-repository ppa:yannubuntu/boot-repair
    sudo apt-get update
    sudo apt-get install boot-repair
    
  3. Search for Boot-Repair in the Dash and launch it.

    enter image description here

To fix your computer with Boot-Repair, simply click the "Recommended Repair" button. If it worked, you are done.


If Boot Repair didn't work, run a repair with a Windows Recovery CD (ask for one from your PC manufacturer).

  1. Boot from a recovery CD. You should see this.

  2. Open the Command Prompt app and type bootrec /fixmbr.


    (images from HowtoGeek)

  3. Close the Window and choose "Startup Repair" this time. Wait until the process is completed. It usually takes about 30 minutes-2 hours.

If Windows is successfully repaired, you are done. If it is not, you will have to reinstall Windows with a Windows Installation CD.

If you don't have a Windows Installation CD, you could boot an Ubuntu live DVD/USB and install a bootloader with equivalent function to the Windows bootloader.

sudo apt-get update   
sudo apt-get install lilo  
sudo lilo -M /dev/sda mbr  

Lilo will give you a warning after it's installed, but you can ignore that as lilo works fine when it is used as a Windows style bootloader.


Next, after Windows is installed or recovered, you will have to delete the Ubuntu partitions. Identify them and delete it with the Disk management Utility in Windows.

enter image description here

After that, reinstall Ubuntu the same way.

5
  • 3
    boot repair says its recommended repair should fix problems when you can't boot Windows after installing Ubuntu
    – damien
    Jun 28, 2012 at 3:05
  • Oops, forgot about that. Thanks for reminding me! Jun 28, 2012 at 4:58
  • Thanks for the Answer. I was able to boot windows again [Ubuntu's disc partition tool did not work.] I am only having a problem with deleting the Ubuntu partitions because i simply can not find them. When i restart my computer now, GRUB is gone, and it default runs windows. In my disc partition Utility there are 4 disks: 1. OS (C:) disk which is 20% occupied. (im guessing this is the windows part) 2. 3 Discs of 17GB, 3GB, and 8GB (which im guessing where made during the partition but hve NOTHING on them.) Should i delete them all?keep them all? Should i reinstall Linux but use the partitions t
    – Mike
    Jun 28, 2012 at 17:49
  • Back to your problem: OS(C:) is definitely the Windows Part. The 3 partitions you told me aren't empty, it's just Windows can't read them. To verify that those are the Ubuntu Partitions, go to Windows Explorer and see if you only see OS(C:). If you only see OS(C:), then those are Ubuntu partitions. You can delete them safely. Jul 1, 2012 at 3:54
  • And no. The stuff in those partitions are probably corrupted, so I recommend deleting and recreating the partitions if you want to install Linux again. Jul 1, 2012 at 3:59
11

If the OSs were installed in different modes, dual booting Windows and Ubuntu can't work. If your Windows is installed in BIOS mode, it is recommended to install your Ubuntu in BIOS mode, but if it's installed in UEFI mode, then do the same with Ubuntu. The easiest way to find out if you are running UEFI or BIOS is to look for a folder named /sys/firmware/efi. The folder will be missing if your system is using BIOS.

enter image description here
          BIOS vs. UEFI

If you have installed Ubuntu in legacy mode on the same drive with GPT partitioning, you can use Boot Repair's Advanced options to uninstall grub-pc and install grub-efi-amd64. That converts the Ubuntu installation from BIOS boot to UEFI boot, the same firmware as most recently manufactured laptops with Windows pre-installed have.

Converting Ubuntu into UEFI mode

  1. Start Boot-Repair, and select Advanced options -> GRUB location tab.
  2. If you do not see a Separate /boot/efi partition option, this means that your PC does not have any UEFI partition.
  3. If you see a Separate /boot/efi partition option, put a checkmark in the checkbox to the left of it, then click the Apply button in the lower right corner.

    enter image description here

  4. Set up your BIOS so that it boots the hard drive in UEFI mode. The way to adjust this setting depends on the specific model of the computer, but generally this setting is located in the boot priority settings under the Boot tab of the BIOS/UEFI setup utility.

For more information about converting Ubuntu into UEFI mode review https://help.ubuntu.com/community/UEFI in the section about Converting Ubuntu into UEFI mode.

The grub bootloader can also be converted in the opposite direction from UEFI to BIOS. Linux can boot fine from a GPT disk in BIOS mode. See this question: Convert from EFI to BIOS boot mode

7

Boot-Repair will take care of this.

First open a new Terminal, then type:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair

Boot-Repair

See also reference and how-to for this tool

0
7

The already installed Windows OS wasn't detected when you installed Ubuntu. os-prober from the default Ubuntu repositories detects other OSs available on a system and outputs the results in the terminal. If os-prober doesn't work, check if the command sudo fdisk -l is able to find the Windows partition.

If you found the Windows partition then type sudo update-grub . sudo update-grub updates the GRUB bootloader and corrects incorrect entries. This command solved my problem which is shown below.

sudo update-grub && sudo reboot updates the GRUB bootloader and reboots.

I installed Ubuntu alongside Windows 10. Now I can't see the option to start Windows in the GRUB boot menu.

Note: the partitions still exist.

enter image description here

3

Make sure you boot in UEFI mode. Use sudo efibootmgr -t nn to utilize your EFI's menu. You can choose Windows Boot Manager or ubuntu (GRUB).
NOTICE: Windows will erase GRUB installation at its own EFI system partition each time BOOTMGR is updated.

2

If you are using Bitlocker, you probably made some changes to the partitions right before installing Ubuntu (like freeing up unallocacted space for the Ubuntu installation), then you may get that problem because GRUB cannot deal with the security prompt that appears when starting windows that asks you for the bitlocker recovery key.

I had almost the same problem after installing Ubuntu 16.04.02 alongside Windows 7. Ubuntu would start fine, but after choosing the Windows 7 loader from GRUB, the screen would show some strange pattern of regular multicolored skewed lines and stay stuck there until the processor fan would turn on and hot and I decided to shut down the computer to avoid damage.

Salvation came from using Hiren's Boot CD and using the Boot Windows 7 option in the main menu therein, which allowed me to get to the prompt for the bitlocker recovery key, enter the key, suspend and resume bitlocker in my windows session, and use my dual boot system as intended afterwards.

0
2

Method1

1.Enter Windows recovery mode by pressing "esc"(may be different way on your computer) while booting.

2.Click on "Troubleshoot"

3.Click "Advanced options"

4.Choose "Command Prompt

5.Type the following commands: 

bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd

6.Now restart your computer

Good if this works for you, if not then try

Method2.

1.Use Rufus to make Ubuntu live USB drive and boot into Ubuntu.

2.Start terminal type

sudo fdisk -l

3.Note down the root partion of linux installation.
Example: (/dev/sda8) in my case.
and your boot partion which is indicated by * sign.
Example : (/dev/sda6) in my case.

4.Now mount your root partion to make some changes and some binding. Below replace "/dev/sda8" with your root partion.

sudo mount /dev/sda8 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

5.Now change the root directory from usb drive to the hardrive's root directory

sudo chroot /mnt

6.Now install the grub to the boot partion of your's, which you noted down with the * sign replace "/dev/sda6" with your boot partion.

grub-install /dev/sda6

7.Now type.

exit

8.Unmount partation previously mounted earlier.

sudo unmount /mnt/dev
sudo unmount /mnt/proc
sudo unmount /mnt/sys
sudo unmount /mnt

9.Remove the pendrive and reboot your pc.

And next time while dual booting window and linux refer this answer Dual boot Windows and linux

1
  • 1
    In step 5. sometimes it also helps to run the command bootrec /scanos before running the command bootrec /rebuildbcd. The /scanos option scans all disks for installations that are compatible with Windows. It also displays the entries that are currently not in the BCD store. This screenshot shows all 4 commands together in step 5.: i.stack.imgur.com/qrnMl.png
    – karel
    Nov 18, 2017 at 13:12
2

i have a boot fixer too... not (sorry i couldn't resist ;)

Running the update-grub from live Stick ruined my boot entries. but let me boot into the installed system. (ubuntu 20.04)

In my simple case I just had to run update-grub again from the installed and properly booted linux system. which would find the windows bootloader... and an 'grub-install' after would persist it.

I have a triple boot system. so this is becoming a common process. its not like 10 years ago anymore ;)

1

Press and hold Shift during booting this should bring you the Grub Menu. Or if you just want the menu to appear always then edit your /etc/default/grub file

sudo gedit /etc/default/grub

Insert "#" at the start of the line GRUB_HIDDEN_TIMEOUT=0.

Now save then run:

sudo update-grub

This should be fine to make Grub menu appears on every boot.

It's better to take a look for this GRUB wiki https://help.ubuntu.com/community/Grub2

2
  • 1
    still the same thing happened, it wont show the grub menu Jun 16, 2015 at 6:07
  • did you edit the grub file? in /etc/default/grub?
    – Maythux
    Jun 16, 2015 at 6:09
1

Some secure boot machines cannot seem to boot Windows from grub. A workaround is to provide a different set of EFI files for each type of boot, putting the second set for Ubuntu on a USB stick, and leaving the EFI files on the hard disk for Windows.

You have a working Ubuntu set of EFI files already on the hard disk, so take a (small) USB stick (empty, as you will lose all data on it), put a GPT partition table on it, and make a 250M partition for the EFI files. Copy the hard disk's EFI files to the stick. They will appear in the /boot/efi directory, under the directory EFI.

Take the EFI directory and all its contents, and put it on the USB partition. I'd suggest editing the stick version of EFI/ubuntu/grub.cfg to change the name of the menu item "Ubuntu" to "Ubuntu on USB" or something to make it obvious which set of files you are booting with.

Now try booting from the USB, and see if you get the altered menu item, and that it works. When the USB boot is working, you may simply go to /boot/efi/EFI/Boot, which should be the hard disk's EFI partition, and it should contain copies (possibly with different names) of the Ubuntu versions of the boot files, which should also be in /boot/efi/EFI/ubuntu.
Use md5sum to confirm that you have copies of all files which are in /boot/efi/EFI/Boot, because you are going to delete them! Copy and rename the file /boot/efi/EFI/Microsoft/bootxmgfw.efi to /boot/efi/EFI/Boot/bootx64.efi and you should be able to boot windows from the hard disk again -- remove the stick and try the Windows boot.

When you update the kernel, and get a new grub.cfg generated on the hard disk (unused, since the hard disk boots only Windows), you will have to copy it yourself to the USB stick's EFI/ubuntu/grub.cfg.

Hopefully, at some point, the issue of grub not booting Windows on your machine will be fixed, and you can simply replace the hard disk's EFI/Boot file with the ones on the stick's EFI/Boot.

Just make sure you have copies of anything you delete, so you can replace them if necessary. This technique worked for me on a Toshiba.

1

Make sure that the Windows 10 installation partition is still there and proceed according to this answer:

The default installation of Windows 10 requires a minimum of 4 partitions:

  1. sda1 (Recovery)
  2. sda2 (For computers that boot in EFI mode the EFI System Partition (ESP) is normally mounted at /boot/efi.)
  3. sda3 (MSR)
  4. sda4 (Windows OS, usually "C")

If the /boot/efi partition or the MSR partition has been damaged or deleted during the Ubuntu installation, you might not be able to see Windows in grub. Try the following command in Ubuntu to show all the available partitions:

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

It should give you an idea of what happened to your system and allow you to check if all the partitions are still there. You might try to repair Windows with the Windows installation DVD/USB.

You can try to install the Grub Customizer application and see if Windows is available in
the list:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Then you can launch Grub Customizer and change which operating systems are available to boot.

Here's a screenshot of what a correct installation looks like:

enter image description here

1

In my case I made clean install of Windows 7, left some space unallocated on SSD and during subsequent Mint 18.3 install with default "Alongside" option did not got Windows in grub boot menu.

The solution was simple: ran command below in Mint and Windows 7 was added to grub menu along with Memtest btw.

sudo update-grub
1

I had a similar problem. After changing order of boot in bios, it booted on Windows but only on safe mode. To solve that I did Windows+R->msconfig->boot:normal. And everything was solved. Hope this can help.

1

First try this source:

Insert your Windows installation DVD/USB and boot from it. Choose your language and click Next. When prompted to Install now just look left down to that window and click Repair your computer. Wait and a new window will pop up with the operating systems installed in your PC. Click on Windows 7/8/10 and click Next. In the next window click Command prompt. When the command prompt appears type this:

bootrec /fixboot

Press Enter and type:

bootrec /fixmbr

Press Enter again and then close that command prompt window and restart your PC. Don't forget the space between bootrec and /.

After that you will no longer have the option to choose between operating systems to boot on startup. You will have to repair grub. You can do that with an Ubuntu live DVD/USB. The easy way is after repairing the Windows bootloader, format the Ubuntu partition(s) and reinstall Ubuntu. To repair grub after repairing the Windows bootloader, try this.

To repair grub:

  1. Boot from the Ubuntu live DVD/USB.

  2. Open the terminal and run sudo fdisk -l to see where Ubuntu is installed.

  3. Run sudo mount /dev/sdaX /mnt where X is the partition number in which you found Ubuntu installed.

  4. Run sudo grub-install --root-directory=/mnt /dev/sda

To install grub:

  1. Run sudo update-grub to update grub, and if this command didn't work run it after rebooting.

  2. Reboot with sudo reboot.

Note: For me the command in step 5. didn't work, so I restarted the computer and after restarting the computer booted directly to Ubuntu, so I logged in as root and ran this command:

update-grub

That solved the problem.

0
0

First we will bring back the windows MBR then we will reinstall the grub and bring linux back

Fixing Windows MBR(You can either go for solution 1 or solution 2 both works) Boot Linux and make sure you’ve a working Internet connection and type the following on the terminal.

1. Solution

sudo apt-get install syslinux

If the package got installed, use the following command to write the MBR:

sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda

2. Solution

sudo apt-get install mbr

If the package got installed use following to write the MBR.

sudo install-mbr -i n -p D -t 0 /dev/sda

Common for both

Replace sda if you want to install the MBR to a different drive. Do not put sda1,sda2, or sda3. Just put it as sda for the hard disk.

Next we need to install the grub,rerunning the boot-repair will fix this and reinstall grub.Reboot and both will work

5
  • No luck. I tried both your solutions with /dev/sda (my Windows 8 seems to be on /dev/sda3 though). Both solutions were followed by "boot repair", this and this are the result of it. I don't see any change. Since, I am not expert in this, is it worth trying both the options with /dev/sda3? Also note that, everything in Windows is accessible to Ubuntu, so if we want to do some hack, we can! Please suggest.
    – iammilind
    Aug 10, 2013 at 18:54
  • @iammilind now i doubt that te issue is caused by boot-repair itself.Lets try another alternative of installing grub.I recommend rescatux from supergrubdisk.org/rescatux. They have videos on how to recover grub. youtube.com/watch?v=hWaXANSNUcE . So restore windows mbr like I said in the above post without boot-repair ,and try booting directly to Windows ,If it works we know the issue is with boot-repair else try booting with rescatux and repair the grub
    – Stormvirux
    Aug 11, 2013 at 2:44
  • I tried your solutions without using "boot-repair" and no luck. Note that when I run solution-2, nothing is printed on the shell unlike solution-1 where there is some output. Now I am trying "Rescatux" tool for a while, I downloaded its .iso and using "Unetbootin", created its bootable image on USB which creates a "boot" folder and some files. BUT how to start this software?? In all its tutorial they start with the software already ON (which is bad for newbie). If I restart my OS with USB on, it naturally says "No OS found" (because there is only folders and files). Can you tell how to use it?
    – iammilind
    Aug 11, 2013 at 4:51
  • @iammilind rescatux.berlios.de/wiki/Main_Page
    – Stormvirux
    Aug 11, 2013 at 4:56
  • Earlier, I had followed the same wiki for creating USB image, but then couldn't get the option for how to start? Or may be I haven't understood the article properly. Can we have quick chat.
    – iammilind
    Aug 11, 2013 at 5:11
0

All the options that you have tried seem to be for Windows 8 in mbr mode, but you are using UEFI, so you should repair UEFI partition; when my windows bootloader got corrupted, i tried the following command.

bcdboot c:\windows /s f: /f ALL

here c:\windows is the location of the windows folder on the windows (c:) partiton.

/s is an option which allows to install the UEFI bootloader files on the UEFI System Partition , which is fat32 formatted and in my case was (/dev/sda4 ) so f:

(f: is the letter of the uefi partiton)

after this command has executed you would get installtion successful/failed

This should re-install your windows 8 boot code in the UEFI partition.

This command i had tried when booting from the repair disk and select advanced option and then command line repair.

You can create a recovery disk by by going in the control panel, and choosing backup and recovery -> create recovery disk/usb or you could borrow it from someone.

PS. If you have not already tried, then you could try all the options displayed in your grub menu, particularly refind, which automatically detects all UEFI OS. You could also try all the windows entries in the grub menu to check if any one of them works. Then you could switch your uefi mode to BIOS from your BIOS menu at system startup and then checkout what options its displaying there, and if any of them work.

10
  • I have tried all the options displayed in GRUB, including the repairs and rEFI options; but din't work. Is the command you displayed harmless (i.e. doesn't wipe out both OSs)? Then I can give a try from Windows command prompt. I don't know how to go to control panel because Win8 is not starting. Can you elaborate more about creating recover disk?
    – iammilind
    Aug 13, 2013 at 6:29
  • yes the command is harmless, it just copies/replaces the windows bootloader files in the EFI system partition...as a precaution you could copy the contents of the Efi partition and replace them if something goes wrong. to create the recovery disk- windows.microsoft.com/en-US/windows7/…
    – abchk1234
    Aug 13, 2013 at 7:08
  • I tried that option and it posted the message "Boot file successfully created", then shut down and restarted the PC but no difference. I ran repair as well. Did a quick test provided by Sony VAIO, which shows no error. It seems that couple of "Cold shutdowns" of Win8 has put it into an undefined state. If you have any more pointers, it will be quite helpful.
    – iammilind
    Aug 13, 2013 at 8:35
  • Yeah that would be my opinion as well, the booting part seems to be correct, but theres some problem with windows. I am looking into it and will let you know if i get anything. In the meantime try searching for your problem on the Windows forums..
    – abchk1234
    Aug 13, 2013 at 12:41
  • 1
    try this guide, it tells how to boot windows 8 in safe mode, maybe it helps- helpmyos.com/t2803-how-to-run-windows-8-in-safe-mode and addictivetips.com/windows-tips/…
    – abchk1234
    Aug 13, 2013 at 13:56
0

Follow these steps:

  1. Open terminal by pressing Ctrl+Alt+T Or Search Terminal in Dash.

  2. Enter the following command in Terminal:

    sudo -H gedit /etc/default/grub
    

    (This will open grub configuration file in gedit.)

  3. Edit the file and change following options as following (remove comments # before any of below lines) and save the file:

    GRUB_DEFAULT=0  
    GRUB_HIDDEN_TIMEOUT=0
    GRUB_HIDDEN_TIMEOUT_QUIET=false
    GRUB_TIMEOUT=10  
    
  4. Run the following command in new instance of terminal:

    sudo update-grub
    
  5. Restart your computer, you should be now able to boot Windows if you partitioned your system correctly

6
  • sudo gedit/etc/default/grub:command not found showing error Mar 25, 2015 at 13:15
  • there is space between gedit and /etc/.... Mar 25, 2015 at 13:15
  • While trying to save that showing some error like couldnot not find the file /home/ram/etc/default/grub Mar 25, 2015 at 13:24
  • copy paste my commands in terminal, you should execute : sudo gedit /etc/default/grub Mar 25, 2015 at 13:29
  • 1
    okay u you try this, execute this command from terminal(Copy paste it, it is a single long command)without quotes, then select recommended repair : "sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update && sudo apt-get install -y boot-repair && boot-repair" Mar 25, 2015 at 15:58
0

I am going to make some assumptions:

  1. That Windows is installed and configured to boot via UEFI.
  2. Ubuntu is installed and configured to boot via UEFI.
  3. You're currently seeing the grub menu at boot.
  4. After Windows has been upgrade to 2021 April? Grub Menu disappeared
  5. I use UBUNTU USB BOOTED AND Install Boot-repair and chosen auto-repair and successfully install grub menu again.
  6. But fail to boot into Windows 10.

I failed to use Boot-Repair to make Windows 10 to boot successfully. When Windows attempted to auto repair start up it failed.

Solution that worked for me finally. (with our using any command line or other programs)

  1. I used https://launchpad.net/grub-customizer to load up in UBUNTU 20.04.3 and just click SAVE after it finished loaded.
  2. reboot
  3. go to windows boot in the grub menu.
  4. Allow it to auto repair by itself.
  5. The finished success repaired displayed.
  6. Reboot.

My Windows 10 now booted normally.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .