Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED: How to setup a bootloader?
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
9590FXtreme9
n00b
n00b


Joined: 02 May 2015
Posts: 7

PostPosted: Mon May 04, 2015 12:29 pm    Post subject: SOLVED: How to setup a bootloader? Reply with quote

I booted Fedora 22 by selecting something like "UEFI USB" option in boot menu, flagged the 128MiB FAT32 filesystem as "boot" and "esp" using GParted, compiled kernel using www.pastebin.com/aCdwKCe3, moved the kernel image to /boot after mounting /boot by adding "UUID="4826-A80C" /boot vfat defaults,noatime,discard 0 0" to /etc/fstab and running mount /boot. grub install -v shows:

Quote:
grub-install: info: executing modprobe efivars 2>/dev/null.
grub-install: info: Looking for /sys/firmware/efi ...
grub-install: info: ...found.
Installing for x86_64-efi platform.
grub-install: info: cannot open `/boot/grub/device.map': No such file or directory.
grub-install: error: cannot find EFI directory.


gummiboot --path /boot install showed:
Quote:

Copied /usr/lib/gummiboot/gummibootx64.efi to /boot/EFI/gummiboot/gummibootx64.efi.
Copied /usr/lib/gummiboot/gummibootx64.efi to /boot/EFI/Boot/BOOTX64.EFI.
Created EFI boot entry "Linux Boot Manager".
.

Now I have "Linux Boot Manager" in boot menu but gummiboot instead of booting Gentoo shows something like "vmlinuz is unsupported"

I'm confused with the configuration. These are my only config files:

/boot/loader/loader.conf
Quote:

default gentoo
timeout 3

/boot/entries/gentoo.conf
Quote:

title Gentoo Linux
linux /vmlinuz-4.1-rc1
options root=/dev/sda2


Please help.

Regards


Last edited by 9590FXtreme9 on Tue May 05, 2015 11:57 am; edited 1 time in total
Back to top
View user's profile Send private message
Markus09
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2013
Posts: 78

PostPosted: Mon May 04, 2015 6:47 pm    Post subject: Reply with quote

According to
https://wiki.archlinux.org/index.php/Gummiboot
and
http://freedesktop.org/wiki/Software/gummiboot/
gummiboot is only able to boot EFISTUB images.

EFISTUB seems to be supported by linux kernels >=3.3 (src: https://wiki.archlinux.org/index.php/EFISTUB)
Did you compile such a kernel?
I don't see the "CONFIG_EFI_STUB=y" in the config. Maybe this got changed, but its a start.

If the kernel should support this, you could try
Code:
title      Gentoo Kernel
efi /vmlinuz-4.1-rc1
options root=/dev/sda2

in /boot/entries/gentoo.conf

BR,
Markus
Back to top
View user's profile Send private message
9590FXtreme9
n00b
n00b


Joined: 02 May 2015
Posts: 7

PostPosted: Tue May 05, 2015 11:56 am    Post subject: Reply with quote

I created this pastebin.com/xVmm4C3d .config by running make silentoldconfig on old .config (because new kernel has different options available) and enabling some EFI options using make xconfig.

I got PARTUUID using blkid|grep sd|grep PARTUUID but „ls -l /dev/disk/by-partuuid/” can be used instead
using GParted I made a 128MiB FAT32 partition at start of SSD formatted using GPT and flagged it as "boot" and "esp" using the mouse context menu.

Then run:
echo -e "PARTUUID="YOUR PARTUUID HERE" /boot vfat defaults,noatime,discard 0 0" >> /etc/fstab
mount /boot
find /boot -type f -maxdepth 1 ! -iname ".*" -delete #to delete old kernel files from /boot
make -j9; make -j9 install #(j = jobs = threads. Recommended is cpu cores + 1)
echo -e "title Gentoo Linux\nlinux /vmlinuz-YOUR-KERNEL-NAME-HERE\noptions root=PARTUUID=YOURPARTUUIDHERE rw OTHER OPTIONS YOU WANT" >> /boot/loader/entries/gentoo.conf
echo -e "default gentoo\ntimeout 3" >> /boot/loader/loader.conf
gummiboot --path /boot install
reboot

I patched kernel with patch downloaded from https://github.com/graysky2/kernel_gcc_patch/tree/master into /etc/portage/patches/sys-kernel/KERNELNAME-sources/PATCHNAME.patch and remerging kernel so it can be compiled with march=native (make.conf is always ignored by kernels) after enabling th option using make xconfig.
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