debian升级内核~~!

如果您覺得您的問題不屬於 debian desktop 或是 debian server 版的範圍內,請在這裡發問。

版主: mufa

Re: re:debian升级内核~~!

文章d2207197 » 週六 12月 25, 2004 2:26 am

脫線 寫:編過不少次核心,但是initrd是作啥用的,我還是不懂耶..............

initrd 就是 initial ramdisk
在boot load 載入 kernel 時期就會掛載 initrd 。

通常是把 modules 包起來成為 initrd ,讓系統啟動初期就可以載入 module,而不需要等到掛載根目錄。
如果你的硬碟是 IDE 的,而你把 ATA 支援編成 module,卻沒有做包含 modules 的 initrd,那你開機可能會失敗。因為你的 kernel 本身沒有能力存取你的硬碟,而讓 kernel 支援存取你硬碟的 module 卻就在硬碟裡。

另外,使用 boot splash 時也會用到 initrd。把 boot splash 的圖片作成 initrd,讓 kernel 開機初期便載入他。
頭像
d2207197
鑽研的研究生
鑽研的研究生
 
文章: 1763
註冊時間: 週二 5月 27, 2003 9:57 pm
來自: 火星

re:debian升级内核~~!

文章isaac » 週六 12月 25, 2004 11:49 am

lilo.conf在公司!看来要星期一才可以粘贴出来了!
升级kernel我是这样的~~:
apt-cache search ..
apt-get install XXXXXX
isaac
可愛的小學生
可愛的小學生
 
文章: 75
註冊時間: 週三 12月 22, 2004 4:36 pm

re:debian升级内核~~!

文章isaac » 週一 12月 27, 2004 10:36 am

这就是我的lilo.conf~~我不知道应该修改那里!

# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# --------------- `install-mbr(8)', `/usr/share/doc/lilo/',
# and `/usr/share/doc/mbr/'.

# +---------------------------------------------------------------+
# | !! Reminder !! |
# | |
# | Don't forget to run `lilo' after you make changes to this |
# | conffile, `/boot/bootmess.txt', or install a new kernel. The |
# | computer will most likely fail to boot if a kernel-image |
# | post-install script or you don't remember to run `lilo'. |
# | |
# +---------------------------------------------------------------+

# Support LBA for large hard disks.
#
lba32

# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
disk=/dev/hdb
bios=0x80


# Specifies the boot device. This is where Lilo installs its boot
# block. It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/hdb

# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hdb2

# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller. Using `compact' is especially recommended when
# booting from a floppy disk. It is disabled here by default
# because it doesn't always work.
#
# compact

# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=/boot/boot-menu.b

# Specifies the location of the map file
#
map=/boot/map

# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration. If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well. Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000

# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=20

# You can put a customized boot message up if you like. If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress. `single-key' goes with the `alias' lines in the
# `image' configurations below. eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
# message=/boot/bootmess.txt
# prompt
# single-key
# delay=100
# timeout=100

# Specifies the VGA text mode at boot time. (normal, extended, ask, <mode>)
#
# vga=ask
# vga=9
#
vga=normal

# Kernel command line options that apply to all installed images go
# here. See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""

# Boot up Linux by default.
#
default=Linux

image=/vmlinuz
label=Linux
read-only
# restricted
# alias=1

image=/vmlinuz.old
label=LinuxOLD
read-only
optional
# restricted
# alias=2

# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.
#
# other=/dev/hda4
# label=HURD
# restricted
# alias=3
isaac
可愛的小學生
可愛的小學生
 
文章: 75
註冊時間: 週三 12月 22, 2004 4:36 pm

Re: re:debian升级内核~~!

文章d2207197 » 週一 12月 27, 2004 11:19 am

isaac 寫:lilo.conf在公司!看来要星期一才可以粘贴出来了!
升级kernel我是这样的~~:
apt-cache search ..
apt-get install XXXXXX

請問您的 XXXXX 是什麼?
頭像
d2207197
鑽研的研究生
鑽研的研究生
 
文章: 1763
註冊時間: 週二 5月 27, 2003 9:57 pm
來自: 火星

Re: re:debian升级内核~~!

文章d2207197 » 週一 12月 27, 2004 11:24 am

isaac 寫:这就是我的lilo.conf~~我不知道应该修改那里!
# harddisk order. Use with caution.
disk=/dev/hdb
bios=0x80
boot=/dev/hdb
root=/dev/hdb2
install=/boot/boot-menu.b

# Specifies the location of the map file
#
map=/boot/map
delay=20
vga=normal
default=Linux
image=/vmlinuz
label=Linux
read-only
# restricted
# alias=1

image=/vmlinuz.old
label=LinuxOLD
read-only
optional
# restricted
# alias=2


你要確定你新裝的 kernel 就放在 hdb2 的根目錄。檔名叫做 vmlinuz
頭像
d2207197
鑽研的研究生
鑽研的研究生
 
文章: 1763
註冊時間: 週二 5月 27, 2003 9:57 pm
來自: 火星

Re: re:debian升级内核~~!

文章isaac » 週一 12月 27, 2004 11:56 am

d2207197 寫:
isaac 寫:lilo.conf在公司!看来要星期一才可以粘贴出来了!
升级kernel我是这样的~~:
apt-cache search ..
apt-get install XXXXXX

請問您的 XXXXX 是什麼?


apt-get install 的是apt-cache search 出来的kernel-image~!
isaac
可愛的小學生
可愛的小學生
 
文章: 75
註冊時間: 週三 12月 22, 2004 4:36 pm

Re: re:debian升级内核~~!

文章isaac » 週一 12月 27, 2004 12:01 pm

d2207197 寫:
isaac 寫:这就是我的lilo.conf~~我不知道应该修改那里!
# harddisk order. Use with caution.
disk=/dev/hdb
bios=0x80
boot=/dev/hdb
root=/dev/hdb2
install=/boot/boot-menu.b

# Specifies the location of the map file
#
map=/boot/map
delay=20
vga=normal
default=Linux
image=/vmlinuz
label=Linux
read-only
# restricted
# alias=1

image=/vmlinuz.old
label=LinuxOLD
read-only
optional
# restricted
# alias=2


你要確定你新裝的 kernel 就放在 hdb2 的根目錄。檔名叫做 vmlinuz


根目录下面的Vmlinuz这个档名里面没有东西啊!
kernel这个目录在/lib/modules/2.6.9/下面~~!
isaac
可愛的小學生
可愛的小學生
 
文章: 75
註冊時間: 週三 12月 22, 2004 4:36 pm

re:debian升级内核~~!

文章isaac » 週一 12月 27, 2004 12:04 pm

都是自动的安装来的!
就是修改lilo那里有问题吧!


我决定我现在重新升级!
全程粘贴上来!请帮帮我,看看我那里出错了!
需要修改那里!谢谢你们了!
isaac
可愛的小學生
可愛的小學生
 
文章: 75
註冊時間: 週三 12月 22, 2004 4:36 pm

re:debian升级内核~~!

文章訪客 » 週一 12月 27, 2004 12:22 pm

/boot/vmlinuz-XXX(版本名稱)

lilo.conf改的方式

image=/boot/vmlinuz-XXXX(版本名稱)
label=Linux(名稱自取)
read-only
# restricted
# alias=1

新舊版本可以並存
存檔後,在終端機介面下指令
lilo -v -v
訪客
 

re:debian升级内核~~!

文章isaac » 週一 12月 27, 2004 12:25 pm

全过程开始:
1.apt-cache search kernel-image
2.debian:/etc/apt# apt-get install kernel-image-2.4.16-686
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
ash cramfsprogs initrd-tools
The following NEW packages will be installed:
ash cramfsprogs initrd-tools kernel-image-2.4.16-686
0 packages upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 8509kB/8615kB of archives. After unpacking 23.5MB will be used.
Do you want to continue? [Y/n] y
isaac
可愛的小學生
可愛的小學生
 
文章: 75
註冊時間: 週三 12月 22, 2004 4:36 pm

re:debian升级内核~~!

文章isaac » 週一 12月 27, 2004 12:27 pm

Anonymous 寫:/boot/vmlinuz-XXX(版本名稱)

lilo.conf改的方式

image=/boot/vmlinuz-XXXX(版本名稱)
label=Linux(名稱自取)
read-only
# restricted
# alias=1

新舊版本可以並存
存檔後,在終端機介面下指令
lilo -v -v



# restricted
# alias=1
为什么要这样呢?
isaac
可愛的小學生
可愛的小學生
 
文章: 75
註冊時間: 週三 12月 22, 2004 4:36 pm

re:debian升级内核~~!

文章isaac » 週一 12月 27, 2004 1:12 pm

Media Change: Please insert the disc labeled 'Debian GNU/Linux 3.0 r2 _Woody_ - Official i386 Binary-1 (20031201)' in the drive '/cdrom/' and press enter
]
Get:1 http://ftp.iinet.net.au stable/main kernel-image-2.4.16-686 2.4.16-1 [8509kB]
Fetched 8509kB in 5m55s (24.0kB/s)
Preconfiguring packages ...
Selecting previously deselected package ash.
(Reading database ... 6175 files and directories currently installed.)
Unpacking ash (from .../a/ash/ash_0.3.8-37_i386.deb) ...
Selecting previously deselected package cramfsprogs.
Unpacking cramfsprogs (from .../cramfsprogs_1.1-3_i386.deb) ...
Selecting previously deselected package initrd-tools.
Unpacking initrd-tools (from .../initrd-tools_0.1.32woody.3_all.deb) ...
Selecting previously deselected package kernel-image-2.4.16-686.
Unpacking kernel-image-2.4.16-686 (from .../kernel-image-2.4.16-686_2.4.16-1_i386.deb) ...

You are attempting to install an initrd kernel image (version 2.4.16-686)
This will not work unless you have configured your boot loader to use
initrd.
As a reminder, in order to configure lilo, you need to
add an 'initrd=/initrd' in your /etc/lilo.conf
I repeat, You need to configure your boot loader. If you have already done
so, and you wish to get rid of this message, please put
`do_initrd = Yes'
in /etc/kernel-img.conf.
Do you want to stop now? [Y/n]

这里应该怎么选?
还有这里指示要么add an 'initrd=/initrd' in your /etc/lilo.conf
要么就'do_initrd = Yes' in /etc/kernel-img.conf.
应该怎么呢?谢谢指教~~
isaac
可愛的小學生
可愛的小學生
 
文章: 75
註冊時間: 週三 12月 22, 2004 4:36 pm

re:debian升级内核~~!

文章isaac » 週一 12月 27, 2004 2:00 pm

啊!!!!!!!!!
又失败了!

启动之后又是进不了系统啊!
有几行信息:
VFS:cannot open root driver “342”or 03:42
please append a correct “root=” boot option
kernel panic:VFS:unable to mount root fs on 03:42
isaac
可愛的小學生
可愛的小學生
 
文章: 75
註冊時間: 週三 12月 22, 2004 4:36 pm

re:debian升级内核~~!

文章isaac » 週一 12月 27, 2004 2:08 pm

lilo.conf
里面已经有了:
root=/dev/hdb2

为什么还cannot open root driver ?
isaac
可愛的小學生
可愛的小學生
 
文章: 75
註冊時間: 週三 12月 22, 2004 4:36 pm

re:debian升级内核~~!

文章isaac » 週一 12月 27, 2004 2:58 pm

步骤:
1.apt-cache search kernel-image
2.apt-get install kernel.2.4.18.686
3.修改lilo.conf
root=/dev/hdb2
initrd=/initrd
image=/boot/vmlinuz-2.4.18.686
label=Linux
read-only
#restricted
#alias=1
4.运行lilo -v -v
5.重新启动


重新启动之后就进入不了系统了。
出现了错误信息跟着就死机了~
就是ctrl+alt+del启动也启动不了,
必须冷启动~!

错误信息是:VFS:cannot open root driver “342”or 03:42
please append a correct “root=” boot option
kernel panic:VFS:unable to mount root fs on 03:42

这究竟是因为什么~是不是我操作方面还少了一些步骤呢?
isaac
可愛的小學生
可愛的小學生
 
文章: 75
註冊時間: 週三 12月 22, 2004 4:36 pm

上一頁下一頁

回到 debian misc

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客