Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Solved grub fail again
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
borje2
n00b
n00b


Joined: 19 Apr 2024
Posts: 33
Location: Gällivare

PostPosted: Sun Apr 28, 2024 6:22 am    Post subject: Reply with quote

output from:
lsblk -o name,mountpoints,partlabel,parttype
ls -F /mnt/*
mount

KOD


NAME MOUNTPOINTS PARTLABEL PARTTYPE
loop0 /mnt/livecd

sda
sda1 c12a7328-f81f-11d2-ba4b-00a0c93ec93b

sda2 0657fd6d-a4ab-43c4-84e5-0933c84b4f4f

sda3 0fc63daf-8483-4772-8e79-3d69d8477de4

sr0 /mnt/cdrom

zram0



/mnt/cdrom:
README.txt boot/ efi/ image.squashfs mach_kernel memtest64.bios
System/ boot.catalog efi.img livecd memtest.efi64

/mnt/gentoo:

/mnt/header:

/mnt/key:

/mnt/livecd:
bin/ dev/ home/ lib64/ mnt/ proc/ run/ sys/ usr/
boot/ etc/ lib/ media/ opt/ root/ sbin/ tmp/ var/


mount:

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
none on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=10240k,nr_inodes=1006910,mode=755)

devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on / type tmpfs (rw,relatime)
/dev/sr0 on /mnt/cdrom type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8)
/mnt/cdrom/image.squashfs on /mnt/livecd type squashfs (ro,relatime,errors=continue)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4248
Location: Bavaria

PostPosted: Sun Apr 28, 2024 10:56 am    Post subject: Reply with quote

borje2 wrote:
Code:
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)

This means you have disabled CSM mode in your UEFI ... AND ... now you are able to proceed with the installation steps for an UEFI boot. Please notice every step you will do now ... and stop immediately if an error occurs. THEN give us all steps AND the error message.

Dont forget to do ALL necessary mounts BEFORE chrooting into your installation; or - as said before - use arch-chroot ;-)

Maybe print this short article and compare it with your steps when reading the AMD64 Handbook: https://wiki.gentoo.org/wiki/User:Pietinger/Draft/Quick_Installation_OpenRC_for_an_UEFI_System
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
borje2
n00b
n00b


Joined: 19 Apr 2024
Posts: 33
Location: Gällivare

PostPosted: Sun Apr 28, 2024 1:35 pm    Post subject: Reply with quote

from live-cd
BOOTMENY
kör UEFI-program
DVD-RAM UJBE1
EFI
BOOT
BOOTX64.EFI
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
mount --types 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
mount --bind /run /mnt/gentoo/run
mount --make-slave /mnt/gentoo/run
test -L /dev/shm && rm /dev/shm && mkdir /dev/shm
mount --types tmpfs --options nosuid,nodev,noexec shm

mount: shm: can't find in /etc/fstab

/Borje
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1549
Location: South America

PostPosted: Sun Apr 28, 2024 3:24 pm    Post subject: Reply with quote

borje2 wrote:
Code:
mount /dev/sda1 /mnt/gentoo/boot

This means that you are choosing to mount the EFI System Partition at /boot. Take note of that, because the Gentoo Handbook currently assumes a different choice.

borje2 wrote:
Code:
test -L /dev/shm && rm /dev/shm && mkdir /dev/shm
mount --types tmpfs --options nosuid,nodev,noexec shm

mount: shm: can't find in /etc/fstab

Don't do this. The live medium has already taken care of /dev/shm:

borje2 wrote:
Code:
mount:
...
tmpfs   on   /dev/shm type tmpfs (rw,nosuid,nodev)

_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
borje2
n00b
n00b


Joined: 19 Apr 2024
Posts: 33
Location: Gällivare

PostPosted: Sun Apr 28, 2024 5:09 pm    Post subject: Reply with quote

cont. after typerror

mkdir /efi
mount /dev/sda1 /efi
mkdir --parents /etc/portage/repos.conf
cp /usr/share/portage/config/repos.conf /etc/portage/repos.conf/gentoo.conf

arch-chroot /mnt/gentoo /bin/bash
mount: /mnt/gentoo/sys: sys already mounted or mount point busy.
dsmesg(1) may have more information after failed mount system call.
==>ERROR: fail to setup chroot /mnt/gentoo

/Borje
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4248
Location: Bavaria

PostPosted: Sun Apr 28, 2024 5:50 pm    Post subject: Reply with quote

Boot again and start at the beginning.

Then decide if you want to do all mounts yourself OR you use arch-root ->

borje2 wrote:
mount: /mnt/gentoo/sys: sys already mounted or mount point busy.

(Dont try to do both)

With arch-root you must mount ONLY your root partition ... and then your ESP ... recommendation for ESP is /efi ... try to love the Handbook a little bit more ;-)

borje2 wrote:
arch-chroot /mnt/gentoo /bin/bash

Try to do it like the Handbook says:
Code:
arch-chroot /mnt/gentoo

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1016

PostPosted: Sun Apr 28, 2024 7:13 pm    Post subject: Reply with quote

Code:
mkdir /efi
mount /dev/sda1 /efi
mkdir --parents /etc/portage/repos.conf
cp /usr/share/portage/config/repos.conf /etc/portage/repos.conf/gentoo.conf

these commands must be done after chroot in /mnt/gentoo !

You're still in live-cd enviroment !

Code:
arch-chroot /mnt/gentoo /bin/bash

then
Code:
mkdir /efi
mount /dev/sda1 /efi
mkdir --parents /etc/portage/repos.conf
cp /usr/share/portage/config/repos.conf /etc/portage/repos.conf/gentoo.conf
[...]


follow step by step the handbook
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
borje2
n00b
n00b


Joined: 19 Apr 2024
Posts: 33
Location: Gällivare

PostPosted: Mon Apr 29, 2024 6:16 am    Post subject: Reply with quote

grub-mkconfig -o /boot/grub/grub.cfg


Warning: os-prober will be executed to detect other bootable partitions

Its output will be used to detect bootable binaries on them and create boot entries
Adding boot menu entry for UEFI firmware settings...
done

/Borje
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4248
Location: Bavaria

PostPosted: Mon Apr 29, 2024 12:05 pm    Post subject: Reply with quote

The warning is okay ... dont mind.

The only important thing is that grub-mkconfig has found a kernel and told you so. You can check it by examining the /boot/grub/grub.cfg.

Proceed with your installation.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
borje2
n00b
n00b


Joined: 19 Apr 2024
Posts: 33
Location: Gällivare

PostPosted: Mon Apr 29, 2024 12:33 pm    Post subject: Reply with quote

I am not sure what to do now

grub-mkconfig don't find the kernal

/Borje
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4248
Location: Bavaria

PostPosted: Mon Apr 29, 2024 2:23 pm    Post subject: Reply with quote

borje2 wrote:
Igrub-mkconfig don't find the kernal

Was there any error when you did one of these commands (in this chapter) ?
-> https://wiki.gentoo.org/wiki/User:Pietinger/Draft/Quick_Installation_OpenRC_for_an_UEFI_System#Kernel
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
borje2
n00b
n00b


Joined: 19 Apr 2024
Posts: 33
Location: Gällivare

PostPosted: Mon Apr 29, 2024 5:32 pm    Post subject: Reply with quote

I wonder if it has to do with the GRUB bug "920708"

I am not sure how to install that two times??

/Borje
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1549
Location: South America

PostPosted: Mon Apr 29, 2024 6:42 pm    Post subject: Reply with quote

Chroot to your Gentoo instalation, and post the contents of /boot/grub/grub.cfg and the output of:

Code:
$ ls -F /boot

_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
borje2
n00b
n00b


Joined: 19 Apr 2024
Posts: 33
Location: Gällivare

PostPosted: Tue Apr 30, 2024 10:36 am    Post subject: Reply with quote

output from ls -F /boot

EFI/ System.map* System.old* arch_grub/ gentoo/ grub vmlinuz* vmlinuz.old*


output from /boot/grub/grub.cfg:


#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ] ; then
load_env
fi
if [ ”${next_entry}” ] ; then
set default=”${next_entry} ”
set next_entry=
save_env next_entry
set boot_once=true
else
set default=”0”
fi
if [ x”{feaature_menuentry_id}” = xy ]; then
menuentry_id_option=” --id”
else
menu_id_option=””
fi

export menuentry_id_option

if [ ”${prev_saved_entry}” ] ; then
set saved_entry=”${prev_saved_entry}”
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ x$feature_all_video_modules = xy ] ; then
insmod all_video
else
insmod efi_ggop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt3'
if [ x$feature_platform_search_hint = xy ] ; then
search --no-floppy –fs-uuid --set=root 1648b2af-5330-4afc-b0a3-5d5edde83507
fi

font=” /usr/share/grub/unicode.pf2”

fi

if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5

# Fallback normal timeout code in case the timeeout_style feature is
#unavailable.
Else
set timeout=5
fi

### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ ”$grub_platform” = ”efi” ] ; then
insmod bli
fi

### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ”$grub_platform” = ”efi” ] ; then
menuentry 'UEFI Firmware Settings' $menueentry_id_option 'uefi-firmware' {
fwsetup
}
fi

### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom meny entries. Simply type the
# menu entries you want to add after this comments. Be careful not to change
# the 'exit tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ] ; then
source ${config_directory}/custom.cfg
elif [ -z ”${config_directory}” -a -f $prefix/custom.cfg ] ; then
source $prefix/custom.cfg
fi

### END /etc/grub.d/41_custom ###
Back to top
View user's profile Send private message
borje2
n00b
n00b


Joined: 19 Apr 2024
Posts: 33
Location: Gällivare

PostPosted: Tue Apr 30, 2024 12:35 pm    Post subject: Reply with quote

Peter I use gentoo wiki quick installations and no error

I am using sys-kernel/gentoo-sources

diff from you quick installation

/Borje
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4248
Location: Bavaria

PostPosted: Tue Apr 30, 2024 12:50 pm    Post subject: Reply with quote

borje2 wrote:
I am using sys-kernel/gentoo-sources

Dont do this until you have a working system. gentoo-sources is used if you want configure your kernel manually (or if you use genkernel) ... If you really want do this, do it later (there is much to know about a manually kernel configuration). Please read my recommendations:
https://wiki.gentoo.org/wiki/User:Pietinger/New_at_Gentoo

So, go completely with the quick installation, especially with emerging sys-kernel/gentoo-kernel-bin.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
borje2
n00b
n00b


Joined: 19 Apr 2024
Posts: 33
Location: Gällivare

PostPosted: Tue Apr 30, 2024 5:13 pm    Post subject: Reply with quote

thank' s again Peter yes sys-kernel/gentoo-kernel-bin make it work
I think it it not possible to change in "bin"

I have to go back to kernel source later when I get everything working


Thank's again Peter for all your troubles


/Borje
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4248
Location: Bavaria

PostPosted: Tue Apr 30, 2024 7:00 pm    Post subject: Reply with quote

borje2 wrote:
Thank's again Peter for all your troubles

It was no trouble ... and You are very Welcome ! :D

If you want really do a manually kernel configuration I suggest to start reading here (with ALL linked articles also):
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration

Have fun with Gentoo ! 8)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
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