# [Solved] Grub-mkconfig does not pick up new kernel

## ian.au

So today I went to upgrade my kernel from last-nights update - after building .

```
re3310 linux # make install

sh ./arch/x86/boot/install.sh 4.4.21-gentoo arch/x86/boot/bzImage \

System.map "/boot"
```

```
re3310 linux # ls /boot

config-4.1.12-gentoo config-4.4.21-gentoo.old grub.grub.cfg System.map-4.1.15-gentoo-r1 System.map-4.4.6-gentoo vmlinuz-4.4.21-gentoo

config-4.1.15-gentoo-r1 config-4.4.6-gentoo lost+found System.map-4.4.21-gentoo vmlinuz-4.1.12-gentoo vmlinuz-4.4.21-gentoo.old

config-4.4.21-gentoo grub System.map-4.1.12-gentoo System.map-4.4.21-gentoo.old vmlinuz-4.1.15-gentoo-r1 vmlinuz-4.4.6-gentoo
```

```
re3310 linux # grub2-mkconfig -o /boot/grub.grub.cfg

Generating grub configuration file ...

Found linux image: /boot/vmlinuz-4.4.21-gentoo

Found linux image: /boot/vmlinuz-4.4.21-gentoo.old

Found linux image: /boot/vmlinuz-4.4.6-gentoo

Found linux image: /boot/vmlinuz-4.1.15-gentoo-r1

Found linux image: /boot/vmlinuz-4.1.12-gentoo

done
```

And all this looks okay, so I go ahead to finalise and reboot - boots me back to 4.4.6?

So I have a quick look in grub.cfg and it doesn't appear the changes have been written?

```

re3310 linux # grep gentoo /boot/grub/grub.cfg

menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-39dfd0eb-069e-462b-8a93-e98b1e7f2637' {

echo   'Loading Linux 4.4.6-gentoo ...'

linux   /vmlinuz-4.4.6-gentoo root=/dev/sda6 ro init=/usr/lib/systemd/systemd 

menuentry 'Gentoo GNU/Linux, with Linux 4.4.6-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.6-gentoo-advanced-39dfd0eb-069e-462b-8a93-e98b1e7f2637' {

echo   'Loading Linux 4.4.6-gentoo ...'

linux   /vmlinuz-4.4.6-gentoo root=/dev/sda6 ro init=/usr/lib/systemd/systemd 

menuentry 'Gentoo GNU/Linux, with Linux 4.4.6-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.6-gentoo-recovery-39dfd0eb-069e-462b-8a93-e98b1e7f2637' {

echo   'Loading Linux 4.4.6-gentoo ...'

linux   /vmlinuz-4.4.6-gentoo root=/dev/sda6 ro single init=/usr/lib/systemd/systemd

menuentry 'Gentoo GNU/Linux, with Linux 4.1.15-gentoo-r1' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.1.15-gentoo-r1-advanced-39dfd0eb-069e-462b-8a93-e98b1e7f2637' {

echo   'Loading Linux 4.1.15-gentoo-r1 ...'

linux   /vmlinuz-4.1.15-gentoo-r1 root=/dev/sda6 ro init=/usr/lib/systemd/systemd 

menuentry 'Gentoo GNU/Linux, with Linux 4.1.15-gentoo-r1 (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.1.15-gentoo-r1-recovery-39dfd0eb-069e-462b-8a93-e98b1e7f2637' {

echo   'Loading Linux 4.1.15-gentoo-r1 ...'

linux   /vmlinuz-4.1.15-gentoo-r1 root=/dev/sda6 ro single init=/usr/lib/systemd/systemd

menuentry 'Gentoo GNU/Linux, with Linux 4.1.12-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.1.12-gentoo-advanced-39dfd0eb-069e-462b-8a93-e98b1e7f2637' {

echo   'Loading Linux 4.1.12-gentoo ...'

linux   /vmlinuz-4.1.12-gentoo root=/dev/sda6 ro init=/usr/lib/systemd/systemd 

menuentry 'Gentoo GNU/Linux, with Linux 4.1.12-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.1.12-gentoo-recovery-39dfd0eb-069e-462b-8a93-e98b1e7f2637' {

echo   'Loading Linux 4.1.12-gentoo ...'

linux   /vmlinuz-4.1.12-gentoo root=/dev/sda6 ro single init=/usr/lib/systemd/systemd

```

I recall there was a change to the multislot default for grub a few weeks ago, I opted to add the multislot flag on this machine - I wonder if this is the problem, so I kill the multislot flag on grub2 and rebuild grub2, rebuild the kernel and try again, this time using the 

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

Same result. Anybody else seeing this sort of behaviour or have a tip on what is happening here?

ThanksLast edited by ian.au on Wed Oct 05, 2016 11:03 pm; edited 1 time in total

----------

## eccerr0r

I see you using /boot/grub.grub.cfg and /boot/grub/grub.cfg - doublecheck you're using the right filename (should be the latter - change the first dot to a slash)... at least this seems to be the most obvious reason for the behavior you're seeing?

----------

## ian.au

 *eccerr0r wrote:*   

> I see you using /boot/grub.grub.cfg and /boot/grub/grub.cfg - doublecheck you're using the right filename (should be the latter - change the first dot to a slash)... at least this seems to be the most obvious reason for the behavior you're seeing?

 

Thanks eccerr0r dunno how I missed that.

----------

