View previous topic :: View next topic |
Author |
Message |
gentusiast n00b

Joined: 27 Oct 2016 Posts: 17 Location: France
|
Posted: Thu Oct 27, 2016 11:47 am Post subject: [SOLVED]EFI msg at boot:Reboot and Select proper boot device |
|
|
Hi Team,
I am new to Gentoo. Could you please help me to boot up my install ?
You kind help is much appreciated.
>HARDWARE
I have just installed Gentoo over my AMD64 (Celeron, Radeon PCIe, SSD, 8GB RAM).
>INSTALL OPTIONS
- efi (via Grub2 default method)
- systemd, utf8
- kernel manual configuration
- no dual boot, only Gentoo is installed
>PROBLEM
Install seemed ok. But when I boot, it does not come up. I get :
Code: | Reboot and Select proper boot device or Insert Boot Media (...) |
>DOUBTS
Of course I have mounted /boot right before grub-install but have serious doubts on :
Code: | grub-install --target=x86_64-efi --efi-directory=/boot |
Did it need to be Code: | grub-install --target=x86_64-efi --efi-directory=/boot/efi | instead ? The same with /etc/fstab on efi boot partition on sda1. Did it have to be instead of my ?
Here are some elements I could take out :
Code: | Fdisk summary :
Device Size Type
/dev/sda1 256M EFI Sytem (type 1) <====
/dev/sda2 20G Linux filesystem (type 15)
/dev/sda3 12G swap (type 14)
/dev/sda4 30G Linux home (type 20)
All formated as per manual apart from this command :
# mkfs.vfat -F 32 /dev/sda1
$ more /etc/fstab
/dev/sda1 /boot vfat noauto,noatime 1 2 <====
/dev/sda2 / ext4 noatime 0 1
/dev/sda3 none swap sw 0 0
/dev/sda4 /home ext4 noatime 0 2
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
$ ls /boot <==== I was expecting some kind of EFI subdirectory here ...
abi-4.8.0-22-generic grub memtest86+.elf System.map-4.8.0-22-generic
config-4.8.0-22-generic memtest86+.bin memtest86+_multiboot.bin
$ ls /boot/grub/
gfxblacklist.txt grubenv unicode.pf2
$ more /etc/hosts
(...)
# IPv4 and IPv6 localhost aliases
127.0.0.1 localhost
192.168.1.2 mypc
::1 localhost
$ lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1c.3 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation 7 Series Chipset Family LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM]
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Caicos HDMI Audio [Radeon HD 6400 Series]
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
04:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 03) |
_________________ Regards,
Gentusiast
Last edited by gentusiast on Fri Nov 11, 2016 10:45 pm; edited 4 times in total |
|
Back to top |
|
 |
Roman_Gruber Advocate

Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Thu Oct 27, 2016 12:25 pm Post subject: |
|
|
Quote: | Reboot and Select proper boot device or Insert Boot Media (...) |
Usually this implies that your BIOS / UEFI do not load your bootloader
Could be
You did not enable the drive as bootable device in your bios. The bios is not correctly linked and installed to your bootloader for whatever reasons.
What kind of SSD is the SSD ? 2.5" SATA ? or problematic NVME or what they are called?
Is the hardware correctly installed?
--
Fastest way: My lazy approach ... Install a binary distro, reuse the bootlaoder and hack = create a bootentry for that binary distro bootloader. Reuse the partitions.
--
Usually.
Install disc in the device (HDD / SDD...)
Set that disc as bootable
Create partitions. Correct file system layout according to the gentoo handbook.
Correct bootloader files according to the handbook
map bootloader to the bios with the supplied bootloader scripts / tools => these days called grub-install
--
Additional I check if those created boot loader entries make sense, point to the correct partition, correct kernel parameters
--
Create kernel with genkernel (quick), or make it manually ...
Read out needed kernel modules again from a binary distro / linux live-dvd. => build a kernel with those needed modules |
|
Back to top |
|
 |
gentusiast n00b

Joined: 27 Oct 2016 Posts: 17 Location: France
|
Posted: Thu Oct 27, 2016 1:35 pm Post subject: |
|
|
Hi Roman,
Thanks for your answer.
>What kind of SSD is the SSD ?
2.5" SATA (quite common samsung 840 series), not NVM like Phil_r
>Is the hardware correctly installed?
Yes, perfectly. I am able to install other OS on this hardware.
Since your message, I have ran BIOS default values (to make sure it does not come from BIOS values) and booted directly on my SATA ssd.
It is the same issue.
That's why I have more doubts on my GRUB and /boot/efi ... When setting this all up I googled to several forums and we see people using :
Code: | grub-install --target=x86_64-efi --efi-directory=/boot |
other times
Code: | grub-install --target=x86_64-efi --efi-directory=/boot/efi |
The same for fstab, some use :
Code: | /dev/sda1 /boot vfat noauto,noatime 1 2 |
other use :
Code: | /dev/sda1 /boot/efi vfat noauto,noatime 1 2 |
and I even do not mention the other parameters vfat vs fat32 and 0 1 2 flags ... _________________ Regards,
Gentusiast |
|
Back to top |
|
 |
DONAHUE Watchman


Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Oct 27, 2016 4:24 pm Post subject: |
|
|
Your command, grub-install --target=x86_64-efi --efi-directory=/boot, apparently failed.
ls /boot does not show an EFI sub-directory (the grub-install --target=x86_64-efi --efi-directory=/boot command creates it)
Recursively, EFI structure should be:
ls -R /boot
/boot:
EFI
/boot/EFI:
gentoo
/boot/EFI/gentoo:
grubx64.efi
Suspect the boot partition was not mounted when grub-install was run since you report no error message after the command was executed.
Boot a UEFI capable livecd/usb such as system rescue cd/usb in uefi mode, mount the gentoo partitions at /mnt/gentoo, enter the chroot,use https://wiki.gentoo.org/wiki/GRUB2 watch for error messages and check ls -R /boot after. _________________ Defund the FCC. |
|
Back to top |
|
 |
gentusiast n00b

Joined: 27 Oct 2016 Posts: 17 Location: France
|
Posted: Fri Oct 28, 2016 11:08 am Post subject: |
|
|
Hi,
Thanks DONAHUE for your feedback :
I found an issue in :
/etc/portage/make.conf
I had :
Code: | #old one
#GRUB_PLATFORMS=efi-64
#corrected one I have fixed
GRUB_PLATFORMS="efi-64" |
so I chrooted and performed :
Code: | root #emerge --ask --newuse --deep sys-boot/grub:2 |
but it complained about some '/dev' issues ... this ranged a bell !!
I exited and mounted the remaining stuffs from the general install guide :
Code: | (chroot)# exit
#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
|
Since I have systemd I put them all as mentioned in the install guide.
Connected back in chroot and resumed the GRUB2 process :
Code: | (chroot)# emerge --ask --newuse --deep sys-boot/grub:2 |
This time the command was ok and "no outdated packages were found on your system"
But now I hit a new issue
Code: | (chroot)# mount -l | grep boot
/dev/sda1 on /boot type vfat (rw,noatime)
(chroot)# grub-mkconfig -o /boot/grub/grub.cfg
/usr/sbin/grub-mkconfig: line 235: /boot/grub/grub.cfg.new : no such file or directory |
Do you have an idea of what it could be ?
Seems wrc1944 had a similar error message long long time ago but since I do not understand it all in his post here
https://forums.gentoo.org/viewtopic-t-970478-start-0.html, I prefer ask for your opinion please.
Thank you. _________________ Regards,
Gentusiast |
|
Back to top |
|
 |
DONAHUE Watchman


Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Fri Oct 28, 2016 12:30 pm Post subject: |
|
|
You don't specifically mention repeating the running of
grub-install --target=x86_64-efi --efi-directory=/boot
I probably caused you a problem by referring you to the wiki which differs from the handbook (the reason for some using --efi-directory=/boot and others using --efi-directory=/boot/efi.) I just noticed that the wiki presents the command
grub-mkconfig -o /boot/grub/grub.cfg
before presenting any variety of the command
grub-install
So anyway:
Boot a UEFI capable livecd/usb such as system rescue cd/usb in uefi mode
mount the gentoo partitions at /mnt/gentoo
enter the chroot
run Code: | emerge wgetpaste
grub-install --target=x86_64-efi --efi-directory=/boot
ls -R /boot | wgetpaste -t
grub-mkconfig -o /boot/grub/grub.cfg
wgetpaste -t /boot/grub/grub.cfg |
post the url's returned by wgetpaste for review by the peanut gallery _________________ Defund the FCC. |
|
Back to top |
|
 |
gentusiast n00b

Joined: 27 Oct 2016 Posts: 17 Location: France
|
Posted: Fri Oct 28, 2016 12:50 pm Post subject: |
|
|
Hi DONAHUE,
Sorry I forgot to mention that : yes I DID run this command, it is my history (I am still connected) :
Code: | grub-install --target=x86_64-efi --efi-directory=/boot |
Quote: | I probably caused you a problem by referring you to the wiki which differs from the handbook (the reason for some using --efi-directory=/boot and others using --efi-directory=/boot/efi.) |
Don't worry, it is so nice to get interested in my issue and in this case, my data are already in a remote safe place. So feel free
One question please :
Shall I apply your action plan directly or is it cleaner to boot and mount it all again ?
Thank you. _________________ Regards,
Gentusiast |
|
Back to top |
|
 |
DONAHUE Watchman


Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Fri Oct 28, 2016 1:32 pm Post subject: |
|
|
either way _________________ Defund the FCC. |
|
Back to top |
|
 |
gentusiast n00b

Joined: 27 Oct 2016 Posts: 17 Location: France
|
Posted: Fri Oct 28, 2016 3:47 pm Post subject: |
|
|
Here you are :
Code: | # emerge wgetpaste
successful
# grub-install --target=x86_64-efi --efi-directory=/boot
Installing for x86_64-efi platform.
grub-install: error: /boot doesn't look like an EFI partition.
# fdisk -l /dev/sda
p
Device Start End Sectors Size Type
/dev/sda1 2048 526335 524288 256M EFI system
# ls -R /boot | wgetpaste -t
/boot:
config-4.4.26-gentoo
grub
System.map-4.4.26-gentoo
vmlinuz-4.4.26-gentoo
/boot/grub:
Your paste can be seen here: | https://paste.pound-python.org/show/fBuIXeWhNIG15DbqTPGG/
Code: | # grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configration file...
Found a linux image: /boot/vmlinuz-4.4.26-gentoo
done
# wgetpaste -t /boot/grub/grub.cfg
(...processing...)
Your paste can be seen here: | https://paste.pound-python.org/show/7ZYdumnOerxxEuh42lTy/ _________________ Regards,
Gentusiast |
|
Back to top |
|
 |
DONAHUE Watchman


Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Fri Oct 28, 2016 4:52 pm Post subject: |
|
|
Quote: | grub-install: error: /boot doesn't look like an EFI partition. | defines our problem
most likely cause: boot partition is not mounted on /boot directory; other possibilities include file system errors or /dev/sda1 being seen as some other name
Boot a UEFI capable livecd/usb such as system rescue cd/usb in uefi mode
mount only the gentoo root partition at /mnt/gentoo
run Code: | ls /mnt/gentoo/boot | wgetpaste -t | If files are shown in the output then at some point the boot partition was not mounted at /boot while operations were performed that wrote to /boot. If files are shown in /mnt/gentoo/boot while the boot partition is not mounted you will probably want to back them up particularly if your kernel is among them; suggest Code: | mkdir /mnt/gentoo/bkup
mv /mnt/gentoo/boot/* /mnt/gentoo/bkup | Then enter the chroot and run Code: | mount /dev/sda1 /boot
mount | wgetpaste -t # should show /dev/sda1 /boot vfat possibly with extra options
ls -l /boot | wgetpaste -t # should show kernel, grub, etc
# if not, restore the backup files from /bkup: mv /bkup/* /boot
grub-install --target=x86_64-efi --efi-directory=/boot | wgetpaste -t
ls -R /boot | wgetpaste -t
grub-mkconfig -o /boot/grub/grub.cfg
wgetpaste -t /boot/grub/grub.cfg |
post the url's returned by wgetpaste for review by the peanut gallery _________________ Defund the FCC. |
|
Back to top |
|
 |
324874 Apprentice

Joined: 26 Jul 2014 Posts: 168
|
Posted: Fri Oct 28, 2016 6:06 pm Post subject: |
|
|
DONAHUE, you repeated the same instructions!
gentusiast wrote: | Is it /boot/efi or /boot? |
@gentusiast: The answer is:
- You know the directory structure of the ESP (EFI System Partition) and you know where to put files: /boot
- You don't know this directory structure: /boot/efi
Note: /boot and /boot/efi are used as mount points. |
|
Back to top |
|
 |
Roman_Gruber Advocate

Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Fri Oct 28, 2016 7:13 pm Post subject: |
|
|
feng wrote: | DONAHUE, you repeated the same instructions!
gentusiast wrote: | Is it /boot/efi or /boot? |
@gentusiast: The answer is:
- You know the directory structure of the ESP (EFI System Partition) and you know where to put files: /boot
- You don't know this directory structure: /boot/efi
Note: /boot and /boot/efi are used as mount points. |
Usually what I do
use a bootable linux live iso. Sysrescue / linux mint whatever
mv /boot directory to something like
mv /boot /boot_live_cd
becasue /boot contains contents of the livecd. causes issues
mkdir /boot
mount /dev/sdXY /boot
ls /boot and verify if boot really is mounted and contains what boot should contain. also use mount command
mkdir /mnt/gentoo
mount root to /mnt/gentoo
regarding
/boot/efi
and your example of grub-install
go to your /boot directory, use ls, and check the contents of teh directory and how the EFI directory is written
Code: | ls /boot/EFI
EFI gentoo
|
This is my example. I use grub from a linux mint livecd. I think the directory is called different wtih different distros and grub versions. Also note the uppercase EFI in my case.
Best way is to check yourself how the directory is named in your /boot and adapt the grub-install command
--
Whenever my UEFI forgets the connection UEFI - GRUB bootloader i have to mount the partition and than enter this command:
Code: | grub2-install --efi-directory=/boot/EFI |
This command only works with the same ISO from the grub installation. Grub is not compatilbe with other version of grub. Other livecds refused to work with my grub from my installation.
The guides are also very different regarding installing grub2-install. or grub-install. I think it depends on the grub version in use, as there are several different version of grub available.
--
I hope this post is useful to you, give you a bit more insight.
Quote: | Note: /boot and /boot/efi are used as mount points. |
No, I do not agree
These are directories
You may use directories to mount devices (includes partitions)
Code: | mount|grep boot
/dev/sda2 on /boot type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
ASUS-G75VW boot # ls -alh /boot/EFI
total 22K
drwxr-xr-x 4 root root 2,0K Nov 11 2015 .
drwxr-xr-x 9 root root 16K Jan 1 1970 ..
drwxr-xr-x 5 root root 2,0K Sep 12 02:01 EFI
drwxr-xr-x 2 root root 2,0K Okt 7 2015 gentoo
ASUS-G75VW boot # ls -alh /
total 92K
drwxr-xr-x 21 root root 4,0K Sep 17 23:20 .
drwxr-xr-x 21 root root 4,0K Sep 17 23:20 ..
drwxr-xr-x 2 root root 4,0K Okt 21 10:08 bin
drwxr-xr-x 9 root root 16K Jan 1 1970 boot
drwxr-xr-x 18 root root 4,3K Okt 28 20:58 dev
....
|
Only mount command gives an overview what is mounted as of now on that box.
drwxr-xr-x => d ... its a directory, thats it
That EFI directory is just a directory where the grub (grub generic for any grub version) bootloader just stores a few files which are than mapped and used by the grub-install (or grub2-install) command. Vaguely expressed => "Just a generic config / binary directory"
/boot may be used as a mountpoint, but I am quite sure installations on uefi still supports only mounting /.
The configuration of a separate boot is just a special case of many ways on how to install a gnu - linux |
|
Back to top |
|
 |
DONAHUE Watchman


Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
|
Back to top |
|
 |
gentusiast n00b

Joined: 27 Oct 2016 Posts: 17 Location: France
|
Posted: Sat Oct 29, 2016 1:38 am Post subject: |
|
|
Hi,
I decided to double check and I just saw that despite my motherboard is UEFI (and my previous distro had been installed clearly with EFI) ... I just cannot boot onto the gentoo media in UEFI mode !!
There is no "UEFI cdrom boot option" resent here AND USB key with the Gentoo iso does not boot when I select the "UEFI" mode ... it returns :
Reboot or select proper boot device or insert boot media. Missing operating system.
I admit I have not read the first chapters of the Install guide yet ... just created the iso with Unetbootin and engraved the CD ...
Btw, I will be OOTO for a week and will resume work from 6 or 7 November.
Again many thanks for your feedback.
Regards. _________________ Regards,
Gentusiast |
|
Back to top |
|
 |
DONAHUE Watchman


Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
|
Back to top |
|
 |
324874 Apprentice

Joined: 26 Jul 2014 Posts: 168
|
Posted: Sat Oct 29, 2016 7:36 am Post subject: |
|
|
@Roman_Gruber: I know how to mount a filesystem. I don't need an explanation. My previous affirmation about mount points is correct in the context.
I could have said: "/boot/efi, /boot or any directory you want, may be used as a mount point".
Roman_Gruber wrote: | /boot may be used as a mountpoint, but I am quite sure installations on uefi still supports only mounting / |
A mount point is a location in the file system giving access to a root file system located on another partition. The UEFI specification only defines the directory structure of the ESP.
Roman_Gruber wrote: | This command only works with the same ISO from the grub installation. Grub is not compatilbe with other version of grub. Other livecds refused to work with my grub from my installation. |
Roman_Gruber: | root # mv /boot /boot_live_cd
root # mkdir /boot
root # mount /dev/sdXY /boot
root # mkdir /mnt/gentoo |
The above operations aren't suitable (see the handbook). The mount point is "located on" the LiveCD and it should be "located", for example, on a hard drive (in your Gentoo environment).
Roman_Gruber: | root # mount /dev/sdXY /boot # /dev/sdXY is the EFI System Partition (ESP) |
Roman_Gruber: | ASUS-G75VW boot # ls -alh /boot/EFI
total 22K
drwxr-xr-x 4 root root 2,0K Nov 11 2015 .
drwxr-xr-x 9 root root 16K Jan 1 1970 ..
drwxr-xr-x 5 root root 2,0K Sep 12 02:01 EFI
drwxr-xr-x 2 root root 2,0K Okt 7 2015 gentoo |
I see clearly that you haven't understood the notion of mount point.
Best regards, feng. |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23309
|
Posted: Sun Oct 30, 2016 10:54 pm Post subject: |
|
|
Moderator note: a subthread between feng and Roman_Gruber discussing conversation styles and some of the finer points of UEFI was split to a separate thread, to keep this thread clear for the original issue. That thread is Roman_Gruber, feng: UEFI, mountpoints in the Gentoo Forums Feedback forum. |
|
Back to top |
|
 |
gentusiast n00b

Joined: 27 Oct 2016 Posts: 17 Location: France
|
Posted: Fri Nov 11, 2016 6:06 pm Post subject: |
|
|
Hi,
I have reinstalled from scratch using the hybrid DVD, instead of the minimal CD.
This time it worked fine.
Before to actually run the grub-install command, I did a :
so I make sure I was on the dedicates vfat partition and not on "another" /boot
Thank you for your kind assistance.
N.B : It still does not boot up yet but at least I see the EFI entry in my bios "Gentoo GNU/Linux"). I will work it and open a separate thread if necessary.
But we can mark the case as solved and the fix was "use DVD not CD when installing EFI". _________________ Regards,
Gentusiast |
|
Back to top |
|
 |
|