Discussion:
[gentoo-user] New installation - not booting
(too old to reply)
t***@sys-concept.com
2023-12-05 17:10:01 UTC
Permalink
It has been some time since I installed Gentoo.
After partitioning, and installing the system after reboot I get kernel selection from grub and hitting enter,
I don't see any text scrolling on the screen, and I don't see the login screen.

Is the text scroll disabled for booting or is my configuration incorrect?

Here are some details:
Partition:
/dev/nvme0n1p1     2048    2099199    2097152     1G EFI System
/dev/nvme0n1p2  2099200   10487807    8388608     4G Linux swap
/dev/nvme0n1p3 10487808 1953523711 1943035904 926.5G Linux filesystem

cat /etc/fstab
/dev/nvme0n1p1 /efi      vfat  noauto,noatime  1 2
/dev/nvme0n1p2 none swap sw 0 0
/dev/nvme0n1p3  / ext4 noatime 0 1

/etc/default/grub:
...
# Append parameters to the linux kernel command line for non-recovery entries
#GRUB_CMDLINE_LINUX_DEFAULT=""

To install grub, I run:
 grub-install --target=x86_64-efi --efi-directory=/efi

I think I install grub in a wrong way.
When I mount "boot" content of /boot:
ls /boot/
EFI

When I unmount "boot" content of /boot:
ls /boot/
System.map-6.1.57-gentoo config-6.1.57-gentoo grub vmlinuz-6.1.57-gentoo
--
Thelma
Cara Salter
2023-12-05 17:20:02 UTC
Permalink
Post by t***@sys-concept.com
It has been some time since I installed Gentoo.
After partitioning, and installing the system after reboot I get kernel
selection from grub and hitting enter,
I don't see any text scrolling on the screen, and I don't see the login screen.
I think I install grub in a wrong way.
ls /boot/
EFI
Is your EFI directory /efi or /boot? If it's /efi, then your mountpoint
should be in /boot as is in your /etc/fstab.
Post by t***@sys-concept.com
ls /boot/
System.map-6.1.57-gentoo  config-6.1.57-gentoo  grub  vmlinuz-6.1.57-gentoo
t***@sys-concept.com
2023-12-05 18:20:01 UTC
Permalink
Post by t***@sys-concept.com
It has been some time since I installed Gentoo.
After partitioning, and installing the system after reboot I get kernel selection from grub and hitting enter,
I don't see any text scrolling on the screen, and I don't see the login screen.
I think I install grub in a wrong way.
ls /boot/
EFI
Is your EFI directory /efi or /boot? If it's /efi, then your mountpoint should be in /boot as is in your /etc/fstab.
Post by t***@sys-concept.com
ls /boot/
System.map-6.1.57-gentoo  config-6.1.57-gentoo  grub  vmlinuz-6.1.57-gentoo
The /efi directory was empty
I moved /boot to /boot_backup crated /boot directory again
mount /dev/nvme0n1p1 /boot
run:
grub-install --target=x86_64-efi --efi-directory=/boot

installed kernel by running "make install" by default it install to boot ( I think).
Change fstab from /eft to /boot:
#/dev/nvme0n1p1 /efi      vfat  noauto,noatime  1 2
/dev/nvme0n1p1 /boot      vfat  noauto,noatime  1 2
but now when system boot it can not find any kernel, it just display "grub" command on the screen
t***@sys-concept.com
2023-12-05 18:20:01 UTC
Permalink
Post by t***@sys-concept.com
Post by t***@sys-concept.com
It has been some time since I installed Gentoo.
After partitioning, and installing the system after reboot I get kernel selection from grub and hitting enter,
I don't see any text scrolling on the screen, and I don't see the login screen.
I think I install grub in a wrong way.
ls /boot/
EFI
Is your EFI directory /efi or /boot? If it's /efi, then your mountpoint should be in /boot as is in your /etc/fstab.
Post by t***@sys-concept.com
ls /boot/
System.map-6.1.57-gentoo  config-6.1.57-gentoo  grub  vmlinuz-6.1.57-gentoo
The /efi directory was empty
I moved /boot to /boot_backup crated /boot directory again
mount /dev/nvme0n1p1 /boot
grub-install --target=x86_64-efi --efi-directory=/boot
installed kernel by running "make install" by default it install to boot ( I think).
#/dev/nvme0n1p1 /efi      vfat  noauto,noatime  1 2
/dev/nvme0n1p1 /boot      vfat  noauto,noatime  1 2
but now when system boot it can not find any kernel, it just display "grub" command on the screen
When I boot strap the system I tried to run:

grub-install --target=x86_64-efi --efi-directory=/efi
Installing for x86_64-efi platform.
grub-install: error: /efi doesn't look like an EFI partition.
Michael
2023-12-05 19:40:01 UTC
Permalink
Post by t***@sys-concept.com
Post by Cara Salter
Post by t***@sys-concept.com
It has been some time since I installed Gentoo.
After partitioning, and installing the system after reboot I get kernel
selection from grub and hitting enter, I don't see any text scrolling on
the screen, and I don't see the login screen.
I think I install grub in a wrong way.
ls /boot/
EFI
Is your EFI directory /efi or /boot? If it's /efi, then your mountpoint
should be in /boot as is in your /etc/fstab.>
Post by t***@sys-concept.com
ls /boot/
System.map-6.1.57-gentoo config-6.1.57-gentoo grub
vmlinuz-6.1.57-gentoo
The /efi directory was empty
I moved /boot to /boot_backup crated /boot directory again
mount /dev/nvme0n1p1 /boot
grub-install --target=x86_64-efi --efi-directory=/boot
installed kernel by running "make install" by default it install to boot ( I
#/dev/nvme0n1p1 /efi vfat noauto,noatime 1 2
/dev/nvme0n1p1 /boot vfat noauto,noatime 1 2
but now when system boot it can not find any kernel, it just display "grub"
command on the screen
Please read the necessary documentation:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader

Your boot partition is /dev/nvme0n1p1 and its mountpoint is /boot. You must
create this partition with the appropriate EFI System type (in gdisk use
EF00).

The /efi directory must be at the top of the /boot partition filesystem,
accessible via /boot/efi.
t***@sys-concept.com
2023-12-05 20:10:01 UTC
Permalink
Post by Michael
Post by t***@sys-concept.com
Post by Cara Salter
Post by t***@sys-concept.com
It has been some time since I installed Gentoo.
After partitioning, and installing the system after reboot I get kernel
selection from grub and hitting enter, I don't see any text scrolling on
the screen, and I don't see the login screen.
I think I install grub in a wrong way.
ls /boot/
EFI
Is your EFI directory /efi or /boot? If it's /efi, then your mountpoint
should be in /boot as is in your /etc/fstab.>
Post by t***@sys-concept.com
ls /boot/
System.map-6.1.57-gentoo config-6.1.57-gentoo grub
vmlinuz-6.1.57-gentoo
The /efi directory was empty
I moved /boot to /boot_backup crated /boot directory again
mount /dev/nvme0n1p1 /boot
grub-install --target=x86_64-efi --efi-directory=/boot
installed kernel by running "make install" by default it install to boot ( I
#/dev/nvme0n1p1 /efi vfat noauto,noatime 1 2
/dev/nvme0n1p1 /boot vfat noauto,noatime 1 2
but now when system boot it can not find any kernel, it just display "grub"
command on the screen
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader
Your boot partition is /dev/nvme0n1p1 and its mountpoint is /boot. You must
create this partition with the appropriate EFI System type (in gdisk use
EF00).
The /efi directory must be at the top of the /boot partition filesystem,
accessible via /boot/efi.
I'm kind of confused at this point.
Where the kernel files should be copied? /boot or /efi directory
- System.map-6.1.57-gentoo
- config-6.1.57-gentoo
- vmlinuz-6.1.57-gentoo

In fstab I have:
/dev/nvme0n1p1 /efi vfat noauto,noatime 1 2

If /efi is a boot partition I assume the kernel files should be there as well; but somehow it doesn't work.

The link you provided instruct user to run:
grub-mkconfig -o /boot/grub/grub.cfg

When "/dev/nvme0n1p1 is mounted on /efi"
shouldn't it be:
grub-mkconfig -o /efi/grub/grub.cfg
Peter Böhm
2023-12-05 21:10:01 UTC
Permalink
Post by t***@sys-concept.com
Post by Michael
Post by t***@sys-concept.com
Post by Cara Salter
Post by t***@sys-concept.com
It has been some time since I installed Gentoo.
After partitioning, and installing the system after reboot I get kernel
selection from grub and hitting enter, I don't see any text scrolling on
the screen, and I don't see the login screen.
I think I install grub in a wrong way.
ls /boot/
EFI
Is your EFI directory /efi or /boot? If it's /efi, then your mountpoint
should be in /boot as is in your /etc/fstab.>
Post by t***@sys-concept.com
ls /boot/
System.map-6.1.57-gentoo config-6.1.57-gentoo grub
vmlinuz-6.1.57-gentoo
The /efi directory was empty
I moved /boot to /boot_backup crated /boot directory again
mount /dev/nvme0n1p1 /boot
grub-install --target=x86_64-efi --efi-directory=/boot
installed kernel by running "make install" by default it install to boot
#/dev/nvme0n1p1 /efi vfat noauto,noatime 1 2
/dev/nvme0n1p1 /boot vfat noauto,noatime 1 2
but now when system boot it can not find any kernel, it just display "grub"
command on the screen
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader
Your boot partition is /dev/nvme0n1p1 and its mountpoint is /boot. You
must create this partition with the appropriate EFI System type (in gdisk
use EF00).
The /efi directory must be at the top of the /boot partition filesystem,
accessible via /boot/efi.
I'm kind of confused at this point.
Where the kernel files should be copied? /boot or /efi directory
- System.map-6.1.57-gentoo
- config-6.1.57-gentoo
- vmlinuz-6.1.57-gentoo
/dev/nvme0n1p1 /efi vfat noauto,noatime
1 2
Post by t***@sys-concept.com
If /efi is a boot partition I assume the kernel files should be there as
well; but somehow it doesn't work.
grub-mkconfig -o /boot/grub/grub.cfg
When "/dev/nvme0n1p1 is mounted on /efi"
grub-mkconfig -o /efi/grub/grub.cfg
No ... anything is alright here:

With grub-install --target=x86_64-efi --efi-directory=/efi you will installe the
first part of grub (grubx64.efi) INTO the ESP:
\efi\gentoo\grubx64.efi
<==>
/efi/efi/gentoo/grubx64.efi when you have mounted your ESP to /efi.
(see more with "efibootmgr)

With grub-mkconfig -o /boot/grub/grub.cfg you configure grub - residing IN /
boot/grub = THIS is the second part of grub !!

Maybe read:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/
Boot_kernel_via_UEFI#Prerequisites_for_an_UEFI_boot

(only this chapter; not the next chapter, because it is a guide for installing
a stub kernel)
Peter Böhm
2023-12-05 21:00:02 UTC
Permalink
Post by Michael
Post by t***@sys-concept.com
Post by Cara Salter
Post by t***@sys-concept.com
It has been some time since I installed Gentoo.
After partitioning, and installing the system after reboot I get kernel
selection from grub and hitting enter, I don't see any text scrolling on
the screen, and I don't see the login screen.
I think I install grub in a wrong way.
ls /boot/
EFI
Is your EFI directory /efi or /boot? If it's /efi, then your mountpoint
should be in /boot as is in your /etc/fstab.>
Post by t***@sys-concept.com
ls /boot/
System.map-6.1.57-gentoo config-6.1.57-gentoo grub
vmlinuz-6.1.57-gentoo
The /efi directory was empty
I moved /boot to /boot_backup crated /boot directory again
mount /dev/nvme0n1p1 /boot
grub-install --target=x86_64-efi --efi-directory=/boot
installed kernel by running "make install" by default it install to boot (
#/dev/nvme0n1p1 /efi vfat noauto,noatime 1 2
/dev/nvme0n1p1 /boot vfat noauto,noatime 1 2
but now when system boot it can not find any kernel, it just display "grub"
command on the screen
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader
Your boot partition is /dev/nvme0n1p1 and its mountpoint is /boot. You must
create this partition with the appropriate EFI System type (in gdisk use
EF00).
The /efi directory must be at the top of the /boot partition filesystem,
accessible via /boot/efi.
That is wrong.

The mountpoint for the ESP should be NOW /efi (therefore you see in our AMD64
handbook a "mkdir /efi").

/boot is the standard directory for the kernel ... and it is NOW an ordinary
directory of the root directory (so yes, the content of it resides in the root
partition). Dont mount anything to /boot. Yes, a "make install" (or genkernel)
installs the kernel into /boot.

If /etc/fstab should be: /dev/nvme0n1p1 /efi vfat noauto,noatime 1 2
(IF this is your ESP)
After mounting this ESP to /efi (and no mount on /boot + kernel IN boot) you
should run: grub-install --target=x86_64-efi --efi-directory=/efi
AND a grub-mkconfig ! (so this routine will find your kernel in /boot and add
it to the grub's config file; Yes your grub will be also in /boot/grub.
Peter Humphreey
2023-12-06 00:00:01 UTC
Permalink
Post by Michael
Your boot partition is /dev/nvme0n1p1 and its mountpoint is /boot. You must
create this partition with the appropriate EFI System type (in gdisk use
EF00).
The /efi directory must be at the top of the /boot partition filesystem,
accessible via /boot/efi.
I've been operating that way for some years, but I have reason to believe that
things have changed. I'll start a new thread tomorrow.
--
Regards,
Peter.
Michael
2023-12-06 11:40:01 UTC
Permalink
Post by Peter Humphreey
Post by Michael
Your boot partition is /dev/nvme0n1p1 and its mountpoint is /boot. You
must create this partition with the appropriate EFI System type (in gdisk
use EF00).
The /efi directory must be at the top of the /boot partition filesystem,
accessible via /boot/efi.
I've been operating that way for some years, but I have reason to believe
that things have changed. I'll start a new thread tomorrow.
Both Peters are right and my previous answer was wrong for Thelma's usecase,
the /boot directory must be on a linux fs which understands symlinks *if
vmlinuz is used* - this is because the ESP partition's FAT fs cannot use
symlinks.

The /efi directory *must* be on a FAT fs and contain the grubx64.efi, or any
other bootloader *.efi image.

If kernels are copied manually and vmlinuz symlinks are not used then a FAT
partition with mountpoint on /boot and containing the /boot/efi directory will
work as intended.
t***@sys-concept.com
2023-12-06 14:30:01 UTC
Permalink
Post by Michael
Post by Peter Humphreey
Post by Michael
Your boot partition is /dev/nvme0n1p1 and its mountpoint is /boot. You
must create this partition with the appropriate EFI System type (in gdisk
use EF00).
The /efi directory must be at the top of the /boot partition filesystem,
accessible via /boot/efi.
I've been operating that way for some years, but I have reason to believe
that things have changed. I'll start a new thread tomorrow.
Both Peters are right and my previous answer was wrong for Thelma's usecase,
the /boot directory must be on a linux fs which understands symlinks *if
vmlinuz is used* - this is because the ESP partition's FAT fs cannot use
symlinks.
The /efi directory *must* be on a FAT fs and contain the grubx64.efi, or any
other bootloader *.efi image.
If kernels are copied manually and vmlinuz symlinks are not used then a FAT
partition with mountpoint on /boot and containing the /boot/efi directory will
work as intended.
Thanks for Peters explanation now it is clear to me how it works.
But I have a question, in Gentoo manual hand book
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks
the instruction is to create 1 GiB partition for /efi

Why so large, do others file system need it so much?
In my case /efi take only 1%
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p1 1022M 280K 1022M 1% /efi
Peter Humphreey
2023-12-06 15:00:02 UTC
Permalink
Post by t***@sys-concept.com
Post by Michael
Post by Peter Humphreey
Post by Michael
Your boot partition is /dev/nvme0n1p1 and its mountpoint is /boot. You
must create this partition with the appropriate EFI System type (in gdisk
use EF00).
The /efi directory must be at the top of the /boot partition filesystem,
accessible via /boot/efi.
I've been operating that way for some years, but I have reason to believe
that things have changed. I'll start a new thread tomorrow.
Both Peters are right and my previous answer was wrong for Thelma's
usecase, the /boot directory must be on a linux fs which understands
symlinks *if vmlinuz is used* - this is because the ESP partition's FAT
fs cannot use symlinks.
The /efi directory *must* be on a FAT fs and contain the grubx64.efi, or
any other bootloader *.efi image.
If kernels are copied manually and vmlinuz symlinks are not used then a FAT
partition with mountpoint on /boot and containing the /boot/efi directory
will work as intended.
Thanks for Peters explanation now it is clear to me how it works.
I think there's some misattribution here: I haven't explained anything in this
area - indeed I have some questions of my own.
Post by t***@sys-concept.com
But I have a question, in Gentoo manual hand book
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks
the instruction is to create 1 GiB partition for /efi
It's a suggestion, not an instruction; you don't have to follow it.
Post by t***@sys-concept.com
Why so large, do others file system need it so much?
In my case /efi take only 1%
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p1 1022M 280K 1022M 1% /efi
The idea is that you may want to install another system later, which may want
to install its own code in /efi. By all means shrink it if you think that's
unlikely and you need the space. Gparted on SysRescCD is ideal for this.
--
Regards,
Peter.
Wols Lists
2023-12-06 18:50:01 UTC
Permalink
Post by Peter Humphreey
The idea is that you may want to install another system later, which may want
to install its own code in /efi. By all means shrink it if you think that's
unlikely and you need the space. Gparted on SysRescCD is ideal for this.
I had the opposite problem - Windows created a tiny EFI partition and I
couldn't install linux ...

Cheers,
Wol
Peter Humphrey
2023-12-07 11:50:01 UTC
Permalink
Post by Wols Lists
Post by Peter Humphreey
The idea is that you may want to install another system later, which may
want to install its own code in /efi. By all means shrink it if you think
that's unlikely and you need the space. Gparted on SysRescCD is ideal for
this.
I had the opposite problem - Windows created a tiny EFI partition and I
couldn't install linux ...
...and you couldn't enlarge the partition because Windows then wouldn't boot!
--
Regards,
Peter.
Michael
2023-12-07 12:00:02 UTC
Permalink
Post by Peter Humphrey
Post by Wols Lists
Post by Peter Humphreey
The idea is that you may want to install another system later, which may
want to install its own code in /efi. By all means shrink it if you think
that's unlikely and you need the space. Gparted on SysRescCD is ideal for
this.
I had the opposite problem - Windows created a tiny EFI partition and I
couldn't install linux ...
...and you couldn't enlarge the partition because Windows then wouldn't boot!
You can enlarge and even move a Windows partition (boot system partition and/
or the main Windows OS C:\ drive partition), but you MUST either not change
the partition UUID or edit the BCD file with the new UUID numbers. Also, it
would be a good idea not to interfere with the MSR partition. Its been quite
a few years since I had to mess up with any of this so I'm not up to date with
the latest MSWindows boot requirements.
Michael
2023-12-07 12:30:01 UTC
Permalink
Post by Wols Lists
Post by Peter Humphreey
The idea is that you may want to install another system later, which may
want to install its own code in /efi. By all means shrink it if you think
that's unlikely and you need the space. Gparted on SysRescCD is ideal for
this.
I had the opposite problem - Windows created a tiny EFI partition and I
couldn't install linux ...
Cheers,
Wol
Looking at a UEFI system which had MSWindows installed I can see the ESP is
only 96M:

Filesystem Type Size Used Avail Use% Mounted on
/dev/sda1 vfat 96M 64M 33M 67% /boot

Of this space Microsoft eats up 27M. Binary distros tend to use less than 5M
if they use GRUB. Kernel and initrd images are stored on the OS partition.

Gentoo will be more hungry, if you drop your kernel/initrd images in your ESP;
e.g. two kernel images with embedded microcode and firmware (no initrd) weigh
in at 32M. I usually keep 2-3 gentoo kernels in the ESP with no problem:

# du -s -h /boot/EFI/*
1.9M /boot/EFI/Boot
32M /boot/EFI/Gentoo
27M /boot/EFI/Microsoft
4.3M /boot/EFI/ubuntu

Thankfully storage space is relatively cheap(er) these days and a 1G ESP
wouldn't be considered excessive. It would also be handy if you wanted to
keep a rescue image in there.

Peter Böhm
2023-12-05 17:30:01 UTC
Permalink
Post by t***@sys-concept.com
It has been some time since I installed Gentoo.
After partitioning, and installing the system after reboot I get kernel
selection from grub and hitting enter, I don't see any text scrolling on
the screen, and I don't see the login screen.
Is the text scroll disabled for booting or is my configuration incorrect?
/dev/nvme0n1p1 2048 2099199 2097152 1G EFI System
/dev/nvme0n1p2 2099200 10487807 8388608 4G Linux swap
/dev/nvme0n1p3 10487808 1953523711 1943035904 926.5G Linux filesystem
cat /etc/fstab
/dev/nvme0n1p1 /efi vfat noauto,noatime 1 2
/dev/nvme0n1p2 none swap sw 0 0
/dev/nvme0n1p3 / ext4 noatime 0 1
...
# Append parameters to the linux kernel command line for non-recovery
entries #GRUB_CMDLINE_LINUX_DEFAULT=""
grub-install --target=x86_64-efi --efi-directory=/efi
I think I install grub in a wrong way.
ls /boot/
EFI
ls /boot/
System.map-6.1.57-gentoo config-6.1.57-gentoo grub vmlinuz-6.1.57-gentoo
Please read the first post of:

https://forums.gentoo.org/viewtopic-t-1165115.html

Kind regards,
Peter
Loading...