1 / 13

下載 ubuntu-6.10

下載 ubuntu-6.10. http://ftp.isu.edu.tw/pub/Linux/Ubuntu/releases/edgy/ 到上列網址下載 ubuntu-6.10-desktop-i386.iso. 下載 kernel 與相關工具. 打開附屬應用程式中的終端機 sudo apt-get install linux-source-2.6.17 sudo apt-get install build-essential sudo apt-get install libncurses5-dev

misty
Télécharger la présentation

下載 ubuntu-6.10

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 下載ubuntu-6.10 • http://ftp.isu.edu.tw/pub/Linux/Ubuntu/releases/edgy/ • 到上列網址下載ubuntu-6.10-desktop-i386.iso

  2. 下載kernel與相關工具 • 打開附屬應用程式中的終端機 • sudo apt-get install linux-source-2.6.17 • sudo apt-get install build-essential • sudo apt-get install libncurses5-dev • sudo apt-get install kernel-package • sudo apt-get install bin86 • sudo apt-get install libqt3-headers • sudo apt-get install libqt3-mt-dev

  3. 核心的編譯與安裝 • cd /usr/src • tar –jxvf linux-source-2.6.17.tar.bz2 • cd linux-source-2.6.17 • sudo make mrproper • 將以前曾經進行過的 *.o 檔案刪除掉,這樣比較不會產生新舊版本的誤差 • sudo cp /boot/config-2.6.17-10-generic .config • 將主機原本的設定檔copy過來使用 • sudo make menuconfig (這兩行可以改成sudo make oldconfig) • 選Load an Alternate Configuration File 選.config • sudo make bzImage • 製作出核心檔案!這個重要!過程很長啊!而且那個是大寫的 I 喔! • (製作核心image 名字可以自訂) • sudo make modules • 製作出模組相關的檔案 • sudo make modules_install • sudo mkinitramfs -o /boot/initrd.img-2.6.17.14-ubuntu1 /lib/modules/2.6.17.14-ubuntu1

  4. 核心的編譯與安裝 • 成功 • 核心製作出來的資料還是被放置在/usr/src/linux-2.6.x.x/arch/i386/boot/bzImage • 模組製作出來的資料還是被放置在/lib/modules/2.6.17.14-ubuntu1 • 失敗 • 可能是核心項目的挑選選擇的不好, 可能您需要重新以make menuconfig 再次的檢查一下您的相關設定喔! 如果還是無法成功的話,那麼或許將原本的核心資料內的 .config 檔案,複製到您的核心原始檔目錄下, 然後據以修改,應該就可以順利的編譯出您的核心了。注意到,下達了 make bzImage 後應如下列結果 • Root device is (8, 1) • Boot sector 512 bytes. • Setup is 7047 bytes. • System is 1590 kB • Kernel: arch/i386/boot/bzImage is ready (#1)

  5. 注意事項 • 如果modules compile 兩次的話,照下列步驟移開舊的modules • cd /lib/modules • mv 2.6.17.14-ubuntu1 2.6.17.14-ubuntu1.old • cd /usr/src/linux-source-2.6.17 • make modules_install • 避免modules install產生問題

  6. 安裝新舊版的核心成多重開機系統 1 • 1. 移動新核心到 /boot 裡面去: • sudo cp /usr/src/linux-source-2.6.17/arch/i386/boot/bzImage/boot/vmlinuz-2.6.17 • sudo cp /usr/src/linux-source-2.6.17/System.map /boot/System.map-2.6.17

  7. 安裝新舊版的核心成多重開機系統 2 • 2. 修改 grub 設定檔sudo vim /boot/grub/menu.lst 檔案內容: default=0 timeout=5 #hiddenmenu --->請將此列註解 加一個#在前頭 ##新增下列 title Ubuntu hello test kernel 2.6.17 root (hd0,0) kernel /boot/vmlinuz-2.6.17 root=/dev/sda1 ro quiet splash initrd /boot/initrd.img-2.6.17.14-ubuntu1 quiet savedefault boot

  8. 查詢kernel版本 • uname -r

  9. vim color設定 • cd /home/使用者帳戶名稱 • sudo apt-get install vim • vim .vimrc • 加入下列兩行 syntax on set background=dark 不會vim指令的請到下列網址參考 http://linux.vbird.org/linux_basic/0310vi.php

  10. kernel相關資訊 • 核心: • /boot/vmlinuz 或 • /boot/vmlinuz-version; • 核心解壓縮所需 RAM Disk: • /boot/initrd (/boot/initrd-version); • 核心模組: • /lib/modules/version/kernel 或 • /lib/modules/`uname -r`/kernel; • 檢查 /lib/modules/`uname -r`/modules.dep • 核心原始碼: • /usr/src/linux-source-2.6.17 (要安裝才會有!否則預設不安裝的!) • 如果該核心被順利的載入系統當中了,那麼就會有幾個資訊紀錄下來: • 核心版本: /proc/version • 系統核心功能: /proc/sys/kernel

  11. 錯誤訊息與解決方法1 • make[1]: *** [scripts/basic/fixdep] Error 1make: *** [scripts_basic] Error 2 • try to install the libc6-dev package • make[1]: *** [scripts/kconfig/lxdialog/checklist.o] Error 1 make: *** [menuconfig] Error 2 • install curses. • It should be like apt-get install ncurses-dev

  12. 錯誤訊息與解決方法2 • 沒有mkinitramfs • sudo apt-get install cramfsprogs • 有安裝 cramfsprogs 這個 package 才能以 mkinitramfs來製作 initrd.img。

  13. 網站參考 • 編譯核心 • http://linux.vbird.org/linux_basic/0540kernel.php • GNU/Linux 初學之旅 • http://linux.vbird.org/linux_basic/0120howtolinux/0120howtolinux_3.php

More Related