Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fstab for uefi
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
FrankRizz0
l33t
l33t


Joined: 29 Nov 2006
Posts: 617

PostPosted: Wed Dec 30, 2015 11:51 am    Post subject: Reply with quote

I'm using grub. My last error looked like I hadn't installed grub when I booted into the system. It took me to the grub> prompt at boot. Below is my grub.conf, located in /boot/efi/boot/grubx64.efi:

https://bpaste.net/show/69a3799d6d44
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Wed Dec 30, 2015 2:49 pm    Post subject: Reply with quote

grub2 was working to load kernel, something caused a regression.
https://wiki.gentoo.org/wiki/GRUB2/Troubleshooting
_________________
Defund the FCC.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Wed Dec 30, 2015 3:18 pm    Post subject: Reply with quote

Rename grubx64.efi to bootx64.efi.
Back to top
View user's profile Send private message
FrankRizz0
l33t
l33t


Joined: 29 Nov 2006
Posts: 617

PostPosted: Wed Dec 30, 2015 3:46 pm    Post subject: Reply with quote

You mean rename to bootx64.efi not bootx64.efi. right?
Back to top
View user's profile Send private message
FrankRizz0
l33t
l33t


Joined: 29 Nov 2006
Posts: 617

PostPosted: Wed Dec 30, 2015 3:51 pm    Post subject: Reply with quote

Didn't work, still at the grub> prompt
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Wed Dec 30, 2015 4:14 pm    Post subject: Reply with quote

Yes, the last dot in my previous post was the period at the end of the sentence.

What's your mount point for your EFI partition? /boot/EFI, or /boot?

The system will find your EF00 partition and look there to find a boot loader.

For example, I have a single partition I mount at /boot. This does double duty as linux /boot (with grub and kernels) and also as my EFI boot partition, formatted as fat32. The path to my boot loader is /boot/EFI/BOOT/bootx64.efi which means my path inside the partition is EFI/BOOT/bootx64.efi
Back to top
View user's profile Send private message
FrankRizz0
l33t
l33t


Joined: 29 Nov 2006
Posts: 617

PostPosted: Wed Dec 30, 2015 4:28 pm    Post subject: Reply with quote

Mount point is /boot/efi, is it not in my fstab I posted earlier?

Edit: /dev/sda1 /boot/efi vfat defaults,noatime 0 2
Back to top
View user's profile Send private message
FrankRizz0
l33t
l33t


Joined: 29 Nov 2006
Posts: 617

PostPosted: Wed Dec 30, 2015 4:34 pm    Post subject: Reply with quote

So I shouldn't be using /boot/efi/boot, it should just be boot/efi? For example, during my install I did emerge sys-boot/grub && grub2-install --target=x86_64-efi --efi-directory=/boot/efi && grub2-mkconfig -o /boot/efi/grub.cfg && cp /boot/efi/grub.cfg /boot/efi/boot/grubx64.efi, I should have just done cp /boot/efi/grub.cfg /boot/efi/grubx64.efi?
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Wed Dec 30, 2015 4:50 pm    Post subject: Reply with quote

That fstab is from early in the process, I'm not sure if it still applies. By this stage of my support thread I'd already not only moved partition mount points around, I'd actually deleted and recreated partitions.

As was mentioned before in this thread, the default UEFI boot location is \EFI\BOOT\BOOTX64.EFI, and that's from the partition with EF00 partition type.

So, keeping in mind that I've only done this once, let's try to figure this out. I'm not an expert but I know what worked for me. :)

Perhaps since you mount your EF00 partition at /boot/efi, let's try putting your loader into /boot/efi/EFI/BOOT/BOOTX64.EFI and see what happens.
Back to top
View user's profile Send private message
FrankRizz0
l33t
l33t


Joined: 29 Nov 2006
Posts: 617

PostPosted: Wed Dec 30, 2015 6:18 pm    Post subject: Reply with quote

So I should mkdir /boot/efi/EFI/BOOT && mount /dev/sda1 /boot/efi/EFI/BOOT?

Sorry for the late reply, tried to get a legacy boot but that was a fail. Also trying to figure out your thinking.....why would it be placed in /boot/efi/EFI/BOOT?

Edit: Also, I'm still ok using openrc instead of systemd correct?
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Wed Dec 30, 2015 6:32 pm    Post subject: Reply with quote

No.

Your grub is in /boot right?
Your efi partition is in /boot/efi right?
These things stay the same.

Just move your /boot/efi/BOOT/bootx64.efi to /boot/efi/EFI/BOOT/bootx64.efi and try again.

When your system boots with efi, it looks for a partition of the proper type and tries to find a file on that. The default place is \EFI\BOOT\BOOTX64.EFI -- The UEFI code does not care where this is mounted in the final filesystem, it doesn't even know that there IS something after the boot. It only cares about BOOTX64.EFI or whatever the system is configured to use. It locates the partition, looks in the directory and executes that file. That's it.

You could mount your partition at /usr/local/efi-boot-partition, it makes absolutely no difference to the UEFI system because UEFI only knows about the single partition with EF00 type code.

In other words, when your system boots in UEFI mode, the partition with type code EF00 is / and there is no other partition.

In that EFI-only mode, you want your file to be at \EFI\BOOT\BOOTX64.EFI
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Wed Dec 30, 2015 6:42 pm    Post subject: Reply with quote

Sorry for the double-tap.

So in your normal booted-up mode, when you edit the files, you've mounted the efi partition somewhere, and that somewhere is $EFI_MOUNT_POINT.

For my system, $EFI_MOUNT_POINT is /boot. My critical file is at /boot/EFI/BOOT/BOOTX64.EFI
For your system, $EFI_MOUNT_POINT is /boot/efi. Your critical file is at /boot/efi/EFI/BOOT/BOOTX64.EFI
For the hypothetical system I mentioned in my previous post, $EFI_MOUNT_POINT is /usr/local/efi-boot-partition. That critical fie would be at /usr/local/efi-boot-partition/EFI/BOOT/BOOTX64.EFI
Back to top
View user's profile Send private message
FrankRizz0
l33t
l33t


Joined: 29 Nov 2006
Posts: 617

PostPosted: Wed Dec 30, 2015 6:44 pm    Post subject: Reply with quote

Ok compiling kernel right now after the legacy install atempt. I'm going to cp /boot/vmlinuz-* /boot/efi/EFI/BOOT/bootx64.efi, complete the rest of the install then when it comes to grub I will emerge sys-boot/grub && grub2-install --target=x86_64-efi --efi-directory=/boot/efi && grub2-mkconfig -o /boot/efi/grub.cfg && cp /boot/efi/grub.cfg /boot/efi/bootx64.efi?

Edit: After about 3 or 4 attempts earlier I installed Lubuntu and it booted, took 4 or 5 minutes to boot, but it eventually did it. Wondering if I should try Sabayon and look at the bootloader, etc.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Wed Dec 30, 2015 6:49 pm    Post subject: Reply with quote

You want grub right?

My grub file is what was renamed to BOOTX64.EFI.

I did this after my grub install:
Code:

cp /boot/grub/x86_64-efi/core.efi /boot/EFI/BOOT/BOOTX64.EFI
Back to top
View user's profile Send private message
FrankRizz0
l33t
l33t


Joined: 29 Nov 2006
Posts: 617

PostPosted: Wed Dec 30, 2015 6:51 pm    Post subject: Reply with quote

Apparently I do need to create the directory:

livecd linux # cp /boot/vmlinuz-* /boot/efi/EFI/BOOT/bootx64.efi
cp: cannot create regular file '/boot/efi/EFI/BOOT/bootx64.efi': No such file or directory

Edit: I don't care what I use, I want a working install of Gentoo, bootloader makes 0 difference to me mate.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Wed Dec 30, 2015 7:29 pm    Post subject: Reply with quote

are you intending to have only gentoo or gentoo plus other OS on this machine?
Can you pastebin the output of parted -l run from the install media?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
FrankRizz0
l33t
l33t


Joined: 29 Nov 2006
Posts: 617

PostPosted: Wed Dec 30, 2015 7:39 pm    Post subject: Reply with quote

Just Gentoo mate. You want me to paste the output of the minimal cd?
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Wed Dec 30, 2015 8:53 pm    Post subject: Reply with quote

OK so in that case your linux kernel would be fine, as long as you set the correct flags during configuration. I've never done that, not sure what they are. Something about a stub kernel I think.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Wed Dec 30, 2015 11:03 pm    Post subject: Reply with quote

Barring recent improvement; if your install media is the gentoo minimal cd you will not succeed in a uefi installation. You need uefi install media to create a uefi install. The media must be capable of uefi and the UEFI (BIOS) and/or the listed boot device must be in uefi mode. sysresccd.org is an ideal source for uefi install media.
for gentoo as the only OS, efi stub kernel is an excellent answer, grub is an unnecessary complication and source of boot delay.
parted -l | wgetpaste -t and blkid | wgetpaste -t from sysresccd/usb and post the url's please
_________________
Defund the FCC.
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1374

PostPosted: Thu Dec 31, 2015 2:05 am    Post subject: Reply with quote

FrankRizz0 wrote:
Ok compiling kernel right now after the legacy install atempt. I'm going to cp /boot/vmlinuz-* /boot/efi/EFI/BOOT/bootx64.efi, complete the rest of the install then when it comes to grub I will emerge sys-boot/grub && grub2-install --target=x86_64-efi --efi-directory=/boot/efi && grub2-mkconfig -o /boot/efi/grub.cfg && cp /boot/efi/grub.cfg /boot/efi/bootx64.efi?

Edit: After about 3 or 4 attempts earlier I installed Lubuntu and it booted, took 4 or 5 minutes to boot, but it eventually did it. Wondering if I should try Sabayon and look at the bootloader, etc.
Why do you think you have to setup a Gentoo/Sabayon as your installation?

Seeing a question of yours like this:
"cp /boot/efi/grub.cfg /boot/efi/bootx64.efi?"
Such a question is forbidden when using Gentoo.
You had to ask what is a cfg file and what an efi file instead.
Try/error behavior will get you random results. But for you to see
success a bunch of succeeding results in a row are needed.
I think you are better off using Lubuntu.
_________________
fun2gen2
Back to top
View user's profile Send private message
FrankRizz0
l33t
l33t


Joined: 29 Nov 2006
Posts: 617

PostPosted: Thu Dec 31, 2015 12:12 pm    Post subject: Reply with quote

I think you're better off staying out of the forums.
Back to top
View user's profile Send private message
FrankRizz0
l33t
l33t


Joined: 29 Nov 2006
Posts: 617

PostPosted: Thu Dec 31, 2015 5:42 pm    Post subject: Reply with quote

So I was able to get Gentoo installed without any errors during the grub process using sysrescuecd (thanks Donahue). Unfortunately, I still can't boot. I was once again presented with the grub> prompt. Actually, I shouldn't say that. I started up sysrescuecd, chose the option to start the kernel I think, and I ended up in my system. I honestly can't remeber if it said using my kernel or sysrescuecd's kernel, but it booted. Below is my install, my grub and my kernel config:

Code:
gdisk /dev/sda
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   500.0 MiB   EF00  EFI System
   2          411648         8603647   3.9 GiB     8200  Linux swap
   3         8603648       976773134   461.7 GiB   8300  Linux filesystem

mkfs.vfat -F 32 /dev/sda1 && mkfs.ext4 /dev/sda3 && mkswap /dev/sda2 && swapon /dev/sda2 && mount /dev/sda3 /mnt/gentoo && mkdir /mnt/gentoo/boot && mount /dev/sda1 /mnt/gentoo/boot && cd /mnt/gentoo && links https://www.gentoo.org/downloads/mirrors/
tar xvjpf stage3-*.tar.bz2 --xattrs
nano -w /mnt/gentoo/etc/portage/make.conf
USE="bindist mmx sse sse2 X imlib nls slit systray toolbar truetype vim-syntax xinerama glamor udev"
VIDEO_CARDS="radeon"
INPUT_DEVICES="evdev"
MAKEOPTS="-j5"
GRUB_PLATFORMS="efi-64"
mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf
mirrorselect -i -r -o >> /mnt/gentoo/etc/portage/make.conf
cp -L /etc/resolv.conf /mnt/gentoo/etc/ && mount -t proc proc /mnt/gentoo/proc && mount --rbind /sys /mnt/gentoo/sys && mount --make-rslave /mnt/gentoo/sys && mount --rbind /dev /mnt/gentoo/dev && mount --make-rslave /mnt/gentoo/dev && chroot /mnt/gentoo /bin/bash && source /etc/profile
export PS1="(chroot) $PS1"
emerge --sync && nano -w /etc/fstab
/dev/sda1               /boot           vfat            defaults,noatime        0 2
/dev/sda2               none            swap            sw              0 0
/dev/sda3               /               ext4            noatime         0 1

/dev/cdrom              /mnt/cdrom      auto            noauto,user     0 0
mkdir -p /boot/EFI/BOOT
eselect profile set 3 && echo "CST6CDT" > /etc/timezone && emerge --config sys-libs/timezone-data && nano -w /etc/locale.gen
eselect locale set 3 && locale-gen && env-update && source /etc/profile && emerge sys-kernel/gentoo-sources && emerge sys-apps/pciutils && cd /usr/src/linux && make menuconfig
make && make modules_install && make install && cp /boot/vmlinuz-* /boot/EFI/BOOT/bootx64.efi && nano -w /etc/conf.d/hostname
hostname="Rizz0-Built"
nano -w /etc/conf.d/net
config_enp1s0="dhcp"
nano -w /etc/hosts
127.0.0.1       Rizz0-Built.homenetwork Rizz0-Built     localhost
nano -w /etc/conf.d/hwclock
clock="local"
cd /etc/init.d && ln -s net.lo net.enp1s0 && rc-update add net.enp1s0 default && passwd
emerge linux-firmware && emerge --noreplace net-misc/netifrc && emerge app-admin/syslog-ng && rc-update add syslog-ng default && emerge sys-process/cronie && rc-update add cronie default && emerge sys-apps/mlocate && rc-update add sshd default && emerge net-misc/dhcpcd && rc-update add dhcpcd default && emerge sys-fs/dosfstools && emerge sys-boot/grub && grub2-install --target=x86_64-efi --efi-directory=/boot/EFI && grub2-mkconfig -o /boot/EFI/grub.cfg && cp /boot/EFI/grub.cfg /boot/EFI/BOOT/bootx64.efi && useradd -m -G users,wheel,audio -s /bin/bash bry2k200 && passwd bry2k200
exit
cd && umount -l /mnt/gentoo/dev{/shm,/pts,}
umount /mnt/gentoo{/boot,/sys,/proc,}
reboot


https://bpaste.net/show/457b7211f318

https://bpaste.net/show/68cfe0cca8b7

If you're still watching this thread 1clue, I had a question for you. After the kernel is configured, I
Code:
# cp /boot/vmlinuz-* /boot/EFI/BOOT/bootx64.efi

and then you told me to
Code:
# cp /boot/EFI/grub.cfg /boot/EFI/BOOT/bootx64.efi


This overwrites the file, so I'm wondering since there is no more kernel config, how does the kernel boot?
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Thu Dec 31, 2015 6:07 pm    Post subject: Reply with quote

Sorry, I got distracted.

The thing you want the system to execute (grub or the boot-capable kernel) needs to be at \EFI\BOOT\BOOTX64.EFI on the fat32-formatted EF00 partition.

If it was me who suggested to copy a .cfg file into that location then it was a typo and I'll edit my original post accordingly.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Thu Dec 31, 2015 6:42 pm    Post subject: Reply with quote

boot sysresccd/usb and run
Code:
parted -l | wgetpaste -t
blkid | wgetpaste -t
and post the url's please
_________________
Defund the FCC.
Back to top
View user's profile Send private message
FrankRizz0
l33t
l33t


Joined: 29 Nov 2006
Posts: 617

PostPosted: Thu Dec 31, 2015 7:02 pm    Post subject: Reply with quote

https://bpaste.net/show/27879084cefd

Code:
# parted -l | wgetpaste -t
-su: parted: command not found
No input read. Nothing to paste. Aborting.
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, 3  Next
Page 2 of 3

 
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