回文章列表
作者register.bbs@bbs.cse.ttu.edu.tw (月光下的妖貓) 看板: linux
標題[問題] ubuntu 7.10 更新 kernel
時間秘密情人資訊站 (2008/04/26 Sat 01:34:52)
在下 重編  kernel 但久不成功  這次碰到了以下狀況

想請教各位前輩   幾個問題

1. 如何判定是否需要 initrd.img 檔案
2. 如何在ubuntu 7.10 下製作 initrd.img 檔案
3. 以下的狀況是否是因為initrd.img 檔案引起的

使用環境來源:
http://tw.archive.ubuntu.com/ubuntu-releases/gutsy/ubuntu-7.10-server-i386.iso
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.14.tar.bz2
http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.22.14.bz2

設定檔:
使用原先的設定檔(/boot/config-2.6.22-14-server)
但有 注意將
Device Driver -> Block Driver -> RAM Disk support 編入核心

第一次編完時
未做 mkinitrd 的處理 故未有 initrd.img 的檔案
修改/boot/grub/menu.lst
成
┌────────────────────────────────────
│ #原先開機設定
│ title        Ubuntu 7.10, kernel 2.6.22-14-server
│ root        (hd0,0)
│ kernel      /boot/vmlinuz-2.6.22-14-server
│ root=UUID=5b9d60bb-6d38-4464-87e8-83b94cf18bc1 ro quiet splash
│ initrd      /boot/initrd.img-2.6.22-14-server
│ quiet
│ #復製修改的部分
│ title       Ubuntu 7.10, kernel 2.6.22.14-test
│ root        (hd0,0)
│ kernel      /boot/vmlinuz-2.6.22.14
│ root=UUID=5b9d60bb-6d38-4464-87e8-83b94cf18bc1 ro quiet splash
│ initrd      /boot/initrd.img-2.6.22-14-server
│ quiet
└────────────────────────────────────

重開出現的螢幕資訊如下
┌────────────────────────────────────
│ Starting up ...
│ Uncompressing Linux... Ok, booting the kernel.
│ [   13.809780] PCI: Failed to allocate mem resourc #6:10000@fe000000 for
│ 0000:01:00.0
│ [   15.531038] xd: Out of memory.
│ Loading, please wait...
│ WARNING: Couldn't open directory /lib/modules/2.6.22.14: No such file or
│ directory
│ FATAL: Could not open /lib/modules/2.6.22.14/modules.dep.temp fpr writing:
│ No such file or directory
│         Check root = bootarg cat /proc/cmdline
│         or missing modules, devices: cat /proc/modules ls /dev
│ ALERT! /dev/disk/by-uuid/5b9d60bb-6d38-4464-87e8-83b94cf18bc1 does not exist
│ Dropping to a shell!
│
│ BusyBox v1.1.3 (Debain1:1.1.3-5ubuntu7) Built-in shell (ash)
│ Enter 'help' for a list of built-in commands.
│
│
│ (initramfs) _
│
└────────────────────────────────────

忘記在哪兒看到的說   將 driver 編入 kernel 可以不用 initrd 的檔案來載入模組
再次修改 menu.lst 如下
┌────────────────────────────────────
│
│ title       Ubuntu 7.10, kernel 2.6.22.14-test
│ root        (hd0,0)
│ kernel      /boot/vmlinuz-2.6.22.14
│ root=UUID=5b9d60bb-6d38-4464-87e8-83b94cf18bc1 ro quiet splash
│ # initrd      /boot/initrd.img-2.6.22-14-server
│ quiet
└────────────────────────────────────

重開出現的螢幕資訊如下
┌────────────────────────────────────
│ Starting up ...
│ Uncompressing Linux... Ok, booting the kernel.
│ [   12.242037] PCI: Failed to allocate mem resourc #6:10000@fe000000 for
│ 0000:01:00.0
│ [   12.055520] xd: Out of memory.
│ [   12.961260] Kernel panic - not syncing: VFS: Unable to mount root fs on
│ unknown-block(0.0)
└────────────────────────────────────

由於.... ubuntu 7.10 沒有 initrd-tools 的套件可下載
查了資料後
是要用
/usr/sbin/mkinitramfs -o /boot/initrd.img-2.6.22.14 2.6.22.14

製作 initrd.img 檔案

可是我的電腦卻回應
find:/lib/firmware/2.6.22.14: No such file or directory

說真的   /lib/firmware/也只有 2.6.22-14-server 的資料夾
┐(─_─)┌ 說真的我不知道要怎麼弄出這東東

想說拿舊的 initrd.img 來改好了
但
sudo mount -t ext3 -o loop initrd.img-2.6.22-14-server /mnt/initrd

結果出現
[ 2256.986514] VFS: Can't find ext3 filesystem on dev loop0
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

所以我就用 dmesg 去看開機訊息了
[   27.711483] EXT3 FS on sda1, internal journal

所以  我還是不知道怎麼辦


                                   m(╴ ╴)m  煩請提供相關有用訊息
--

La douleur passe, la beaute reste

                               Pierre-Auguste Renoir


--
  , 秘密情人  (bbs.cse.ttu.edu.tw) 
    ~\     Post From: 140.129.20.56 
文章選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻