如何在Google计算引擎实例上安装自定义内核? [英] How do I install a custom kernel on a google compute engine instance?
问题描述
我想在Google Compute Engine实例上安装自定义内核映像.我有一个实例运行:
I would like to install a custom kernel image on a Google Compute Engine instance. I have an instance running with:
foo@instance-1:/boot/efi$ uname -a
Linux instance-1 4.10.0-22-generic #24-Ubuntu SMP Mon May 22 17:43:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
我已经构建并安装了我的内核映像:
And I've built and installed my kernel image:
sudo dpkg -i linux-image-4.10.0-rc8.10.0-rc8_amd64.deb
它显示在grub配置文件中,我将默认的grub菜单项设置为正确的数字,然后运行
It shows up in the grub configuration file, I've set the default grub menu item to correct number, and I've run
sudo update-grub
但是,当我重新启动时,我得到的是与之相同的内核.
Yet, when I reboot, I get the same kernel I started with.
关于此的Google文档似乎不存在.有一个地方建议我可能必须在外部创建映像,安装内核并导入它.但是,我将需要做很多事情,因此,我宁愿以老式的方式安装新内核.
Google documentation on this seems to be non-existent. There is one spot that suggests I might have to create the image externally, install the kernel, and import it. However, I will need to do this a lot, so I'd rather just install new kernels the old fashioned way.
推荐答案
原来,在Google的Ubuntu原始映像中,有一个grub配置文件:
Turns out that in Google's stock Ubuntu image, there's a grub config file:
/etc/default/grub.d/50-cloudimg-settings.cfg
会覆盖
/etc/default/grub
编辑第一个文件即可正常工作.
Editing the first file got everything working.
这篇关于如何在Google计算引擎实例上安装自定义内核?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!