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 have a Lenovo IdeaPad Y400 that came pre-installed with Windows 8. I would like to run Ubuntu alongside it in a dual-boot configuration. I've spent the past week fiddling around, re-installing both Windows and Linux in various configurations, and I've come awfully close to success, but seem to have hit a snag with Grub.

For my most recent attempt, I took the following steps:

  • Disabled Secure Boot
  • Re-imaged Windows 8 from a hidden recovery partition, effectively restoring the machine to factory state
  • Activated an option called Legacy Support in the BIOS (or is it UEFI now?)
  • Booted Ubuntu 13.04 x64 from a USB stick, chose "install alongside Windows" and accepted all default options
  • After a restart, found that I could boot Ubuntu, but could not boot Windows
  • Once into Ubuntu, I ran Boot Repair with recommended settings and accepted all defaults.
  • When Boot Repair finished, I was presented with the following message:

The boot files of [The OS now in use - Ubuntu 13.04] are far from the start of the disk. Your BIOS may not detect them. You may want to retry after creating a /boot partition (EXT4, >200MB, start of the disk). This can be performed via tools such as gParted. Then select this partition via the [Separate /boot partition:] option of [Boot Repair]. (https://help.ubuntu.com/community/BootPartition)

  • I followed the instructions at the url in the message, creating a 1GB EXT 4 partition near the start of the drive
  • when I tried to run Boot Repair again, the "Separate /boot partition" option on the "Grub Location" tab was disabled.
  • The new partition is /dev/sda11 and has the label GRUB.
  • On restart, I get the following error message:

error: file '/boot/grub/i386-pc/normal.mod' not found. grub rescue>

  • However, if I manually choose the boot partition by hitting F12, I can boot into Windows no problems. Selecting Ubuntu from the boot device menu gives me a Grub menu with the following options:

Ubuntu

Advanced options for Ubuntu

Windows UEFI recovery bootmgfw.efi

Windows Boot UEFI recovery

Windows UEFI recovery LrsBootmgr.efi

Windows Boot UEFI recovery bkpbootx64.efi

Windows Recovery Environment (loader) (on /dev/sda3)

Windows 8 (loader) (on /dev/sda5) System setup

  • Selecting Ubuntu from this menu allows me to get to my Ubuntu desktop. I haven't tried the other options yet for fear of losing the progress that I've made.

So it looks like I have successfully dual-booted the machine, but that Grub is broken for some reason or another.

My current partition scheme can be seen at: http://paste.ubuntu.com/5948753/

Thanks in advance - Jonathan

share|improve this question
    

2 Answers 2

Rod Smith covered most of the issues.

The far from start of disk is a red herring. I have yet to see an UEFI system not boot. That was just a check for some BIOS systems that had grub boot issues.

You added a boot flag to your new grub partition so it tries to see it as an efi partition. (From Rod Smith I learned you can only have one efi partition per gpt partitioned drive.) Grub does not use boot flags anyway. And only on BIOS with MBR partitioning did you set boot flag on Windows NTFS partition.

Grub2's os-prober does have a bug and still creates BIOS type boot entries that will not work. grub2's os-prober creates wrong style (BIOS) chain boot entry https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1024383 type of entry from Boot-Repair that should work. menuentry "Windows UEFI bootmgfw.efi" { menuentry "Windows Boot UEFI loader" { Type of entry that does not work: 'Windows ...) (on /dev/sdXY)'

share|improve this answer

First, activating "legacy support" was the wrong thing to do. On a computer with Windows 8 pre-installed, activating legacy support in the firmware makes it possible to go down paths that will create new problems, and in fact that's precisely what you've done. (That said, sometimes it really is necessary to activate this support, but it's more likely to cause problems than to solve them.)

Second, the "boot files... are far from the start of the disk" message is almost certainly a red herring. This can be a factor with certain disk sizes and certain BIOSes, but you've got an EFI implementation, not a BIOS. An EFI should be able to boot from kernels located anywhere on any disk currently available. Certainly your 1TB disk should pose no problems. Thus, everything you did from that point on was unnecessary at best and problem-producing at worst.

Despite your activation of legacy support in the firmware, it's conceivable that your system would have booted Windows after you ran Boot Repair. You don't say whether you tried to do so at that point, though, so it's unclear if it would have worked or if you just tried to fix the "far from the start of the disk" non-problem without testing it.

Somewhere along the line you seem to have installed the BIOS (legacy) version of GRUB, which may be what you're booting by default (to get the grub rescue> prompt). It's conceivable that disabling legacy support in your firmware will cause the system to boot straight to Windows or straight to GRUB's EFI-mode installation. If it boots to Windows, you should still be able to get to GRUB by hitting F12. If it boots to GRUB, then you should be able to boot Linux, and possibly Windows. (I recommend trying the first two Windows options. The final three Windows options are unlikely to do anything useful.)

If you try this and get GRUB working as the default, you can try using GRUB Customizer to clean up the GRUB menu a bit. I'm not very familiar with this software, though, so I can't be more specific about how to use it.

Another thing you could try is to install my rEFInd boot manager. If you install the Debian package and if everything works perfectly, this will give you a menu with options for Windows, for Ubuntu via GRUB, and for Ubuntu directly. You can then remove extra boot entries by deleting unnecessary .efi files in the /boot/efi/EFI directory tree or by editing /boot/efi/EFI/refind/refind.conf and uncommenting and adjusting the dont_scan_files or dont_scan_dirs options.

You may also want to review your partitions. Your Boot Repair output indicates that you've got four NTFS partitions, and I suspect at least one of those is unwanted/unnecessary, but I can't really be sure of that. You also shouldn't need /dev/sda6 or /dev/sda11 once you've fixed everything.

share|improve this answer
    
"First, activating "legacy support" was the wrong thing to do" - I have a DELL 15z and if legacy support is not activated Ubuntu's boot menu is not displayed properly. The main thing is always to boot the EFI way from external media on UEFI systems so the OS "knows" how to proceed with installation (Ubuntu and Windows). –  snayob Aug 5 '13 at 14:51
    
Ubuntu 13.04 installation does not alter UEFI boot order. If Windows is already present a new UEFI boot variable for Ubuntu is created and put after Windows boot entry in UEFI "BootOrder" so Windows remains default UEFI boot candidate ( 12.04 installation puts Ubuntu as first boot entry ) –  snayob Aug 5 '13 at 14:59
    
Snayob, it sounds like you've got buggy firmware; generally speaking, activating "legacy support" in the firmware is unnecessary at best. As noted in my answer, though, there are exceptions to this rule, mostly involving buggy firmware. As to the boot order, the last time I checked (which was 12.04 or 12.10), an Ubuntu installation did set up Ubuntu's GRUB as the first item in the boot order. It's conceivable that this has changed with 13.04, but it's also possible that this is another firmware bug. Unfortunately, there are far too many firmware bugs on production EFI systems. –  Rod Smith Aug 6 '13 at 16:50

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.