Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] uefi broke my system-- what to do?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
logical_guy
Apprentice
Apprentice


Joined: 18 Sep 2007
Posts: 243

PostPosted: Wed Nov 28, 2012 12:07 am    Post subject: [solved] uefi broke my system-- what to do? Reply with quote

Hi,

I just tried installing GPT + UEFI on my lenovo thinkpad laptop today. It's an i5 processor. I followed the steps outlined in the gentoo grub2 guide, but I must've done something wrong, because when I try to boot it up, all it shows is a screen with Boot Menu and Application Menu tabs. My grub2 entries don't show u in it. When I insert a USB stick/CDROM and press the key to select another boot device, it takes me to this screen anyway. In the BIOS settings, I can't find any option to remove the HDD from the boot order.

What do I do to recover my system?

HELP!!!


Last edited by logical_guy on Thu Nov 29, 2012 1:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6612
Location: Goose Creek SC

PostPosted: Wed Nov 28, 2012 2:56 am    Post subject: Reply with quote

http://www.rodsbooks.com/efi-bootloaders/ looks pretty smart

exactly what happened? Is/was any form of windows on the laptop? Windows 8?? shudder.
had you just wiped the hard drive and started an install or was there an existing install with personal files?
got a dell recovery disk?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 432
Location: Woonsocket, RI

PostPosted: Wed Nov 28, 2012 3:11 am    Post subject: Reply with quote

Unless you're using DUET or you upgrade your firmware, you can't "install... UEFI" on a computer. You can switch from BIOS/legacy-mode to EFI-mode booting if your firmware already supports both, though.

It's unclear to me precisely what your problem is or what the cause might be. I therefore suggest you post two things:


  • A screen shot (taken with a digital camera) of the screen you mention with the Boot Menu and Application Menu tabs. That might help us recognize it.
  • The RESULTS.txt file that results when you run the Boot Info Script, assuming you can boot a Linux emergency disc. Be sure to post it between code tags, or as a link to the file.
Back to top
View user's profile Send private message
logical_guy
Apprentice
Apprentice


Joined: 18 Sep 2007
Posts: 243

PostPosted: Wed Nov 28, 2012 8:40 am    Post subject: Reply with quote

DONAHUE wrote:

exactly what happened? Is/was any form of windows on the laptop? Windows 8?? shudder.
had you just wiped the hard drive and started an install or was there an existing install with personal files?
got a dell recovery disk?


Sorry, I was a bit panicky when I posted last night, hence the lack of details.

Well, no windows on the laptop. I've had gentoo running peacefully on it for over a year now. Yesterday I decided to switch to GPT and use UEFI to boot. The GPT part was easy enough - I used rsync to backup my system and then prepared the disk with GPT (all from a sysresc USB) and rsynced the system back. Then I had to chroot into the system to install grub2 and used efibootmgr to do some things. I think I messed up with the boot order and I managed to leave out copying the efi firmware image to its relevant directory. When I rebooted, it would take me to this Boot Menu/Application Menu screen. Nothing in the Boot Menu tab, but when I press the tab button, it goes to the Application tab which has two options - Settings, which takes me to the BIOS (or EFI, I'm confused now) settings, and Diagnostic Splash.

No Dell recovery disk (my laptop is Lenovo) but I do have ultimate boot cd and sysreccd. What I am in the process of doing now is reinstalling my BIOS firmware which I downloaded from the Lenovo support site.
Back to top
View user's profile Send private message
d2_racing
Moderator
Moderator


Joined: 25 Apr 2005
Posts: 13046
Location: Ste-Foy,Canada

PostPosted: Wed Nov 28, 2012 11:55 pm    Post subject: Reply with quote

Hi, on your HDD, did you create a EF00(ESP) partition ?

Also, did you install Grub2 or you did use efibootmgr ?

Do you remember which efibootmgr params did you use ?
_________________
Sysadmin of GentooQuébec.org
Wiki
Signature
IRC on Freenode : #gentoo-quebec
Back to top
View user's profile Send private message
logical_guy
Apprentice
Apprentice


Joined: 18 Sep 2007
Posts: 243

PostPosted: Thu Nov 29, 2012 1:11 pm    Post subject: Reply with quote

d2_racing wrote:
Hi, on your HDD, did you create a EF00(ESP) partition ?

Also, did you install Grub2 or you did use efibootmgr ?

Do you remember which efibootmgr params did you use ?


Well, I followed this guide down to the t: http://en.gentoo-wiki.com/wiki/UEFI

This guide needs some serious clarifications, I think.

I finally solved my problems by doing away with grub completely and following this guide: [url]http://blog.realcomputerguy.com/2012/05/efi-stub-booting-without-bootloader.html[/url

In the end I found the whole process very intuitive and simple - once I understood the gist of the fundamentals. I got that from reading the site above and from
reading this site http://www.rodsbooks.com/efi-bootloaders/ (thanks, DONAHUE).

In the end these are the simple steps I followed - all from a sysresccd session:

1. Took a backup of my partitions onto an external hdd using rsync.
2. Partition the drive using GPT: 1 vfat (bootable) partition and 2 jfs partitions (lba flag enabled), and a swap partition.
Here's the layout of the partition table:
Code:
# gdisk -l /dev/sda       
GPT fdisk (gdisk) version 0.8.4

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 625142448 sectors, 298.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 32E969AF-4998-41D0-95D0-59E366759A1B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 625142414
Partitions will be aligned on 2048-sector boundaries
Total free space is 197118573 sectors (94.0 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          206847   100.0 MiB   EF00 
   2          206848         8595455   4.0 GiB     8200 
   3         8595456       218310655   100.0 GiB   8E00 
   4       218310656       428025855   100.0 GiB   8E00 

3. Copy contents back to the respective partitions from backup.
4. Chroot into gentoo system and uninstalled grub.
5. Recompiled the kernel with respective EFI/GPT relevant options and kernel command line params (forgot the EFI stub thingy the first time - BIG mistake!).
6. Created a efi/gentoo directory in /boot.
7. Copied my kernel into that directory and renamed it .efi
8. Used efibootmgr to execute the following command (the mount point for the vfat partition is /boot):
Code:
efibootmgr --create --part 1 --label "Gentoo" --loader '\efi\gentoo\bzImage.efi

9. Exit from chroot and unmount relevant mounts and reboot.

Presto!! My system booted from uefi and I was so happy :D

I think it's time to mark this thread as "solved". Thanks so much for your help, guys.
Back to top
View user's profile Send private message
logical_guy
Apprentice
Apprentice


Joined: 18 Sep 2007
Posts: 243

PostPosted: Thu Nov 29, 2012 1:14 pm    Post subject: Reply with quote

logical_guy wrote:
What I am in the process of doing now is reinstalling my BIOS firmware which I downloaded from the Lenovo support site.


Oh, by the way, the BIOS update had failed because it said it was already up-to-date. I did update it a few weeks ago.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum