• yam天空
  • 天空部落
  • 新聞
  • 風林火山
  • 登入 註冊 網誌隨便逛
  • 加入天空部落
  • 挺客家得大獎

網誌 相簿 影音 PK吧! Honda嬉遊趣
即時新聞 影音新聞 新聞專輯 政治新聞 財經新聞 娛樂新聞 運動新聞 兩岸新聞 科技新聞
進入官網 遊戲資料 奪寶好康
管理介面 發表網誌 發表日記 上傳相片 上傳影音 管理留言
推薦這個部落格: 20

負けないで!

うれしいこと 悲しいことも 全部まるめて

團長の日常 |火星文?! |自High... |相簿 |好友 |留言板
GNU GLOBAL | 主頁 | VoIP Lab 3 - Trixbox & PSTN gateway
April 20, 2008
Debian+MPLS (Kernel 2.6)以文找文
allanh 在天空部落發表於19:46:02 | 未分類
鼓勵此網誌:0 

http://www.howtoforge.com/howto_linux_kernel_2.6_compile_debian

Fedora core 6在rebuild時一直出問題..改用debian就ok了..以下為我的rebuild 過程

1. apt-get install kernel-package ncurses-dev fakeroot wget bzip2
# 這跟FC6的yum很類似..可以自動解決相依性問題
=================================================
這些套件可以先安裝..之後要用來測試用的工具
apt-get install bridge-utils ethtool hping2 tcpdump ethereal bmon
=================================================

2. cd /usr/src
# 通常自己抓的套件都會放這..比較好整理

3. wget http://ftp.cs.pu.edu.tw/pub/kernel/linux/kernel/v2.6/linux-2.6.15.1.tar.bz2
# mpls 需要 2.6.15.1
4. wget http://switch.dl.sourceforge.net/sourceforge/mpls-linux/mpls-linux-1.950.tar.bz2
5. tar jxf mpls-linux-1.950.tar.bz2
6. tar xjf linux-2.6.15.1.tar.bz2
7. cd linux-2.6.15.1/
8. patch -p1 < /usr/src/mpls-linux-1.950/patches/linux-kernel.diff
9. make menuconfig
=====先複製安裝成功的設定檔比較保險========
cp /boot/config-2.6.18-6-686 .
=====================================
# 先讀取穩定的設定檔
Load config -> config-2.6.18-6-686

In Networking Options the following items will be compiled in kernel [Networking Options Screenshot]:

< *> Multiprotocol Label Switching
< *> MPLS: Virtual tunnel interface
< *> 802.1d Ethernet Bridging
< *> Bridge: MPLS support

In Network Packet Filtering (replaces ipchains), IP: Netfilter configuration will be selected

In IP: Netfilter configuration menu the following minimum options will be selected [IP Netfilter Screenshot]:

< *> Packet Filtering
< *> Packet Mangling
< *> MPLS target support
< *> DSCP target support

In Network Packet Filering (replaces ipchains) select Bridge: Netfilter configuration

In Bridge: Netfilter configuration menu the following minimum options will be selected[Bridge Netfilter Screenshot]:

< *> Ethernet Bridge tables (ebtables) support
< *> ebt: broute table support
< *> ebt: filter table support
< *> ebt: nat table support
< *> ebt: 802.3 filter support
< *> ebt: MPLS target support

In Networking Options select QoS and fair queueing

From the submenu, select all options either compiled into the kernel or as modules [QoS Screenshot].

Compile and install the new kernel.

10. make-kpkg clean
11. fakeroot make-kpkg --revision=custom.1.0 kernel_image
# 制作image檔

12. cd ..
13. apt-get update
14. apt-get install module-init-tools initrd-tools procps
# 上面兩個指令的目的是為了rebuild kernel所需的套件

15. dpkg -i linux-image-2.6.15.1_custom.1.0_i386.deb
# 安裝所編譯的kernel, 並自動更新開機選單(ex. lilo或grub)

16. cd /boot/
17. mkinitrd -o /boot/initrd.img-2.6.15.1 2.6.15.1
# 制作新kernel的ramdisk

18. vi /boot/grub/menu.lst
# 加上initrd /boot/initrd.img-2.6.15.1這行

title Debian GNU/Linux, kernel 2.6.15.1
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.1 root=/dev/sda1 ro
initrd /boot/initrd.img-2.6.15.1
savedefault

19. cd /usr/src

20. wget http://switch.dl.sourceforge.net/sourceforge/mpls-linux/iptables-1.3.0-2_mpls_1.950d.i386.rpm
21. wget http://switch.dl.sourceforge.net/sourceforge/mpls-linux/iproute-2.6.11-1_mpls_1.950d.i386.rpm
22. wget http://switch.dl.sourceforge.net/sourceforge/mpls-linux/ebtables-2.0.6-7_mpls_1.950d.i386.rpm
# 以上三個套件都要下載

=======若沒有安裝alien套件請安裝=======
22.5 apt-get install alien
==========================

23. alien iproute-2.6.11-1_mpls_1.950d.i386.rpm
24. alien --scripts iptables-1.3.0-2_mpls_1.950d.i386.rpm
25. alien --scripts ebtables-2.0.6-7_mpls_1.950d.i386.rpm
26. dpkg -i iproute_2.6.11-2_i386.deb
27. cp /bin/true /sbin/chkconfig
28. dpkg -i iptables_1.3.0-3_i386.deb
29. dpkg -i ebtables_2.0.6-8_i386.deb

30. shutdown -r now
# 重新開機

31.dmesg |grep MPLS
# 若成功進入debian大功告成!!
留言 (0) | 引用 (0) | 人氣 () | 轉寄
GNU GLOBAL | 主頁 | VoIP Lab 3 - Trixbox & PSTN gateway
引用 (你可以針對此文寫一篇屬於自己的blog/想法,並給作者一個通告)
引用
留言 (0筆) (登入後, 即可開始發表留言)
系統公告
個人檔案
個人圖檔
ID:allanh
暱稱:ンアハ
地區:臺中縣
  • 訂閱 |
    • 我要訂閱此部落格的
    • 日記
    • 網誌
    • 相簿
  • 好友 |
    • 好友功能
    • 觀看好友列表
    • 觀看人緣列表
  • 人氣 |
  • 簡介 

文章分類
  • PC-GAME (1)
    • 同人遊戲 (2)
  • 日記 (2)
    • 文 (2)
    • 研究生曰誌 (21)
  • 動漫 (2)
    • 新番 (1)
    • 2006最萌 (1)
  • 未分類 (18)
allanh的最近文章發表
  • NetBSD pkgsrc
  • Linux...
  • GNU GLOBAL
  • Debian+MPLS...
  • VoIP Lab 3...
allanh的最新的回應
  • myname:
    怎么才能让金闪闪当se...
  • 20304050a:
    忘記說了 ...
  • 20304050a:
    一擊必殺心得...
  • 路人:
    我是這兩天才玩的~~...
  • Snner:
    想請問一下 ...
我のblog
  • Kiraの画像掲示板
好時光貼曆
我の好友
  • 兩卷書
  • 依仁的blog
  • 隼哥的pchome相簿
  • 演富的blog
  • *~風兒ㄟ自由翱翔空間~*
  • 萬年王老五的MSN空間
  • 一刀桑的無名相簿
  • 仙~*之奇幻心境
  • 明勳的msn blog
我の專案作品
  • 修繕管理系統
  • 數位學習館v.1.0
  • 台灣生態學會
  • ~這個醜與美的世界~
  • 數位學習館 v2.0
  • 資訊傳播工程學系
  • 視聽中心
  • 靜宜大學
  • 生命之光---趙春翔紀念展
  • VMWare教學網站
  • -case 外包網
動漫相關
  • スクールランブルスレ@2ch、分校
  • 魔法先生ネギま!@2ch
  • 火鳳kuso
Type-moon
  • TYPE-MOONの画像掲示板
人氣指數
當日人次:
累積人次:
我推薦誰
誰推薦我
誰來我家
自由欄位
RSS 訂閱
RSS2
ATOM
贊助商
其它資訊
本部落所刊登之內容,皆由作者個人所提供,不代表 yam 天空 本身立場。
POWERED BY
POWERED BY 天空部落
會員登入│免費註冊