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

Fedora下內(nèi)核編譯

系統(tǒng) Linux
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)核源碼包

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

當(dāng)前最新版本:2.6.31,下載網(wǎng)址:linux/kernel/v2.6/linux-2.6.31.tar.bz2">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 下載

第二步:解壓源碼包(這里有些人說要將源碼解壓到/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)配置界面)

說明一下,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     <==開始編譯核心!這個(gè)核心是經(jīng)過壓縮的 (30分鐘左右)

# make modules <==開始編譯模塊!這個(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), 通過上面的方式安裝. 你將不再需要編譯內(nè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

(你可以通過下面命令發(fā)現(xiàn)正確的vmlinuz和initrd文件:ls -l /boot)

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

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

【編輯推薦】

  1. Fedora12發(fā)布 顛覆的網(wǎng)絡(luò)功能
  2. 史上最強(qiáng)Fedora10安裝與啟動(dòng)教程
  3. Fedora 12 Beta 發(fā)布
責(zé)任編輯:趙寧寧 來源: chinaitlab
相關(guān)推薦

2010-03-12 10:20:19

Fedora內(nèi)核

2009-12-24 17:06:35

編譯Fedora內(nèi)核

2010-01-11 10:15:09

FedoraFedora 12Mplayer

2010-02-02 15:41:00

Linux內(nèi)核

2009-12-21 11:16:56

Fedora內(nèi)核源碼

2010-02-02 15:13:42

Linux ARM

2010-02-02 17:57:47

Linux PPStr

2013-05-10 13:27:55

FedoraUbuntu

2009-12-21 13:46:40

Fedora 8內(nèi)核

2010-02-24 15:32:05

Fedora Core

2020-10-15 11:18:13

Linux內(nèi)核虛擬機(jī)

2011-03-21 09:17:06

NagiosFedora

2009-12-23 16:01:28

Fedora 8 gc

2009-12-28 08:57:22

Fedora操作系統(tǒng)

2010-02-24 16:49:24

Fedora SkyE

2017-03-27 18:05:49

Linux內(nèi)核編譯與開發(fā)

2010-02-22 16:38:34

CentOS yum內(nèi)

2009-12-25 10:16:13

Fedora10 NF

2010-03-02 09:59:03

Fedora Make

2010-04-12 11:19:47

編譯內(nèi)核模塊
點(diǎn)贊
收藏

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