特殊:Badtitle/NS100:Forum/software/CustomKernel:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Wikibot留言 | 贡献
新页面: {{From|https://help.ubuntu.com/community/forum/software/CustomKernel}} {{Languages|UbuntuHelp:forum/software/CustomKernel}} You may grab the latest kernel source from Linus at kernel.org ...
 
Wikibot留言 | 贡献
无编辑摘要
 
(未显示同一用户的5个中间版本)
第2行: 第2行:
{{Languages|UbuntuHelp:forum/software/CustomKernel}}
{{Languages|UbuntuHelp:forum/software/CustomKernel}}
You may grab the latest kernel source from Linus at kernel.org and compile your own kernel.
You may grab the latest kernel source from Linus at kernel.org and compile your own kernel.
It is easier to just make a package for your kernel image.
It is easier to just make a package for your kernel image.
Install fakeroot and kernel-package. Also, install linux-tree.  
Install fakeroot and kernel-package. Also, install linux-tree.  
Linux-tree is the linux source, packaged by Ubuntu.  It is a better starting point because it contains a lot of patches, bugfixes and configuration you need for ubuntu. You can make menuconfig and remove the options you do not need.
Linux-tree is the linux source, packaged by Ubuntu.  It is a better starting point because it contains a lot of patches, bugfixes and configuration you need for ubuntu. You can make menuconfig and remove the options you do not need.
cd to the top of the linux tree and do
cd to the top of the linux tree and do
<pre><nowiki>
<pre><nowiki>
fakeroot make-kpkg --revision=1 --append-to-version=MyCustomKernel --initrd kernel_image kernel_headers
fakeroot make-kpkg --revision=1 --append-to-version=MyCustomKernel --initrd kernel_image kernel_headers
</nowiki></pre>
</nowiki></pre>
That will compile and build a kernel-image package that you can install with dpkg -i.  
That will compile and build a kernel-image package that you can install with dpkg -i.  
<pre><nowiki>
<pre><nowiki>
sudo dpkg -i ../kernel-image-2.6.5.10MyCustomKernel_1
sudo dpkg -i ../kernel-image-2.6.5.10MyCustomKernel_1
</nowiki></pre>
</nowiki></pre>
 
It is easier to install and remove that way. It also guarantees that your system is not left unbootable (by not screwing up your BootLoader and leaving you other options).
It is easier to install and remove that way. It also guarantees that your system is not left unbootable (by not screwing up your bootloader and leaving you other options)
=== See also ===
* https://help.ubuntu.com/community/Kernel/Compile
* [[UbuntuHelp:Fakeroot|Fakeroot]]
* http://packages.debian.org/fakeroot
* http://freshmeat.net/projects/fakeroot
* http://www.linuxpackages.net/pkg_details.php?id=11426
* http://sourceforge.net/projects/fakerootng
* http://www.pinkdragon.net/doc_lib/contents/en/linux_man/fakeroot.1.html
----
----
[[category:CategoryKernel]] [[category:CategoryDocumentation]] [[category:CategoryForum]]
[[category:CategoryKernel]] [[category:CategoryForum]]


[[category:UbuntuHelp]]
[[category:UbuntuHelp]]

2009年5月12日 (二) 16:52的最新版本

{{#ifexist: :Forum/software/CustomKernel/zh | | {{#ifexist: Forum/software/CustomKernel/zh | | {{#ifeq: {{#titleparts:Forum/software/CustomKernel|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Forum/software/CustomKernel|1|-1|}} | zh | | }}

You may grab the latest kernel source from Linus at kernel.org and compile your own kernel. It is easier to just make a package for your kernel image. Install fakeroot and kernel-package. Also, install linux-tree. Linux-tree is the linux source, packaged by Ubuntu. It is a better starting point because it contains a lot of patches, bugfixes and configuration you need for ubuntu. You can make menuconfig and remove the options you do not need. cd to the top of the linux tree and do

fakeroot make-kpkg --revision=1 --append-to-version=MyCustomKernel --initrd kernel_image kernel_headers

That will compile and build a kernel-image package that you can install with dpkg -i.

sudo dpkg -i ../kernel-image-2.6.5.10MyCustomKernel_1

It is easier to install and remove that way. It also guarantees that your system is not left unbootable (by not screwing up your BootLoader and leaving you other options).

See also