Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Yet another UEFI Dual Boot Thread [solved]
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
alienjon
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1689

PostPosted: Sat Mar 07, 2015 2:21 pm    Post subject: Yet another UEFI Dual Boot Thread [solved] Reply with quote

I'm trying to install Gentoo to boot as UEFI for the first time (UEFI for the first time, I've installed Gentoo many times). As part of the larger picture I also did a recent fresh install of Windows 7 on sdb (this is installed as UEFI) and am installing Gentoo on sda. I followed the [url="http://wiki.gentoo.org/wiki/UEFI_Dual_boot_with_Windows_7/8"]UEFI Dual Boot page[/url] on the wiki in conjunction with the handbook and installed refind, which seems to do a pretty good job of automatically finding UEFI bootable media.

My question is if I actually need the boot partition for Gentoo. Couldn't I just mount the Windows UEFI boot partition (it's about 100MB anyway - the size of my Gentoo one) as /boot and install the kernel somewhere on that partition? I think it would need to be placed somewhere like /boot/EFI/gentoo/EFI or something like that (The naming seems redundant to me, but I think it's needed). This way, wouldn't refind find it anyway?


Last edited by alienjon on Sun Mar 08, 2015 10:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
alienjon
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1689

PostPosted: Sat Mar 07, 2015 2:44 pm    Post subject: Reply with quote

It would seem that the short answer is 'no'. The gentoo boot partition I created is ext4 and the Windows one is - I believe - vfat. After getting to the 'configure the bootloader' section I did not setup any manager (trying to stick with refind) and rebooted having placed the kernel in EFI\Gentoo\Boot. When refind loads an entry exists not only for the Windows boot partition, but a second also exists from the ext4 Gentoo boot partition. However, selecting either will result in a black screen with text simply stating "Loading {kernel image name} Load options ' '" and nothing will actually load. I'm treading lightly here, because the one time I tried this before I completely borked my Windows boot. I'm worried that simply using the efibootmanager would mess that boot up (the code seems to create a new default boot partition - in other words replacing the refind information and making me unable to load windows again).

Any thoughts to get this to work?
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1747

PostPosted: Sat Mar 07, 2015 3:03 pm    Post subject: Reply with quote

So far I had an impression that with uefi you always want to have only one boot partition and it must be vfat. And then you need boot manager to let you select what piece of code residing there will actually be launched. Never cared enough to make it work though.
Back to top
View user's profile Send private message
alienjon
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1689

PostPosted: Sat Mar 07, 2015 6:32 pm    Post subject: Reply with quote

I think a lot of the problems I've been having is that I'm using 2 hard drives and the installation of both OS' create boot flags on their respective drives. Even though gentoo is indicated as the boot drive UEFI gets confused when it sees more than 1 boot flag. In one of my first attempts at this I suspected that might be the case and simply cleared the linux install and reset the windows EFI boot information and I could boot again into windows (otherwise nothing would boot).

I again found myself in that position just now, actually, in trying to complete my install and accidentally trashed my windows partition. This will be my 4th install in about 2 weeks...

I'm going to try to do this as 'cleanly' as possible (install Windows without anything else yet, and then go onto Gentoo). I'm finding this EFI stuff a lot more troublesome than MBR :-/
Back to top
View user's profile Send private message
alienjon
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1689

PostPosted: Sat Mar 07, 2015 8:44 pm    Post subject: Reply with quote

So, I think I've made some progress. I did a clean install of Windows 7 (setup to load as EFI) on sdc. I then installed Gentoo on sda. sda2 is setup to be boot with gpt/efi. I installed grub to sda and while the handbook says that efibootmgr is an 'alternative', the [url=wiki.gentoo.org/wiki/GRUB2]wiki[/url] notes that I actually have to install grub via efibootmgr in order for the UEFI to see grub. I also installed grub with os-prober and running grub2-mkconfig DOES show the windows partition.

My progress is that grub now loads when my computer starts, but when I select gentoo the computer freezes with the initial message of:
Code:
'Loading Linux 3.18.7-gentoo ...'


Selecting Windows gives me the error:
Code:
Setting partition type to 0x7
error :invalid EFI file path


Then, after a few seconds, the grub screen returns. I'm guessing that grub didn't correctly recognize the windows location, but I have no idea why gentoo isn't loading. I'm not even getting an error message...
Back to top
View user's profile Send private message
alienjon
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1689

PostPosted: Sun Mar 08, 2015 10:27 pm    Post subject: Reply with quote

Ok, got things solved. This turned out to be 2 separate problems:

Problem 1: Grub was not looking for Windows 7 in the correct place. What os-prober was finding was actually ANOTHER Windows partition (an old one) on a separate drive. It wasn't even finding the correct Windows (the other Windows was installed as non-UEFI, hence part of that problem). I ended up adding a custom entry to Grub to find Windows at /etc/grub.d/custom_40. Part of the confusion is that running grub2-mkconfig DOESN'T show it finding Windows, but it WILL load at boot time. My system is currently installing things and I don't have a graphical interface yet, but if anyone is interested I will be happy to post specific details on how I got this to work (including the custom_40 file)

Problem 2: Linux got stuck at 'Loading Gentoo 3.whatever' and wouldn't actually boot. Turns out that it probably WAS booting, but the doofus that I am, I forgot to enable console framebuffer, so NOTHING WAS BEING DRAWN TO THE SCREEN.

I would have posted this sooner, but I had to finish banging my head against a brick wall for a while before I could do so... (Though I figured that problem was something of that sort)
Back to top
View user's profile Send private message
Faraclas
Tux's lil' helper
Tux's lil' helper


Joined: 08 Dec 2014
Posts: 91

PostPosted: Mon Mar 09, 2015 12:48 am    Post subject: Reply with quote

This caught me off guard as well. I am still not able to boot into the gentoo minimal install .iso. However, the SystemrescueCD boots up just fine.
Back to top
View user's profile Send private message
alienjon
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1689

PostPosted: Mon Mar 09, 2015 12:53 am    Post subject: Reply with quote

That's because the gentoo CDs don't have EFI support. You need the systemrescuecd to install gentoo in a way to boot from UEFI. I was able to install (now 3-4 times) off of the systemrescuecd without any other changes to the gentoo handbook (except the bootloader part got tricky, but the rest is vanilla).
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