Como posso fazer o update-grub reconhecer o kernel linux-surface

Aug 18 2020

Eu tenho um Surface Pro 4. O kernel de superfície do linux ( github ) oferece melhor suporte de hardware do que os kernels padrão, mas, infelizmente, update-grubnão o reconhece.

Consigo inserir uma entrada /etc/grub.d/40_custom/, mas preciso fazer isso manualmente sempre que houver uma atualização do kernel.

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

menuentry 'Ubuntu (4.19.139-surface-lts)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        savedefault
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  cf93f3eb-59be-4eba-835b-03ac8f082424
        else
          search --no-floppy --fs-uuid --set=root cf93f3eb-59be-4eba-835b-03ac8f082424
        fi
        linux   /boot/vmlinuz-4.19.139-surface-lts root=UUID=cf93f3eb-59be-4eba-835b-03ac8f082424 ro  quiet splash $vt_handoff
        initrd  /boot/initrd.img-4.19.139-surface-lts
}
### END /etc/grub.d/40_custom ###

Como posso update-grubreconhecer os kernels da superfície do Linux automaticamente?

EDIT: Mais informações

Respostas

Sub-ZeroXXX Aug 20 2020 at 06:28

Adicionar como arquivo 06_custom em /etc/grub.d/06_custom Em / etc / default / grub Alterar GRUB_DEFAULT = 6 Padrão definido como 0 para inicializar 00_header 6 para corresponder a 06_custom
acho que é assim que os números funcionam para entradas de menu que posso ter perdido poucos passos :)

Este manual do Grub tem quase tudo que você precisa muito útil :)

https://www.gnu.org/software/grub/manual/grub/grub.html#Overview