Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
uefi ignores ssd boot partition [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
marinheiro
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2004
Posts: 125

PostPosted: Mon Dec 30, 2013 12:11 am    Post subject: uefi ignores ssd boot partition [SOLVED] Reply with quote

I have a Toshiba Satellite U50T-A-10f ultrabook, and have spent a large point of Christmas trying to persuade it to boot using UEFI without success. I've run out of ideas, so thought I'd list what I've done and why. Maybe the mistake will be obvious.

It has two drives, a 32GB SSD and and 750GB hard drive.

1. I completely wiped both drives: every time I've had a laptop I've kept windows/osx available and then never used them, so this time I just decided to get rid of Windows from the start. This may have been a bad move, as the Windows was working ok from UEFI.

2. Partitioned the drives as follows (sdb is the SSD, sda the HDD), using gdisk, and making all partitions on both drives gpt.

- sdb1 is the ESI partition, mounted at /boot/efi. This starts at sector 2048, is 500MB (I know this is bigger than it needs), is formatted as vfat, and has code EF00. All the other partitions are ext4
- sdb2 is the boot partition, mounted at /boot
- sdb3 is most of the 32GB SSD, mounted as root

I thought I should separate out the parts of the drive which get written to a lot, or which are larger, which gives me a lot of partitions on the HDD. So I don't get caught by bad choices of size, I've made them part of a single volume.

- sda1: 500GB LVM, containing partitions for /home, /var, /tmp, /opt, /usr/local, /usr/portage
- sda2: 50GB of swap

The rest of the hard drive is unformatted for now.

3. Copied kernel to /boot/kernel-3.10.17-gentoo, along with initramfs for the logical volume

4. Booted from UEFI using a USB image. This works using either an old systemrescue USB I had, or a gentoo one with a newly made image from grub2-install. Both give me a working grub menu, although grub has to be told which partition the kernel is on before booting from the gentoo USB stick.

5. Set up grub2 to manage booting. I know I'm going to have a lot of tries before I get the kernel right (eg. I don't think the current kernel will work with my wifi) so I didn't want to boot directly from UEFI - I want to be able to have an easily managed menu of alternative kernel versions while I'm trying them out. And I am sure grub wil be supported in the long term, but don't have any idea about refind, so I went for grub over refind.

After installing grub, my /boot/efi partition looks like:

Code:
/boot/efi/EFI/GRUB2/grub.cfg
/boot/efi/EFI/GRUB2/grubx64.efi
/boot/eff/EFI/grub[fonts, grubenv, locale, themes, x86_64-efi]


6. Try to boot from the SSD. This fails, because the system just ignores the SSD, and tries to find anything else which might be bootable.
The 'BIOS' is an American Megatrends Aptio Setup Utility. It has almost no options for managing UEFI. There is a System Configuration submenu in the Advanced menu, which gives a choice of boot mode between CSM boot and UEFI boot. Enabling UEFI boot does not seem to give any more options. The separate Boot menu just lists the hardware options for boot order: the two drives, USB, and LAN. I've made the SSD drive the top option, but it always drops through to the LAN. Hitting escape while it's trying to boot from LAN eventually gives me:

Code:
Reboot and select proper Boot device
or Insert Boot Media in selected Boot device and press a key


I can't think what is stopping the UEFI from seeing the boot partition or how to debug this.

Thanks
Graham


Last edited by marinheiro on Sat Jan 04, 2014 9:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 309

PostPosted: Mon Dec 30, 2013 12:39 am    Post subject: Reply with quote

Install grub as \EFI\Microsoft\Boot\bootmgfw.efi, many mb only boot EFI windows loader.
Back to top
View user's profile Send private message
marinheiro
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2004
Posts: 125

PostPosted: Tue Dec 31, 2013 1:09 am    Post subject: Reply with quote

Hi s4e8

I can't get grub2-install to give me exactly that naming setup, so I've just moved grubx64.efi to EFI/Microsoft/Boot/bootmgfw.efi

It hasn't solved the problem but may have got a step closer: UEFI now goes immediately to "Reboot and select proper boot device" on startup.

Graham
Back to top
View user's profile Send private message
marinheiro
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2004
Posts: 125

PostPosted: Tue Dec 31, 2013 5:19 pm    Post subject: Reply with quote

Wiped everything and tried again, following the recipe in http://wiki.gentoo.org/wiki/GRUB2#UEFI.2FGPT

This time the laptop uefi-boots into Grub. I don't know what the difference is, but guess I must have made some random copying error before. So, this BIOS does NOT need a windows-specific file structure for the EFI partition. Having said that, there does seem to be something a bit wrong with the specific parameters suggested on the wiki page. The first problem was grub complaining that /EFI/BOOT/x86_64-efi/normal.mod was missing; in fact the BOOT directory was empty and I needed to copy /boot/efi/grub/x86_64/* into it. Now grub doesn't complain but also doesn't offer any menu of bootable kernels; I'm guessing the grub.config file is in the wrong place too (I'm new to grub, had been holding out with lilo till now). But at least I have grub and not uefi problems now!
Back to top
View user's profile Send private message
srs5694
Guru
Guru


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

PostPosted: Wed Jan 01, 2014 3:02 am    Post subject: Reply with quote

Conspicuously absent from your initial description, but present on the page you referenced, is the use of efibootmgr to register the boot loader with the firmware. Unless you use the fallback filename (EFI/BOOT/bootx64.efi), using efibootmgr in Linux (or an equivalent tool, such as bcdedit in Windows or bcfg in an EFI shell) is required. Some computers will also fall back on EFI/Microsoft/Boot/bootmgfw.efi, but this is non-standard and can't be relied upon. A typo in the efibootmgr command could also account for the problems you've seen, if you did use efibootmgr the first time around.

As to the configuration file, GRUB can look just about anywhere for that, on almost any partition. The most common locations are in /boot/grub or /boot/grub2 (as seen in Linux) or in the same directory that holds the GRUB EFI binary on the ESP.

Incidentally, if you're comfortable with GRUB, you might look into ELILO, which is very similar, simpler to configure, and more reliable than GRUB 2, IMHO. OTOH, ELILO is in maintenance-only mode, so if you're concerned with long-term support, it may not be the best choice. Then too, if it works now, it's not likely to stop working any time soon....
Back to top
View user's profile Send private message
marinheiro
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2004
Posts: 125

PostPosted: Sat Jan 04, 2014 9:51 pm    Post subject: Reply with quote

You were right on both counts: I had used efibootmgr to register the boot loader, but I had taken the command from a different set of instructions using a different filestructure :oops: Must stop following recipes and read more man pages!

For the grub configuration I did as you said and simply copied the config file in with the EFI binary. Everything worked immediately.

So gentoo install on a Toshiba Satellite U50t-A-10F with UEFI is not a problem, provided you follow the gentoo wiki correctly. The only (minor) problems I've had with it have been with the wireless, which is an Intel Wireless-N 7260. The 3.10 kernels don't work with that, and I h ad to use a later one (3.12.4, a bit randomly) which hasn't given me any other problems so far apart from having to turn rfkill off. Everything else has worked straight out of the box.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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