|
|
发表于 2005-11-26 00:50:47
|
显示全部楼层
Post by hysundy
由于新系统初始化需要,更换initrd.img 中/bin 默认的shell。使用busybox sh来替代 原nash shell 但修改 linuxrx 脚本后发现新shell 不能正常工作,提示“找不到 echo, mount ,umount等命令”错误。我的busybox 是1.0 采用静态联编生成。
原 linuxrx 脚本:
#!/bin/nash
mount -t proc /proc /proc
mkdevices /dev
mkrootdev /dev/root
echo 0x0100 > /proc/sys/kernel/real-root-dev
mount -o defaults --ro -t ext2 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd
umount /initrd/proc
更换busybox sh
#cp -a busybox /initrd/bin
#cp -a sh /initrd/bin
修改 linuxrx 脚本:
#!/bin/sh
mount -t proc /proc /proc
mkdevices /dev
mkrootdev /dev/root
echo 0x0100 > /proc/sys/kernel/real-root-dev
mount -o defaults --ro -t ext2 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd
umount /initrd/proc nash shell及linuxrx 脚本是啥?是指bash shell及linuxrc脚本乎?很多命令及语法不常见的,兄台用的是什麽系统?
另外是否编译busybox的时候编漏了echo,mount,umount? |
|