日期:2014-05-16  浏览次数:20862 次

关于u盘linux制作中initrd加载遇到的问题
想要做一个linux的U盘系统,做了以下操作
创建了基本的文件结构,拷贝了stage stage2到boot/grub
设置了grub引导。
创建了grub.conf,设置了加载的kernel与initrd,并且拷贝了台式机的initrd.img与vmlinuz文件


开机引导能够进入grub,能够正常的引导,找到kernel与initrd。
但是在执行initrd过程中打印如下:


Scanning adn configuring dmraid supported devices
Scanning logical volumes
reading all physical volumes. this may take a while...
No volume groups found
Activating logical volumes
volume group "VolGroup00" not found
Creating root device
Mounting root filesystem
VFS:Can't find ext3 filesystem on dev ram0
mount:error mounting /dev/root on /sysroot as ext3: Invalid argument
Setting up other filesystems
Setting up new root fs
setuproot:moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot : error mounting /proc: No such file or directory 
setuproot : error mounting /sys: No such file or directory
Switching to new root and running init
unmounting old /dev
unmounting old /proc
unmounting old /sys
swicthroot: mount failed: No such file or directory
Kernel panic - not syncing:Attempted to kill init!

init就这样被无情的kill了。
由于对linux本就不太了解,而且之前的一堆打印直接刷屏上去没法查看。十分的迷茫。
希望牛人们指点迷津。具体是错在哪了??



------解决方案--------------------
用量产行不,更安全!!!
------解决方案--------------------
不要用grub.conf
直接用grub命令行引导一下试试行不行
------解决方案--------------------
你是想通过U盘引导硬盘上的系统
还是想在U盘上做个系统
如果是在U盘上做个系统的话,直接拷贝两个initrd.img与vmlinuz文件是不行的吧
------解决方案--------------------
做过u盘启动。问题就是init脚本。不知道你的这个脚本是哪来的?我是直接从ubuntu里抽出来的,该脚本适合各种启动方式。另外u盘插进去后,启动盘符号是要变的,sda会变成sdb,依此