Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New system planned EFI BIOS involved - first questions
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Sat Oct 04, 2014 2:04 am    Post subject: Reply with quote

So I booted SystemRescue (again) in UEFI mode, looking at the rEFInd instructions for manual installation, this time. Based on further reading of the rEFInd site I went back to the ext4 /boot with the vfat /boot/efi. This time the efi partition was already in place, and it has pretty much always looked good. I decided to focus on the efibootmgr command.

The manual install says to run "efibootmgr -c -l \\EFI\\refind\\refind_x64.efi -L rEFInd", except elsewhere it says that picky UEFI might want "efibootmgr -c -l \\EFI\\boot\\bootx64.efi -L rEFInd". I've actually got both directory/executable paths on this disk - I copied one to the other. I also ran "efibootmgr -v" before and after running the above command. No Change.

Which leaves me wondering... I booted this bugger from USB, but I'm trying to tweak the EFI partition on the hard drive. Perhaps that's my problem, because I've also looked in the live-filesystem directories and see that the USB EFI setup isn't quite like what's spec'ed for the hard drive. If it's taking my command and attempting to apply it to the EFI partition it booted from, of course it's going to fail. But the man page says the command defaults to /dev/sda, which is certainly valid for the drive, and my EFI partition is the first on the drive.

Next stunt - run the above command adding the "-v" command. When I've run it before there is no output, no errors printed, etc. But using "-v" before and after shows that nothing changed. Perhaps it takes a "-v" to get error messages out of the bugger. I doubt it, but it's worth a try.

It's either working by next weekend, or I'm reinstalling with MBR. I'll be happy enough if I have to boot using USB (Call it extra physical security - can't boot without a "token".) though for that I'll need to solve the X problem. Right now X seems to require CSM be enabled, as far as I can tell.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sat Oct 04, 2014 2:22 am    Post subject: Reply with quote

@depontius
What make and model is the motherboard?
Is the "bios" firmware the latest?
Please boot the sysresccd in UEFI mode, altkernel, then run:
Code:
fdisk -l | wgetpaste -s gists
lspci -k | wgetpaste -s gists
mount /mnt/gentoo /dev/sda3
mkdir /mnt/gentoo/boot
mount /mnt/gentoo/boot /dev/sda2
mkdir /mnt/gentoo/EFI
mount /mnt/gentoo/EFI /dev/sda1
wgetpaste -s gists  /mnt/gentoo/usr/src/linux/.config
wgetpaste -s gists  /mnt/gentoo/etc/fstab
wgetpaste -s gists  /mnt/gentoo/etc/portage/make.conf
ls -Rl /mnt/gentoo/boot | wgetpaste -s gists
ls -Rl /mnt/gentoo/EFI | wgetpaste -s gists
post the url's
_________________
Defund the FCC.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Sat Oct 04, 2014 1:17 pm    Post subject: Reply with quote

DONAHUE wrote:
@depontius
What make and model is the motherboard?
Is the "bios" firmware the latest?
Please boot the sysresccd in UEFI mode, altkernel, then run:
Code:
fdisk -l | wgetpaste -s gists
lspci -k | wgetpaste -s gists
mount /mnt/gentoo /dev/sda3
mkdir /mnt/gentoo/boot
mount /mnt/gentoo/boot /dev/sda2
mkdir /mnt/gentoo/EFI
mount /mnt/gentoo/EFI /dev/sda1
wgetpaste -s gists  /mnt/gentoo/usr/src/linux/.config
wgetpaste -s gists  /mnt/gentoo/etc/fstab
wgetpaste -s gists  /mnt/gentoo/etc/portage/make.conf
ls -Rl /mnt/gentoo/boot | wgetpaste -s gists
ls -Rl /mnt/gentoo/EFI | wgetpaste -s gists
post the url's


The board is an Asrock FM2A88X+ BTC
I haven't been able to find the BIOS number. I watched carefully during poweron, and I've explored the menus, but haven't been able to find it. I was planning on installing dmidecode at some point, but hadn't gotten there yet. There is a version 1.30 available for the board. Whether I'm already there, who knows?

fdisk - gist.github.com/54895fab544fc09e4488
lspci - gist.github.com/859599af8823f734eeda
config - gist.github.com/4d5f4ffda0211efab6a0
fstab - gist.github.com/f1af590b60d63455791a
make.conf - gist.github.com/174a8a2b44ff2796f3a9
boot - gist.github.com/ca8a15ac5c5c2f1a6537
EFI - gist.github.com/2e8bb2493407c9a3707f

Incidentally, I tried running the rEFInd install script with your mount points, which are slightly different from mine. It didn't like them, and moved the EFI partition back to /mnt/gentoo/boot/efi, then of course it failed to install the bootloader.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sat Oct 04, 2014 4:17 pm    Post subject: Reply with quote

Quick look suggests the problem is that the efi stub kernel is not configured to act as a boot loader.
rEFInd is a boot manager, it is designed to provide a way to select among bootloaders but unlike grub or elilo or syslinux does not provide a bootloader.
I have had trouble recently with genkernel, even though I edited the menuconfig for uefi. Can you do without an initramfs or is /usr on its own partition?
What is on /dev/sdb?
Is Secure Boot disabled?
The good news is that I have an efi stub kernel and rEFInd working on an ASROCK motherboard, not an FM2A88X+ BTC, but it suggests compatibility.
The pastebin of /mnt/gentoo/etc/fstab failed, pls try again or just post it here
Working up a change list will take a little time.

I have taken the liberty of reformatting the pastebin list for single click instead of cut and paste. Easier for the next guy to single click.
fdisk
lspci
config
make.conf
boot
EFI
_________________
Defund the FCC.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Sat Oct 04, 2014 5:00 pm    Post subject: Reply with quote

DONAHUE wrote:
Quick look suggests the problem is that the efi stub kernel is not configured to act as a boot loader.
rEFInd is a boot manager, it is designed to provide a way to select among bootloaders but unlike grub or elilo or syslinux does not provide a bootloader.
I have had trouble recently with genkernel, even though I edited the menuconfig for uefi. Can you do without an initramfs or is /usr on its own partition?

There is no separate partition for /usr, so I presume I can do without the initrd. I thought I had the right stuff configured in the kernel for the EFI stub loader.
DONAHUE wrote:

What is on /dev/sdb?

That's the USB stick with SystemRescue on it
DONAHUE wrote:

Is Secure Boot disabled?

Yes
DONAHUE wrote:

The good news is that I have an efi stub kernel and rEFInd working on an ASROCK motherboard, not an FM2A88X+ BTC, but it suggests compatibility.
The pastebin of /mnt/gentoo/etc/fstab failed, pls try again or just post it here

Code:
# /dev/sda1
UUID="DCE3-DC11"            /boot/efi      vfat   noauto,noatime         1 2
# /dev/sda2
UUID="fe1067db-7360-492c-8f06-29f9bddca464"   /boot         ext4   noauto,noatime         1 2
# /dev/sda3
UUID="f4cd490a-7e9c-4208-aa2b-f8c38141582e"   /         ext4   relatime         0 1
# /dev/sda4
UUID="bca3de73-6b6b-45b1-949f-e4a55efa8bbd"   none         swap   sw            0 0
# /dev/sda5
UUID="5169b171-1479-4e2f-a6f3-e262759cd1af"   /var/cache/fscache   ext4   noatime            1 2
# /dev/sda6
UUID="b0048503-e194-4acb-8b1b-f6fb19d79e5d"   /local         ext4   relatime         1 2
#
/dev/cdrom               /mnt/cdrom      auto   noauto,ro         0 0

DONAHUE wrote:

Working up a change list will take a little time.

I have taken the liberty of reformatting the pastebin list for single click instead of cut and paste. Easier for the next guy to single click.
fdisk
lspci
config
make.conf
boot
EFI


Thanks for your assistance.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sat Oct 04, 2014 6:26 pm    Post subject: Reply with quote

if doing without initramfs causes no issues getting a boot could be as simple as:
edit the kernel config to include:

Code:
Processor type and features  --->
[*] Built-in kernel command line
(root=/dev/sda3)
[*]   Built-in command line overrides boot loader arguments


or run
Code:
blkid
pick out the PARTUUID for /dev/sda3 and use that instead of /dev/sda3 as in

(root=PARTUUID=************************ ro) no quotes in your entry

the kernel name should start with vmlinuz or bzImage
I use make && make modules_install && make install in compiling kernels which results in vmlinuz-3.16.3-gentoo in /boot
refind will find vmlinuz and bzimage kernels and include them in its menu automatically in date made order. Proceeding this way will cut down your boot maintenance to deleting obsolete kernels from /boot

Code:
cp /boot/vmlinuz-3.16.3-gentoo /boot/efi/EFI/Boot/bootx64.efi
this should allow a boot even if rEFInd is not yet configured; rEFInd will find that also when configured
_________________
Defund the FCC.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Sat Oct 04, 2014 7:08 pm    Post subject: Reply with quote

DONAHUE wrote:
if doing without initramfs causes no issues getting a boot could be as simple as:
edit the kernel config to include:

Code:
Processor type and features  --->
[*] Built-in kernel command line
(root=/dev/sda3)
[*]   Built-in command line overrides boot loader arguments


or run
Code:
blkid
pick out the PARTUUID for /dev/sda3 and use that instead of /dev/sda3 as in

(root=PARTUUID=************************ ro) no quotes in your entry

the kernel name should start with vmlinuz or bzImage
I use make && make modules_install && make install in compiling kernels which results in vmlinuz-3.16.3-gentoo in /boot
refind will find vmlinuz and bzimage kernels and include them in its menu automatically in date made order. Proceeding this way will cut down your boot maintenance to deleting obsolete kernels from /boot

Code:
cp /boot/vmlinuz-3.16.3-gentoo /boot/efi/EFI/Boot/bootx64.efi
this should allow a boot even if rEFInd is not yet configured; rEFInd will find that also when configured


Well here's the weird thing.. I know I did that already - I put a command line in, basically as you suggest. But on my last round of experiments I shipped my kernel config over to one of my working systems and have brought it up in a text editor, and the command line is empty.

So for my next try...
Edit the kernel config without xconfig, making sure the command line is in there.
Manually build the kernel.
Install efibootmgr in Gentoo.
Try the efi install script.
If that fails, try booting my kernel directly.

Actually, when I start SystemRescue in UEFI, it finds and will boot my Gentoo kernels, so I think I'll do this all from Gentoo next time. Weird thing is, I believe that I booted this kernel today, and I don't know how that could happen when the kernel command line was somehow blanked out - how did it find the root partition?
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sat Oct 04, 2014 7:15 pm    Post subject: Reply with quote

If rEFInd is not appearing:
boot the sysresccd in uefi, altkernel, enter the chroot,
Code:
df /boot/efi
verify /dev/sda1 is mounted at /boot/efi
Code:
cd /boot/efi/EFI/refind
efibootmgr -c -l \\EFI\\refind\\refind_x64.efi -L rEFInd

when convenient add
Code:
File systems  --->
[*] Miscellaneous filesystems  --->
<*>   EFI Variable filesystem
not needed so far but will be for further adventures in uefi land
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sat Oct 04, 2014 7:22 pm    Post subject: Reply with quote

the last couple of entries in sysresccd something like boot system on first disc, boot system on second disc will look for and execute init, if found
_________________
Defund the FCC.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Sat Oct 04, 2014 8:48 pm    Post subject: Reply with quote

To be perfectly honest, I'm not sure what happened, but I can now boot from the hard drive. This has been a combination of your advice and my thrashing around. I might have found a little hint in one of your last messages, when you said, "enter the altkernel". On the boot menu that was option 3 - but it didn't boot, it got to Loading Kernel Modules and stalled.

So I booted into my own kernel, mounted /boot and /boot/efi, then emerged efibootmgr on my current install. This time running the refind install script worked - no hatemail. Plus running "efibootmgr -v" showed a new entry. Next boot, no USB, and I'm in on my new hard drive. Thanks for your help.

My conclusion is that something is just a little off about SystemRescue in EFI mode or its interaction with EFI. However it was able to get me onto my own kernel, where I could finish the job.

My next problem is that X won't start, but this time the error messages are different. This time it's because apparently I'm using Glamor for basic rendering, but don't have the right GL settings for Mesa. I think this is a simple matter of USE flags and I'll be up. Compared to UEFI, this looks straightforward.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sat Oct 04, 2014 10:49 pm    Post subject: Reply with quote

Good for you, good luck.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
jonathan183
Guru
Guru


Joined: 13 Dec 2011
Posts: 309

PostPosted: Sun Nov 02, 2014 2:50 am    Post subject: Reply with quote

Sakaki wrote:
Hi transsib,

although it's targeted at Windows 8 / Gentoo dual boot (rather than Win 7), you might want to have a quick look at the tutorial I recently posted on the wiki: EFI Gentoo End to End Install.


I found this tutorial useful, I tried to follow it but disabling systemd which did not work out too well as the kernel failed to boot. I did find it useful for sorting out efi-readvar. I have a manually built kernel on an ext4 partition at the moment but ended up using efitools from your overlay because efi-readvar seemed to return the efi not mounted error. I now have secure boot enabled with my own signed kernels 8)
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
Goto page Previous  1, 2
Page 2 of 2

 
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