Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've a ASUS N56VZ with Intel Core i7 - 3610QM, with Win 7 Home Premium x64 pre-installed. This computer come with EFI instead of the traditional BIOS. When I bought it, I had 3 visible partitions. C (System) - with windows and programs; D (Data) - in blank, I store my personal data and movies; E (Recovery) - software from ASUS to recovery computer.

So, as I'm at a Master's Degree in Computer Science, I needed to install Ubuntu. I made a partition from Win 7, reserving around 35 GB for Ubuntu 12.04

It went fine, and the install was sucessful. I rebooted and I could get into Ubuntu. The boot showed 4 entries: 2 for Ubuntu, and one for Windows and one, for Windows Recover. When I tried to enter Windows 7, "Windows 7 (loader)", I got this message: "error: Invalid EFI file path. Press any key to continue..." The one for recovery couldn't boot either.

So I get in Ubuntu again, and use repair-tool, which insert new entries on GRUB. Now I have 11 entries. lol One of the new entries is called "Windows UEFI loader". The old entry "Windows 7 (loader)" continued to not work. This new one, "Windows UEFI loader", got me into Windows. And I stooped here.

I want a single boot manager with just the two needed options.

I think that this isn't perfect, but I don't know how to solve it. More, if I'm on Windows 7 and I put it to hibernate, when I turn on the computer, I get a black screen and the message saying that it couldn't restaure the session. (I'm not sure about the exact words. - I was oblied to reboot and start the windows again.) And this is a major concern. I would like to solve this too.

Here is the link after running the boot-repair: http://paste.ubuntu.com/5591789/ This one I made it today, with boot-repair and asking for Boot info summary: http://paste.ubuntu.com/5593329/

Best regards, David

share|improve this question
add comment

3 Answers 3

The Boot Repair tool is increasingly making a hash of things by creating too many backup copies of too many boot loader files. There are numerous ways to solve this problem. Here's one of them:

  1. Back up your EFI System Partition (ESP), which is /dev/sda1 in your case and is mounted at /boot/efi. A file-based backup (using tar or cp, for example) should do fine. This will enable you to recover should things go badly.
  2. Install my rEFInd boot manager. This is most easily done by installing the Debian package.
  3. Reboot. rEFInd should appear and show you boot options for Ubuntu and Windows.
  4. Test each of the rEFInd options in turn, taking note of the filename specified under each and what it does. (A few may lack such filenames. One with a Windows icon will probably be one of these, but it will probably launch GRUB.) Be sure you can boot both Linux and Windows from rEFInd.
  5. In Linux, open a shell and change to the /boot/efi directory, which is the EFI System Partition (ESP), where boot loaders are stored.
  6. Delete the boot loaders that didn't work when you tested them, or copy them into a backup location (say, /boot/efi/backups). Do likewise with duplicates -- if two boot loaders both launched GRUB, for instance, you can delete or move one of them.
  7. Move the boot loader that actually launched Windows (if it was identified by filename in rEFInd's main menu) to /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi. This is where it's supposed to belong. Boot Repair copied it to another filename, so you're just copying it back.
  8. If you can boot Linux directly via a vmlinuz-3.5.0-23-generic entry, you can probably delete GRUB, or uncomment the dont_scan_files line in /boot/efi/EFI/refind/refind.conf and add grubx64.efi to its list.

If all goes well, you should now be booting via rEFInd, which should present you with a much smaller list of boot options. If there are still too many, you can try to track down the errant files and delete them, if you think that's appropriate, or use the dont_scan_files, dont_scan_dirs, or dont_scan_volumes options in /boot/efi/EFI/refind/refind.conf to keep the remaining items out of the boot list. Such "blacklisting" might be helpful to keep links from /vmlinuz to /boot/vmlinuz-3.5.0-23-generic out of the boot list, if your system has such a symbolic link.

Note that rEFInd scans for boot loaders on every boot, so it will automatically pick up new kernels when you install them.

If you prefer to keep using GRUB, you can do something conceptually similar to my procedure, but you'll need to peruse the /boot/grub/grub.cfg file and cross-reference this to your notes on which boot loader entries work and which don't work to discover which files to delete. You'll then need to use update-grub to re-write your grub.cfg file. Your current grub.cfg file also has BIOS-mode entries for launching Windows, which are useless, and I'm not sure how to keep update-grub from picking them up, if indeed that's how they got in there.

Good luck!

share|improve this answer
    
I got 1 MacOS, 1 Ubuntu, 1 Windows. I found out that scan_all_linux_kernels 0 can help eliminate unused boot entries (rEFInd seems automatically find all linux kernels). So now in the rEFInd boot list I have 1 MacOS, 1 Ubuntu, and ... 2 Windows and 1 Linux that.. boots into Windows. How to remove the Windows entries? –  Krypton Feb 25 at 2:10
    
The extra "Windows" entry was almost certainly created by Boot Repair's option to back up the Windows boot loader and replace the original by another copy of GRUB. You can re-run that tool, select the Advanced option, and tell it to restore its backups. –  Rod Smith Feb 25 at 13:51
add comment

You just need to edit your /boot/grub/grub.cfg to remove the useless entries.

You can use the gksudo gedit /boot/grub/grub.cfg command for this.

share|improve this answer
    
But how do I solve the hibernation problem on Windows? –  user138513 Mar 9 '13 at 1:18
    
This is another subject. Please create a new question for this. –  LovinBuntu Mar 10 '13 at 10:10
    
But the problem only appear after the installation of Ubuntu and the bual-boot situation. Previously, it was OK. –  user138513 Mar 10 '13 at 13:56
    
Other ticket created here (exactly the same problem) –  Pierre de LESPINAY Jun 5 '13 at 16:54
add comment

Here You find links to GRUB/UEFI related probs. As well it could be a badly implemented UEFI by the main board manufacturer which produces errors in combination with Linux. Also, there are specific tips for dealing with Win7 and 8, like defragment and switch fast-start off, before installing Linux, etc.

Check, if your Win7 is listed in /boot/efi/EFI/ and check out the chainloader section in GRUB2. All in all, not too complicated for experienced Linux users, but tough for Linux Newbies. Better, ask for help, because you need to do a lot of reading; this is no one button solution.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.