|
我在虚拟机上安装了Red Hat 9.0(linux-2.4.20-8) 下载了linux-2.6.0.tar.gz
按照一般的方法编译内核 也生成了bzImage 和 System.map 文件 按照提示
复制到指定的位置(/boot)并在/boot下建立了initrd-2.6.0.img文件 这一路都没有问题
我的/boot目录下的文件如下:
///////////////////////////////////////////////////////////////
boot.b initrd-2.6.0.img module-info System.map-2.6.0
chain.b kernel.h module-info-2.4.20-8 vmlinux-2.4.20-8
config-2.4.20-8 lost+found os2_d.b vmlinuz
grub message System.map vmlinuz-2.4.20-8
initrd-2.4.20-8.img message.ja System.map-2.4.20-8 vmlinuz-2.6.0
/////////////////////////////////////////////////////////////////////////
选择linux-2.4.20-8可以正常启动 可是
选择linux-2.6.0 启动后显示的错误如下:
////////////////////////////////////////////////////////////////
pivotroot:pivot_root(/sysroot,/sysroot/initrd) failed :2
UMount /initrd/proc failed :2
Kernel panic :No init found ,Try passing init = option to kernel
//////////////////////////////////////////////////////////////////
尝试了各种办法 怎么也没有通过 希望高手能指点迷津 感恩不尽!
附:我的邮箱passionone11@163.com
我的硬盘是IDE的
下边是我的grub文件(我修改过)
# 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/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
color light-blue/red
timeout=30
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
title Red Hat Linux (2.6.0)
root(hd0,0)
kernel /vmlinuz-2.6.0 ro root=LABEL=/
initrd /initrd-2.6.0.img
下边是的的fstab 文件(系统自带)
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
下边是我用fdisk -l命令显示的信息
Disk /dev/hda: 18.8 GB, 18897856000 bytes
255 heads, 63 sectors/track, 2297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 2249 17960670 83 Linux
/dev/hda3 2250 2297 385560 82 Linux swap
下边是我的inittab文件(系统自带)
#
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "ower Failure; System Shutting Down"
# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "ower Restored; Shutdown Cancelled"
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
# Run xdm in runlevel 5
x:5:respawn:/etc/X11/prefdm -nodaemon |
|