Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GRUB-mkconfig fail solved
View unanswered posts
View posts from last 24 hours

 
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: 25
Location: Gällivare

PostPosted: Sat Apr 20, 2024 5:11 am    Post subject: GRUB-mkconfig fail solved Reply with quote

Please help

cannot config grub

fstab:

/dev/sda1 /boot/efi
/dev/sda2 /boot
/dev/sda3 swap
/dev/sda4 /

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=gentoo works

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

please HELP


Last edited by borje2 on Tue Apr 23, 2024 3:22 am; edited 1 time in total
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4193
Location: Bavaria

PostPosted: Sat Apr 20, 2024 10:38 am    Post subject: Reply with quote

borje2,

Welcome to Gentoo Forums !

You are using an old partition layout (this was used for a system using MBR). Today we have for an UEFI system only:

/dev/sda1 /efi
/dev/sda2 swap
/dev/sda3 /

Of course your layout can still be used. Please give us the output of "blkid", "lsblk", "fdisk -l", "mount" and - most important - the complete output after "grub-mkconfig -o /boot/grub/grub.cfg".

Maybe we need additionally a "ls -lR /boot" (we do not need the modules from grub and can therefore shorten the output) and the output of "efibootmgr" (if you dont have it install it with "emerge efibootmgr").
_________________
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: Sat Apr 20, 2024 11:22 am    Post subject: Reply with quote

I think /boot is not mounted and grub-mkconfig doesn't find /boot/grub directory... but some error message(s) is needed.
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4193
Location: Bavaria

PostPosted: Sun Apr 21, 2024 7:49 am    Post subject: Reply with quote

PO has contacted me via PM and want start with a new partition layout.
_________________
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: 25
Location: Gällivare

PostPosted: Mon Apr 22, 2024 5:10 am    Post subject: emerge --info Reply with quote

KiB Mem: 8066816 total, 7536788 free
KiB Swap 0 total, 0 free

Timestamp of repositary gentoo : Sat, 20 Apr 2024 00:45:00 +0000
Head commit of repository gentoo: d3cec83caf1478a2ac994ac2ca2d149553e61132
sh bash 5.1_p16-r6
id GNU id (Gentoo 2.41 p5) 2.41.0
app-misc/pax-utils: 1.3.7::gentoo
app-shell/bash: 5.1_p16-r6::gentoo
dev-build/autoconf: 2.71-r6::gentoo
dev-build/automake: 1.16.5-r2::gentoo
dev-build/cmake: 3.28.3::gentoo
dev-build/libtools 2.4.7-r4::gentoo
dev-build/make: 4.4.1-r1::gentoo
dev-build/meson: 1.3.2::gentoo
dev-lang/perl: 5.38.2-r2::gentoo
dev-lang/python:: 3.11.8_p1::gentoo, 3.12.3::gentoo
sys-apps/baselayout: 2.14-r2::gentoo
sys-aapps/openrc: 0.54::gentoo
sys-apps/sandbox 2.38::gentoo
sys-devel/binutils: 2.41-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc: 13.2.1_p20240210::gentoo
sys-devel/gcc-config: 2.11::gentoo
sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.38-r11::gentoo
Repositories:

gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
sync-rsync-verify-max-age:3

Binary Repositories:

gentoobinhost
priority:1
sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64

ACCEPT_KEYWORDS=”amd64”
ACCEPT_LICENSE=”@FREE @BINARY-REDISTRIBUTABLE”
CBUILD=”x86_64-pc-linux-gnu”
CFLAGS=” -02 -pipe”
CHOST=”x86_64-pc-linux-gnu”
CONFIG_PROTECT=”/etc/usr/sshare/gnupg/qualified.txt”
CONFIG_PROTECT_MASK=”/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d”
CXXFLAGS=” -02 -pipe”
DISTDIR=” /var/cache/distfiles”
ENV_UNSET=” CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIBPERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME”
FCFLAGS=” -02 -pipe”
FEATURES=” assume-digests binkg_docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr”
FFLAGS=” -02 -pipe”
GENTOO_MIRRORS=”http://distfiles.gentoo.org”
LANG=”sv_SE.UTF-8”
LDFLAGS=”-wl, -01 -wl, --as-needed -wl, -z,pack-relative-relocs”
LEX=”flex”
PKGDIR=”/var/cache/binpkga”
PORTAGE_CONFIGROOT=”/”
PORTAGE_RSYNC_OPTS=”--recursive –links –safe-links –safe-links –perms –times –omit-dir-times –compress –force –whole-file --delete –stats –human-readable –timeout=180 –exclude=/distfiles –excllude=/local –exclude=/packages –exclude=/ .git”
PORTAGE_TMPDIR=”/var/tmp”
SHELL=”/bin/bash”
USE=”acl alsa amd64 bzip2 cdr cet crypt dvd gdbm iconv ipv6 kde libtirpc multilib ncurses nls openmp pam pcre qt5 readline seccomp ssl test-rust unicode xattr zlib” ABI_X86=”64” ADA_TARGET=”gcc_12” APACHE”_MODULES=”authm_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cggid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias ” CALLIGRA_FEATURES=”karbon sheets words” COLLECTD_PLUGINS=”df interface irq load memory rrdtool swap syslog” CPU_FLAGS_X86=”mmx mmxext sse sse2” ELIBC=”glibc” GPSD_PROTOCOLS=”ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraqsuperstar2 tsip tripmate tnt ublox”GRUB_PLATFORMS=”efi-64” INPUT_DEVICES=”libinput” KERNEL=”linux” LCD_DEVICE=”bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text” LUA_SINGLE_TARGET=”lua5-1” LUA_TARGETS=”lua5-1” OFFICE_IMPLEMENTATION=”libreoffice” PHP_TARGETS=”php8-1” POSTGRES_TARGETS=”postgres15” PYTHON_SINGLE_TARGET=”python3_11” PYTHON_TARGETS=”python3_11” RUBY_TARGETS=”ruby31” VIDEO_CARDS=”amdgpu fbdev intel nouveau radeon radeonsi vesa dummy” XTABLES_ADDONS=”quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account”
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGECOMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Back to top
View user's profile Send private message
borje2
n00b
n00b


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

PostPosted: Mon Apr 22, 2024 11:49 am    Post subject: grub-install and config Reply with quote

I finally get grub to load
after new gentoo installation

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


Joined: 17 Oct 2006
Posts: 4193
Location: Bavaria

PostPosted: Mon Apr 22, 2024 12:03 pm    Post subject: Reply with quote

borje2,

I am happy to hear that. :D

If a user has solved a problem, it is always very welcome that we get the solution, because this could also help other users. ;-)

Your last information was:
Quote:
and grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=gentoo

no error

grub-mkconfig -o /efi/grub.cfg

no error

after system boot grub> comes up

I don't know what I shall input here?

I input ls and get (hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (hd1)

what input on grub> ??

This would say, that grub had a grub.cfg with no specification which kernel shall be loaded (Here we would have need a look into /boot/grub/grub.cfg) ... One possible reason could be that the installation of the kernel went wrong AND then there IS NO kernel which could have been found by grub-mkconfig.

Do not hesitate to write to us here in our forum if you have any problems.

Have fun with Gentoo ! 8)
_________________
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: 25
Location: Gällivare

PostPosted: Mon Apr 22, 2024 1:45 pm    Post subject: solution Reply with quote

I make 3 patitions
/dev/sda1 1g /boot vfat I make dir efi in boot
/dev/sda2 swap
/dev/sd3 / ext4

after grub installed

I type grub-install --target=x86-efi --efi-directory=/boot/efi --bootloader-id=gentoo

worked fine

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

worked fine

Startup after that!
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
Page 1 of 1

 
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