0

I made a partition for Ubuntu a while ago and it worked fine.

My problem began after trying to install burg

I followed this YouTube video guide to install burg and after having some troubles I tried following the instructions in this blog post and then burg booted fine in test mode so I restarted my computer in order to test BURG but before even reaching the grub/burg boot screen my computer went into hardware diagnostic mode (it's a Dell computer) during boot.

After a few failed attempts to boot my computer I decided to reinstall Ubuntu using a live-usb. While reinstalling Ubuntu I decided to install over my existing Ubuntu.

When the installation was finished I tried to reboot my computer and a GRUB screen appeared with only an option to boot Ubuntu.

I went into the basic boot-menu and didn't find windows in there. I could not find the windows partition anywhere.

I made a scan of my partitions in order to understand what is going on:

my computer partitions looked like that.

I used boot-repair - here is the report: https://pastebin.com/wh2mPuJX

At the moment I have my Ubuntu partition working well but my windows partition is nowhere to be found.

I need help repairing my partitions.

Edit: following the user answer I tried to reboot the computer and this grub menu appeared:

none of the shown efi files led to windows.

Zanna
  • 70,465
  • 1
  • 1
    This "possible duplicate" vote came in as I was typing my answer, so I didn't see it. I agree that they're duplicate questions, but I'd prefer this one to stay open and the other to be closed, given that my answer is here and there is, as of yet, no answer to the other question. Perhaps when the dust settles a moderator should consolidate answers, if that's possible. – Rod Smith May 13 '17 at 19:56

1 Answers1

2

My Diagnosis

I can't be 100% sure, but I think what happened is this:

  1. Your computer came from the factory configured to boot Windows (10?) in EFI/UEFI mode from a GPT disk. Your Boot Repair output is very consistent with this type of setup.
  2. You installed Ubuntu. Based on your description, this was probably successful, and I'm guessing it was done in EFI mode.
  3. You decided to install BURG. Unfortunately, the last I heard, BURG was a BIOS-only boot loader. Getting BIOS-mode and EFI-mode installations to coexist on a modern EFI-based computers is possible but tricky, and it's seldom worth the effort. Your description makes it clear that you had problems at this step, most likely because you did not understand the intricacies of such a mixed-mode setup. A BIOS-mode BURG would not have been able to boot your EFI-mode Windows installation, anyhow; it could only have launched Ubuntu.
  4. You ran Boot Repair, which seems to have re-installed your EFI-mode GRUB. This worked partially, but for some reason it's not detecting your Windows installation.

I wanted to summarize your problem in order to emphasize the likelihood that it was caused by the attempt to install a BIOS-mode boot loader on a system that was booting in EFI/UEFI mode. The fact that almost all new computers use EFI firmware is critically important for anybody who scratches the surface on boot loaders, but the implications of the use of EFI are still poorly understood and can jump up to bite people -- especially long-time multi-booters who try to install old BIOS-mode tools like BURG on new computers.

The Simplest Fix

The least radical way to proceed is to try to get GRUB to work completely. In theory, it should be detected, but I think I see why it hasn't been found, and the solution is fairly straightforward:

  1. Open /etc/fstab in your favorite editor. (You'll need to do this as root, typically by launching the editor via sudo, as in sudo nano /etc/fstab.)
  2. Locate the line that begins #UUID=4E1D-DC46 and remove the # character from the start of that line.
  3. Save the file and exit from the editor.
  4. Type sudo mount -a.
  5. Check to be sure that /boot/efi is not empty. At a minimum, it should have a directory called EFI (or possibly some case-only variant of that, like efi; case is irrelevant on the FAT filesystem that should be mounted there). If /boot/efi is empty, something is wrong and you should fix the problem. (Note that you won't be able to access this directory as a normal user; you must use sudo or be root.)
  6. Type sudo update-grub. This will cause the GRUB configuration file to be rebuilt.

When you reboot and the GRUB menu appears, it should now include an option to boot Windows.

Another Option

If you don't like GRUB, you may want to look into one of the several other EFI boot loaders for Linux, as summarized on this page of mine. I've never been a BURG user, but if you wanted to make a prettier boot loader menu, my own rEFInd boot manager may be of particular interest to you. (The older rEFIt might also be appealing, but has long since been abandoned; I forked rEFIt into rEFInd because rEFIt development had halted.)

Note that you can test rEFInd without fully installing it by using it on CD-R or a USB flash drive. (Images for both are available on the rEFInd downloads page.) If you decide to use it permanently, you can install it using the Debian package, PPA, or (if you're running Ubuntu 17.04 or later) the refind package in Ubuntu.

Learning More

I recommend you read one or more of the following pages to learn more about EFI-mode booting and how BIOS-mode and EFI-mode booting can interact on a single computer:

EDIT: Probable Filesystem Damage

The fact that rEFInd is showing a Windows option but producing a Failed to open file message indicates that your ESP is probably suffering from filesystem damage. To recover, I recommend:

  1. Boot to Ubuntu.
  2. Back up all the files from the ESP (/boot/efi in Ubuntu). You can use cp, tar, zip, etc.
  3. Unmount the ESP (sudo umount /boot/efi).
  4. Type sudo dosfsck -a /dev/sda4. This should repair the filesystem on the ESP.
  5. Re-mount the ESP by typing sudo mount -a.
  6. Check that the filesystem looks OK. In particular, check the EFI/refind, EFI/ubuntu, and EFI/Microsoft/Boot directories under /boot/efi. They should all have files that match those in your backup. If not, you're on shaky ground and should be prepared with rEFInd on a USB flash drive or CD-R so you can boot to Ubuntu if the next step fails.
  7. Reboot. With any luck, you'll now be able to boot to Windows from rEFInd, although GRUB will not yet boot Windows.
  8. If you can boot Windows, stop; you're done; but if you can't boot Windows, use rEFInd to reboot to Ubuntu and continue....
  9. Unmount the ESP (sudo umount /boot/efi).
  10. Make a new filesystem on the ESP (sudo mkdosfs -i 4E1DDC46 /dev/sda4). Be very careful with this command; if you specify the wrong partition, you could trash Windows or Ubuntu! Note that the -i 4E1DDC46 part sets the new filesystem to use the same ID code (UUID= value in /etc/fstab) as the old one, which means you won't need to edit /etc/fstab. If you omit this part, you'll need to edit /etc/fstab.
  11. Type sudo mount -a to mount the new filesystem on the ESP.
  12. Restore the backup you created earlier.
  13. Reboot using rEFInd and try again.
  14. If you still can't boot Windows, then you'll probably need to use Windows-specific recovery procedures to re-install the boot loader. If you happen to have a backup from before the problems started, though, you could restore from the backup.

After you follow this procedure, if you run sudo update-grub, chances are GRUB will begin to show a Windows option, too.

Note that damaged ESPs are often caused by a failure to disable the Fast Startup and/or Hibernation features in Windows. See here and here for information on how to disable these features. You should disable them immediately.

One more comment: I note that your boot message shows that rEFInd launched EFI\Microsoft\Boot\bootmgfw.efi, which in turn tried to launch EFI\Microsoft\Boot\grubx64.efi (a Linux boot loader). The most likely reason you'd see bootmgfw.efi attempt to launch grubx64.efi in EFI\Microsoft\Boot is if you used the option to back up and rename boot loader files in Boot Repair's Advanced tab. This option can work around problems with some buggy EFIs, but it's possible it will prove to have created problems in your case. IIRC, Boot Repair provides an option to reverse this move/rename operation, and you might need to use that option, but don't do so right away -- first see what you can get working by following the procedure I've just outlined. If all this fails, you may need to use Windows recovery tools to restore the Windows boot loader. It will then be set to the default, though, at which point I recommend either using EasyUEFI in Windows to move rEFInd or Ubuntu to the top of the boot list, or using rEFInd on an external medium to boot into Ubuntu and then using refind-mkdefault (which comes with rEFInd) to restore rEFInd as the default boot program.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • While rebooting after following your steps the following options were showen in the grub menu: http://imgur.com/a/ht9qb and none of those led into windows – user6072878 May 13 '17 at 20:11
  • In that case, I recommend you try rEFInd, as noted under "Another Option" in my answer. – Rod Smith May 13 '17 at 21:07
  • I have opend your bootloader and it looks amazing and after selecting windows it showen me this http://imgur.com/a/lWHZG and returned me to the main screen – user6072878 May 13 '17 at 22:58