|
想做一个U盘系统. kernel 2.4
U盘分两部分:
Disk /dev/sda: 511 MB, 511863296 bytes
31 heads, 32 sectors/track, 1007 cylinders
Units = cylinders of 992 * 512 = 507904 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 99 49088 6 FAT16
/dev/sda2 100 1007 450368 83 Linux
sda1:
boot.msg
initrd.gz
ldlinux.sys
syslinux.cfg
vmlinuz
sda2:
bin dev etc initrd lib lost+found mnt proc root sbin tmp usr var
其中
syslinux.cfg:
default linux
prompt 1
display boot.msg
timeout 1
label linux
kernel vmlinuz
read-write
append initrd=initrd.gz init=linuxrc rw root=/dev/sda2 vga=791
initrd.gz里的linuxrc内容为:
#!/bin/nash
echo "Running linuxrc"
echo "Now sleeping for 4 seconds..."
/bin/sleep 4
echo Mounting /proc filesystem
mount -t proc /proc /proc
echo Creating block devices
mkdevices /dev
echo Creating root device
mkrootdev /dev/root
echo 0x0100 > /proc/sys/kernel/real-root-dev
echo Mounting root filesystem
mount -o defaults --rw -t ext2 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd
umount /initrd/proc
syslinux /dev/sda1
启动以后,内核运行:
......
Mounting /proc filesystem
Creating block device
Creating root device
Mounting root filesystem
Freeing unused kernel memory: 100k freed
attempt to access beyond end of device
08:02: rw=0, want=841835629, limit=450368
类似以上两行的好像有三组
Kernel panic: No init found. Try parring init= option to kernel
然后系统就停这里了,
系统是别人运行过的,可能是
append initrd=initrd.gz init=linuxrc rw root=/dev/sda2 vga=791
这个参数不太对.
有没有人遇到过这种情况?或者有何建议?
google了很久了,没有找到解决的方案,在这个论坛也search过了,但是还是没有结果. |
|