自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

簡(jiǎn)單介紹Fedora內(nèi)核編譯方法

系統(tǒng) Linux
本文章主要介紹一些Fedora內(nèi)核編譯方法,第一步:去官方下載最新的Fedora內(nèi)核源碼包、第二步:解壓源碼包、第三步:配置選項(xiàng)等……

本人很喜歡Fedora,在空余時(shí)間學(xué)習(xí)了Fedora,下面就這個(gè)問(wèn)題來(lái)詳細(xì)介紹下Fedora內(nèi)核編譯吧。

第一步:去官方下載最新的Fedora內(nèi)核源碼包

官方網(wǎng)址:www.kernel.org

當(dāng)前最新版本:2.6.31,下載網(wǎng)址:http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.tar.bz2

您可以使用 wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.tar.bz2 下載

第二步:解壓源碼包(這里有些人說(shuō)要將源碼解壓到/usr/src目錄下,其實(shí)是不正確的,你可以解壓到任何目錄)

cd ~wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.tar.bz2

tar -jxvf linux-2.6.31.tar.bz2

第三步:配置選項(xiàng)

cd linux-2.6.31
cp /boot/config-`uname -r` .config
make mrproper (刪除上次編譯產(chǎn)生的垃圾,初次編譯不需要)
make menuconfig (啟動(dòng)內(nèi)核選項(xiàng)配置界面)

說(shuō)明一下,make menuconfig會(huì)尋找linux-2.6.31目錄下的.config配置文件,如果找不到,則使用與CPU相關(guān)的config文件作為默認(rèn)的配置。當(dāng)然,我們也可以拷貝當(dāng)前系統(tǒng)的配置作為對(duì)照,如cp /boot/config-`uname -r` .config (.config是隱藏文件 ls -a查看)

注意:如果是同版本的內(nèi)核編譯,還需要備份下當(dāng)前模塊

cd /lib/modules

mv 2.6.31 2.6.31_old

指定內(nèi)核識(shí)別碼

vim Makefile

EXTRAVERSION = .custom-1 (第4行)

第四步(1):傳統(tǒng)方式編譯

make all (2.6以前版本需要手工運(yùn)行如下命令)
(
# make dep <==建立相依的屬性關(guān)系!
# make clean    <==將舊的資料去除掉!
# make bzImage     <==開(kāi)始編譯核心!這個(gè)核心是經(jīng)過(guò)壓縮的 (30分鐘左右)
# make modules <==開(kāi)始編譯模塊!這個(gè)動(dòng)作視您剛剛編譯的模塊數(shù)量!(1小時(shí)左右)
)

make modules_install (安裝模塊到/lib/modules/2.6.31),make install (系統(tǒng)將會(huì)把vmlinuz和System.map復(fù)制到/boot目錄下同時(shí)修改grub/boot/grub/menu.lst,2.6以前版本需要手動(dòng)拷貝vmlinuz和System.map)

第四步(2):RPM方式編譯,會(huì)產(chǎn)生RPM包,方便提供給別人使用make rpm,編譯完成之后,在~/rpmbuild /SRPMS/目錄發(fā)現(xiàn)一個(gè)新的src.rpm包, 比如.SRPMS/kernel-2.6.31.custom-1.src.rpm, 內(nèi)核rpm包位于~/rpmbuild/RPMS/i386/ (或RPMS/i586/, RPMS/i686/, 等. 看你的平臺(tái)類型). 比如.RPMS/i386/kernel-2.6.31.custom-1.i386.rpm. 可以看到內(nèi)核識(shí)別碼已添加到軟件包的名字中.

安裝新內(nèi)核

現(xiàn)在去新的rpm內(nèi)核包存在的目錄(基于你的平臺(tái)類型, 比如. ~/rpmbuild/RPMS/i386/)安裝rpm包,cd ~/rpmbuild/RPMS/i386

rpm -ivh kernel-2.6.31.custom-1.i386.rpm(現(xiàn)在你甚至能夠拷貝到其它的Fedora系統(tǒng), 通過(guò)上面的方式安裝. 你將不再需要編譯內(nèi)核.)

接下來(lái)我們?yōu)樾聝?nèi)核創(chuàng)建一個(gè)ramdisk, 否則系統(tǒng)將不能引導(dǎo)新內(nèi)核:

mkinitrd /boot/initrd-2.6.31.custom-1.img 2.6.31.custom-1

然后編輯/boot/grub/menu.lst文件, 看一下你系統(tǒng)上已經(jīng)存在(正在工作的)引導(dǎo)內(nèi)核信息, 拷貝其中的一個(gè)實(shí)例, 替換為你新的內(nèi)核和ramdisk:vim /boot/grub/menu.lst

比如, 我的menu.lst, 在我添加新的內(nèi)核信息前的情況:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.18-1.2798.fc6)
root (hd0,0)
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-1.2798.fc6.img

修改后的情況:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.18-custom-2.6.18.2)
root (hd0,0)
kernel /vmlinuz-2.6.18-custom-2.6.18.2 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-custom-2.6.18.2.img
title Fedora Core (2.6.31.custom-1)
root (hd0,0)
kernel /vmlinuz-2.6.31.custom-1 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.31.custom-1.img
(你可以通過(guò)下面命令發(fā)現(xiàn)正確的vmlinuz和initrd文件:ls -l /boot)

第五步:重啟系統(tǒng),在Grub引導(dǎo)菜單中,選擇linux-2.6.31.custom-1。

Reboot,重啟之后,大功告成,你的新Fedora內(nèi)核已經(jīng)安裝好了。

【編輯推薦】

  1. Linux mysql就用fedora的自動(dòng)安裝
  2. Fedora JDK給java.sh分配權(quán)限
  3. Fedora Core 5引導(dǎo)硬盤(pán)安裝啟動(dòng)
  4. Fedora yum包更新檢查常用指令及用處
  5. Fedora CVS服務(wù)器安裝配置和創(chuàng)建用戶組
責(zé)任編輯:志輝 來(lái)源: club.topsage.com
相關(guān)推薦

2009-12-24 17:06:35

編譯Fedora內(nèi)核

2009-12-07 09:57:06

Fedora/內(nèi)核編譯

2009-12-23 09:34:51

Fedora VMne

2009-12-23 19:13:40

Fedora Linu

2009-12-18 13:43:22

2010-03-17 17:13:55

Fedora 常用軟件

2010-03-17 17:16:46

Fedora 常用軟件

2010-03-17 17:07:55

fedora 常用軟件

2009-12-23 16:01:28

Fedora 8 gc

2009-12-21 17:45:26

Fedora Core

2010-03-17 15:31:49

2009-12-18 15:54:44

Fedora proc

2009-12-25 10:16:13

Fedora10 NF

2009-12-28 10:29:34

Fedora 11安裝

2010-04-20 10:12:05

2010-03-12 11:21:12

Fedora 10 A

2010-01-11 14:39:49

Fedora 8飛信安

2009-12-23 15:08:38

Fedora gcc編

2009-08-13 17:36:54

編譯C#代碼

2021-05-26 07:53:58

Linux運(yùn)維Linux系統(tǒng)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)