在EC2上编译内核的Ubuntu(没有错误,但重新启动后没有图像和不变)重新启动、内核、图像、错误

2023-09-11 23:41:16 作者:以女王的姿势俯视全世界

我需要从250HZ更新内核计时器我的Ubuntu的清醒(10.04)服务器上EC2(与EBS)到1000Hz,改善VoIP的通话质量。

从我读过,做到这一点的方法是下载内核源码code,对其进行配置,然后再进行安装。

我已经发现了几个像样的教程是相当具体到我的设置,其中最好的是:

https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel https://help.ubuntu.com/community/Kernel/Compile 的http://blog.avirtualhome.com/2010/05/05/how-to-compile-a-ubuntu-lucid-kernel/ http://crashcourse.ca/introduction-linux-kernel-programming/intermission-building-new-ubuntu-1004-kernel-free-lesson

这是导致我下面的命令集,所有运行得很好,使得.deb文件进行,没有明显的错误。但是当我重新启动服务器的定时器的频率尚未更新。

  sudo易于得到集结出发的linux-image  -  $(使用uname -r)
sudo易于得到集结出发的Linux
命令和apt-get安装的fakeroot建立必要的
命令和apt-get安装崩溃的kexec-工具makedumpfile内核楔
命令和apt-get安装好libncurses5好libncurses5-dev的
命令和apt-get安装libelf的,开发的binutils把AsciiDoc-dev的内核包

CD / usr / src目录
sudo易于得到源代码的linux-image  -  $(使用uname -r)

CD的linux *
须藤的make menuconfig
#处理器类型和特点 - >计时器频率 - >更改为1000HZ  -​​ >退出 - >退出 - >是(保存)

fakeroot的是Debian /规则干净
fakeroot的是Debian /规则二进制头
fakeroot的是Debian /规则二进制INDEP#这个做标题,文档和源代码

创建#check DEB 2-3文件
光盘 ..
LS * .deb文件

须藤dpkg -i来的Linux  -  * DEB
#reboot
 

修改

花了一些时间与jjohansen在IRC#Ubuntu的内核,并能够找到我的错误在他的帮助 - 看起来像我应该做的配置步骤的清洁和建设之间。此外,他还建议始终使用来自混帐而不是包的来源,所以这些都是新的命令做了什么,我有中等以上:

  CD / usr / src目录
#这是700MB,因此需要一段时间才能下载和安装
混帐混帐克隆://kernel.ubuntu.com/ubuntu/ubuntu-lucid.git
CD Ubuntu的*
git的结帐--track -b EC2产地/ EC2

fakeroot的是Debian /规则干净
fakeroot的是Debian /规则editconfigs
fakeroot的是Debian /规则二进制
约40分钟#Takes
 

解决方案

约翰·约翰森(内核黑客在规范)认为,你应该能够建立和使用Ubuntu的一个EC2实例上运行自己的内核。

Ubuntu 18.04.3整合增强版Livepatch功能 更轻松安装Linux补丁

请参阅jjohansen的笔记中我曾在2009年提交回本1000Hz的EC2内核请求:

https://bugs.launchpad.net/ubuntu-on-ec2 / +的bug / 365233

您将要确保你开始与使用pvgrub最近Ubuntu的AMI。

I need to update the kernel timer on my Ubuntu Lucid (10.04) server on EC2 (with EBS) from 250HZ to 1000HZ, to improve voip call quality.

From what I've read, the way to do that is to download the kernel source code, configure it, then install it.

I've found several decent tutorials that are fairly specific to my setup, the best of which are:

https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel https://help.ubuntu.com/community/Kernel/Compile http://blog.avirtualhome.com/2010/05/05/how-to-compile-a-ubuntu-lucid-kernel/ http://crashcourse.ca/introduction-linux-kernel-programming/intermission-building-new-ubuntu-1004-kernel-free-lesson

That's led to me to the following sets of commands, which all run nicely, making the .deb files with no obvious errors. But then when I restart the server the timer frequency hasn't been updated.

sudo apt-get build-dep linux-image-$(uname -r)
sudo apt-get build-dep linux
sudo apt-get install fakeroot build-essential
sudo apt-get install crash kexec-tools makedumpfile kernel-wedge
sudo apt-get install libncurses5 libncurses5-dev
sudo apt-get install libelf-dev asciidoc binutils-dev kernel-package

cd /usr/src
sudo apt-get source linux-image-$(uname -r)

cd linux-*
sudo make menuconfig
# Processor type and features -> Timer frequency -> change to 1000HZ -> Exit -> Exit -> Yes (Save)

fakeroot debian/rules clean
fakeroot debian/rules binary-headers
fakeroot debian/rules binary-indep   #This does the headers, docs, and source

#check deb 2-3 files were created
cd ..
ls *.deb

sudo dpkg -i linux-*.deb
#reboot

EDIT

Spent some time with jjohansen on irc #ubuntu-kernel, and was able to find my mistake with his help - looks like I should have done the configuration step in between the clean and build. Also, he recommended to always use the source from git rather than the package, so these are the new commands to do in the middle of what I had above:

cd /usr/src
# This is 700mb so it takes a while to download and set up
git clone git://kernel.ubuntu.com/ubuntu/ubuntu-lucid.git
cd ubuntu*
git checkout --track -b ec2 origin/ec2

fakeroot debian/rules clean
fakeroot debian/rules editconfigs
fakeroot debian/rules binary
#Takes about 40min

解决方案

John Johansen (kernel hacker at Canonical) believes that you should be able to build and run your own kernel on an EC2 instance with Ubuntu.

See jjohansen's notes in this 1000Hz EC2 kernel request I had submitted back in 2009:

https://bugs.launchpad.net/ubuntu-on-ec2/+bug/365233

You will want to make sure that you are starting with a recent Ubuntu AMI that uses pvgrub.