I have installed ubuntu 12.04 on my Thinkpad Edge (UEFI) using an USB-Stick. I guess it has been botted using EFI since a GRUB menu appeared with the options to boot a live system, install, or check the disk.
When I boot my laptop, grub only shows its command line prompt "grub>".
After manually running grub-install /dev/sda
+ update-grub
within a chrooted environment it boots grub in recovery mode saying "File not found."
The disk is partitioned as follows:
/dev/sda1: ntfs, 1.5GB, SYSTEM DRV
/dev/sda2: ntfs, 150GB, Windows7 OS
/dev/sda3: extended
/dev/sda6: ext4, 140GB, Ubuntu 12.04
/dev/sda5: ntfs, 10.7GB, Lenovo Recovery
/dev/sda4: ntfs, 16.8GB, a custom additional partition
I guessed that the partition labelled "SYSTEM DRV" may be the EFI partition, but then I read that the EFI partition is of type FAT32. I don't have any FAT32 partition here!
So I can't follow any How-Tos explaining how to install Grub2 with EFI support. They all want me to mount my EFI partition at /boot/efi. I also can't just create an EFI partition since in most How-Tos they say that it should be the first partition (at least it has to be a primary partition), but as you see I already have a partition 1.
Isn't it possible to just use the normal Grub2 tool on EFI hardware?
If not, will creating an EFI partition solve the problem? Can I use partition 4 for that?
My BootInfo as created by using this article can be found here: http://paste.ubuntu.com/1011739/. Note that is being made from a Ubuntu Live USB drive which was at /dev/sdb
, so you should ignore this drive.
UPDATE:
As EFI doesn't seem to be the problem here, I reinstalled (non-EFI-)grub using boot-repair
.
New BootInfo can be found here: http://paste.ubuntu.com/1012223/.
Problem is now, that BIOS doesn't boot but gives the error:
Operating system not found.
UPDATE 2 (SOLUTION):
When you read this question when having the same issue (Operating system not found.), you might miss the forest for the trees when reading the answers, so I repeat the solution here:
The problem in my case was, that I accidently changed the boot flag of the drive to /dev/sda6
, which is a logical partition. BIOS searches for boot flags on a hard drive it wants to boot from, but only looks in primary partitions. If it can't find a boot flag, it skips the hard drive. If it doesn't find any drive or media to boot from, you see the error "Operating system not found."
The hard disk is definitely set up for BIOS-style booting. Specific evidence of this includes:
Thus, whatever the source of the problem, it doesn't seem to have anything to do with EFI; it's a straight-up GRUB-on-BIOS problem.
The biggest clue I see is this, from the Boot Info Script output:
Note in particular the reference to
(,msdos6)/root/grub
. Later in the Boot Info Script output, there's a list of boot files on /dev/sda6 ((,msdos6)
in GRUB-speak). This list includes/boot/grub/grub.cfg
, but there's no mention of anything in theroot
directory. In fact, theroot
directory (not to be confused with the/
directory, whose name is pronounced "root") is the superuser's home directory, and it doesn't ordinarily hold boot files. Thus, I suspect that GRUB was mis-installed. Perhaps you used options togrub-install
that you didn't mention and that were inappropriate, or perhaps there's a bug in the installation script. In any event, I recommend re-installing GRUB using the usual procedures for doing this on a BIOS-based computer. Note, however, that if your emergency system boots in EFI mode, that could create complications, so you should be sure to boot your emergency system in BIOS mode.You can check your boot mode in Linux by looking for the
/sys/firmware/efi
directory. If it's present, you've booted in EFI mode. If it's absent, you've probably booted in BIOS mode (although there are conditions when that file will be absent even though you've booted in EFI mode).The help section linked in an earlier (deleted?) answer describes how to boot your system using its UEFI BIOS. This is what is meant by booting Linux "natively".
IF it is available on your Thinkpad, another alternative might be to use CSM or a function equivalent to it. This is an acronym for Compatibility Support Module. It is an Intel term. (The specification for the UEFI BIOS was developed by Intel.)
A CSM allows a system with a UEFI BIOS to boot legacy (non-UEFI) operating systems which only know how to interact with a legacy BIOS.
My understanding is that it is only possible to use so-called normal (i.e. legacy BIOS) GRUB tools on UEFI hardware if you can use something like CSM.
Update:
I wrote my earlier suggestions before taking a close enough look at the OPs partition table.
Apparently the MBR partitioning on the drive was placed there by Lenovo. So the Thinkpad Edge must already have some sort of BIOS compatibility in place to allow booting an MBR partitioned drive.
If that actually IS true, then erasing your current partitions and using GPT would NOT be a good way to go.
I would recommend that BEFORE making any drastic change you first discover how your system is currently functioning. Could you collect a BootInfo summary for your system? You could do this by booting using a Live CD/USB while connected to the Internet, selecting
Try Ubuntu
, and then using the steps outlined in this answer.Note: At this point I would suggest only collecting information. Trying to apply fixes before you have a better understanding of your situation may only break something else.
I agree with Rod Smith's analysis of your BootInfo Summary. Ubuntu has already been installed in the partition
/dev/sda6
. GRUB andgrub.cfg
appear to be set up correctly in/boot/grub/
on/dev/sda6
. The problem is that your boot sequence currently goes something like this:/dev/sda
. It transfers control to GRUB'score.img
which is at sector 1 of '/dev/sda'.core.img
loader knows just enough about filesystems to load the rest of GRUB's modules from where it thinks GRUB is located,(,msdos6)/root/grub
.core.img
is unable to load GRUB from(,msdos6)/root/grub
Update: comparing the old and new pastbins
I did a file compare on your two pastebin's. I have listed what I thought were significant differences below.
Line 07
Previously, GRUB's
core.img
in sector 1 looked for(,msdos6)/root/grub
. It now looks for(,msdos6)/boot/grub
. In other words, you fixed the problem you were attempting to correct by re-installing GRUB.Line 47
I have no explanation for why it happened, but in addition to the boot file
core.img
which apparently still exists in sector 1, GRUB also added/boot/grub/core.img
to/dev/sda6
. (Perhaps this is related to the next change?)Lines 77 & 81
Previously
/dev/sda1
was marked with the boot flag. Now the boot flag is on your Ubuntu partition,/dev/sda6
. I think this may be what is causing your problem booting. Try switching the boot flag back to the first NTFS partition on your drive labeled SYSTEM_DRV and see if this helps. (I do not think it will hurt anything.)Lines 154, 155, and 537 (old) 523 (new)
Settings which were "efi" in the previous version of the pastebin now appear to use values for a legacy BIOS GRUB. In particular, under the section
PARTITIONS & DISKS:
the partitionsda6
previously had the attributegrub-efi
. It is nowgrub-pc
.There are some other changes which didn't seem worth describing in detail. For example, your edits to the file
/etc/default/grub
has been lost. The file is back to its default install content. Also, the menu entries formemtest
are missing from the post-re-installgrub.cfg
file.