Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Grub not finding new kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 108

PostPosted: Wed Mar 13, 2019 4:50 am    Post subject: [Solved] Grub not finding new kernel Reply with quote

The new kernel isn't appearing in the boot menu even though I can see it in /boot. I have run genkernel --install and grub-mkconfig several times.

Last edited by Gooberpatrol66 on Sat Mar 16, 2019 2:31 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21762
Location: here

PostPosted: Wed Mar 13, 2019 6:02 am    Post subject: Reply with quote

You have mounted boot before make install? You can post the content of /boot?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Verdazil
n00b
n00b


Joined: 14 Feb 2019
Posts: 47
Location: One small country ...

PostPosted: Wed Mar 13, 2019 6:47 am    Post subject: Re: Grub not finding new kernel Reply with quote

Gooberpatrol66 wrote:
The new kernel isn't appearing in the boot menu even though I can see it in /boot. I have run genkernel --install and grub-mkconfig several times.

1. Make sure the boot partition is mounted.
Code:
# df -h

2. Sometimes you need to remount before writing the configuration file grub.cfg:
Code:
# mount -o remount,rw /sys/firmware/efi/efivars

_________________
GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7128
Location: almost Mile High in the USA

PostPosted: Wed Mar 13, 2019 7:11 am    Post subject: Reply with quote

Also, did grub-mkconfig find your new kernel?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1414

PostPosted: Wed Mar 13, 2019 2:35 pm    Post subject: Re: Grub not finding new kernel Reply with quote

Gooberpatrol66 wrote:
The new kernel isn't appearing in the boot menu even though I can see it in /boot. I have run genkernel --install and grub-mkconfig several times.


Gooberpatrol66,

Genkernel comes with a very well documented /etc/genkernel.conf.
In this config you can adjust everything you need.
For example:
Code:

# Should we install to $BOOTDIR?  Default is "no" because genkernel is used in
# catalyst and stage building.
INSTALL="yes"

Code:

# Mount BOOTDIR automatically if it isn't mounted?
MOUNTBOOT="yes"

Code:

# Make symlinks in BOOTDIR automatically?
#SYMLINK="no"
SYMLINK="yes"


You don`t need the extra command "grub-mkconfig". This can be done by genkernel alone if you have the right configuration.
Code:

# Add new kernel to grub?
BOOTLOADER="grub2"

Code:

# Set the boot directory, default is /boot
BOOTDIR="/boot"


And many other settings.
So read exactly the /etc/genkernel.conf and make the necessary settings.

greetings
Ma
_________________
Thank you for your attention, interest and support.
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 108

PostPosted: Thu Mar 14, 2019 12:59 am    Post subject: Reply with quote

fedeliallalinea wrote:
You have mounted boot before make install? You can post the content of /boot?


Code:
gentooserver /home/nathan # ls /boot
grub                                       kernel-genkernel-x86_64-4.14.83-gentoo      System.map-genkernel-x86_64-4.19.23-gentoo
initramfs-genkernel-x86_64-4.14.83-gentoo  kernel-genkernel-x86_64-4.19.23-gentoo
initramfs-genkernel-x86_64-4.19.23-gentoo  System.map-genkernel-x86_64-4.14.83-gentoo


Quote:

Also, did grub-mkconfig find your new kernel?


Code:

gentooserver /home/nathan # grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/kernel-genkernel-x86_64-4.19.23-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-4.19.23-gentoo
Found linux image: /boot/kernel-genkernel-x86_64-4.14.83-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-4.14.83-gentoo
done
Back to top
View user's profile Send private message
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 108

PostPosted: Thu Mar 14, 2019 1:07 am    Post subject: Reply with quote

Is there a way to look at the contents of the boot menu without rebooting? This is a remote machine and it's inconvenient to keep rebooting it.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7128
Location: almost Mile High in the USA

PostPosted: Thu Mar 14, 2019 3:28 pm    Post subject: Reply with quote

The stuff it prints out when running grub-mkconfig should be the options that it will present next boot. Of course you can just view the contents of the file.

Perhaps the new config file is being written to the wrong place?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 108

PostPosted: Fri Mar 15, 2019 9:02 am    Post subject: Reply with quote

This is bizarre. I can see menuentries for the new kernel in /boot/grub/grub.cfg, even though they aren't showing up in the boot menu.

Code:
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-a782a62a-ffde-49b1-a680-0afeb9cdab0b' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod btrfs
        set root='hd0,gpt3'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  a782a62a-ffde-49b1-a680-0afeb9cdab0b
        else
          search --no-floppy --fs-uuid --set=root a782a62a-ffde-49b1-a680-0afeb9cdab0b
        fi
        echo    'Loading Linux x86_64-4.19.23-gentoo ...'
        linux   /boot/kernel-genkernel-x86_64-4.19.23-gentoo root=UUID=a782a62a-ffde-49b1-a680-0afeb9cdab0b ro init=/usr/lib/systemd/systemd
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initramfs-genkernel-x86_64-4.19.23-gentoo
}


Code:
menuentry 'Gentoo GNU/Linux, with Linux x86_64-4.19.23-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.19.23-gentoo-advanced-a782a62a-ffde-49b1-a680-0afeb9cdab0b' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod btrfs
                set root='hd0,gpt3'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  a782a62a-ffde-49b1-a680-0afeb9cdab0b
                else
                  search --no-floppy --fs-uuid --set=root a782a62a-ffde-49b1-a680-0afeb9cdab0b
                fi
                echo    'Loading Linux x86_64-4.19.23-gentoo ...'
                linux   /boot/kernel-genkernel-x86_64-4.19.23-gentoo root=UUID=a782a62a-ffde-49b1-a680-0afeb9cdab0b ro init=/usr/lib/systemd/systemd
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initramfs-genkernel-x86_64-4.19.23-gentoo
        }
        menuentry 'Gentoo GNU/Linux, with Linux x86_64-4.19.23-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.19.23-gentoo-recovery-a782a62a-ffde-49b1-a680-0afeb9cdab0b' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod btrfs
                set root='hd0,gpt3'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  a782a62a-ffde-49b1-a680-0afeb9cdab0b
                else
                  search --no-floppy --fs-uuid --set=root a782a62a-ffde-49b1-a680-0afeb9cdab0b
                fi
                echo    'Loading Linux x86_64-4.19.23-gentoo ...'
                linux   /boot/kernel-genkernel-x86_64-4.19.23-gentoo root=UUID=a782a62a-ffde-49b1-a680-0afeb9cdab0b ro single init=/usr/lib/systemd/systemd
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initramfs-genkernel-x86_64-4.19.23-gentoo
        }
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7128
Location: almost Mile High in the USA

PostPosted: Fri Mar 15, 2019 2:13 pm    Post subject: Reply with quote

Ensure you're checking the right file. Make sure your boot partition is mounted and you're not looking at a phantom file.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 108

PostPosted: Sat Mar 16, 2019 2:31 am    Post subject: Reply with quote

Alright, so grub was booting into my old /boot partition, i guess cause it was a valid EFI partition. I wiped it and mounted it under the new /boot, ran grub-install again, and it works now. I thought it wouldn't matter because I have EFI disabled in the BIOS, but whatever.

Solved.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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