<font size=2 face="sans-serif">Hi,</font>
<br>
<br>
<br><font size=2 face="sans-serif">The kernel installer in Ubuntu 12.04
to 14.04 often puts grub files and kernel (vmlinux/z, initrd.img) files
on a separate boot partition, mounted under /boot.</font>
<br><font size=2 face="sans-serif">Subsequent updated kernels are put into
the same place by the apt-get dist-upgrade install process.</font>
<br><font size=2 face="sans-serif">The actual kernel filename is in the
form vmlinuz-3.8.0-29-generic but will change with time.</font>
<br>
<br><font size=2 face="sans-serif">When this is the case the conventional
symlinks /initrd.img and /vmlinuz are meaningless as grub can't see them.
Grub sees /boot mounted as /.</font>
<br>
<br><font size=2 face="sans-serif">When adding custom boot menu entries
in /etc/grub.d we don't know the latest running kernel version without
elaborate scripting to 'discover' the possibilities.</font>
<br><font size=2 face="sans-serif">This means any simple custom menu additions
require regular updates or they will break.</font>
<br>
<br><font size=2 face="sans-serif">If the installer were to simply add
the symlinks /boot/vmlinuz and /boot/inirtd.img, pointing to the latest
kernel things would be much simpler.</font>
<br><font size=2 face="sans-serif">It already adds symlinks in /, so placing
them in /boot is trivial.</font>
<br>
<br><font size=2 face="sans-serif">e.g.</font>
<br><font size=2 face="sans-serif">Now custom grub2 menu entries can look
like</font>
<br>
<br><font size=2 face="sans-serif">#!/bin/sh</font>
<br><font size=2 face="sans-serif">exec tail -n +3 $0</font>
<br><font size=2 face="sans-serif"># This file provides an easy way to
add custom menu entries. Simply type the</font>
<br><font size=2 face="sans-serif"># menu entries you want to add after
this comment. Be careful not to change</font>
<br><font size=2 face="sans-serif"># the 'exec tail' line above.</font>
<br><font size=2 face="sans-serif">menuentry 'Ubuntu, latest kernel - r/w
root' --class ubuntu --class gnu-linux --class gnu --class os {</font>
<br><font size=2 face="sans-serif"> recordfail</font>
<br><font size=2 face="sans-serif"> gfxmode
$linux_gfx_mode</font>
<br><font size=2 face="sans-serif"> insmod gzio</font>
<br><font size=2 face="sans-serif"> insmod part_msdos</font>
<br><font size=2 face="sans-serif"> insmod ext2</font>
<br><font size=2 face="sans-serif"> set root='(hd0,msdos1)'</font>
<br><font size=2 face="sans-serif"> search --no-floppy
--fs-uuid --set=root ed0b95eb-abe9-484a-a35f-38f144ac297d</font>
<br><font size=2 face="sans-serif"> linux
/vmlinuz root=/dev/mapper/server-vg-root ro</font>
<br><font size=2 face="sans-serif"> initrd /initrd.img</font>
<br><font size=2 face="sans-serif">}</font>
<br>
<br><font size=2 face="sans-serif">And it would not matter if boot is mounted
on a separate partition or not.</font>
<br>
<br><font size=2 face="sans-serif">I am considering adding this as a bug/enhancement,
any reasons why this would not be possible?</font>
<br>
<br><font size=2 face="Segoe UI Semibold"><b>Kind Regards,</b></font>
<br><font size=2 face="Segoe UI Semibold"><b>Jason Morgan</b></font>
<br><font size=2 face="Segoe UI Semibold"><b>Aveillant Ltd, Cambridge,
UK</b></font>
<br>