查看到sbin下有上述链接,转到bin下:
#cd /babyLinux/rootfs/bin
重新做这些链接:
#ln -s busybox chroot #ln -s busybox getty #ln -s busybox ifconfig …
然后把sbin下的链接删除,以节省空间:
#rm -rf /babyLinux/rootfs/sbin/*
再把原先inittab中所有的sbin改成bin ,Init.d下的文件:rcS。请确保这个文件是可执行的,否则请改成可执行的:
#chmod u+x rcS
rcS的内容:
#! /bin/sh mount -o remount,rw / /bin/mount -a >/etc/mtab echo echo echo echo echo -en "\t\tWelcom to \\033[0;32mBabyLinux\\033[0;39m\n" echo -en "\\033[0;36m\n" echo echo -en "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\t\t\n" echo -en "+ This is a tiny Linux system based on a floppy.It contains \t\t\n" echo -en "+ more than 100 basic Linux commands and tools.The kernel of \t\t\n" echo -en "+ this tiny system support all kinds of normal filesystems. \t\t\n" echo -en "+ Linux ext2,ext3,jfs,reiserfs and Windows fat,vfat,ntfs[readonly]\t\t\n" echo -en "+ is supported! So it is a powerful small system you can use it \t\t\n" echo -en "+ as a Linux and Windows rescue disk.Beside this,the kernel also\t\t\n" echo -en "+ contains the drivers of Reltek8139,NE2000,via-rhine ethernet\t\t\n" echo -en "+ adpater. you can configure the IPaddress and netmask with tools\t\t\n" echo -en "+ 'ifconfig' and config the default gateway with command 'route'. \t\t\n" echo -en "+ Is there anything else? Haha,this is a telnet server build-in\t\t\n" echo -en "+ you can type 'telnetd' to startd it and thus your friends can\t\t\n" echo -en "+ logon to your system to help you solve the problem.\t\t\n" echo -en "+ \\033[0;32mAll these great features are powered by BusyBox 1.0\\033[0;36m\t\t\n" echo -en "+ This is a free system tool developed by GuCuiwen.\t\t\n" echo -en "+ RUN YOUR OWN RISK of using it ! if you have any problem please\t\t\n" echo -en "+ mailto : win2Linux@163.com Enjoy!!\t\t\n" echo -en "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\t\t\n" echo -en "\\033[0;39m\n" hostname BabyLinux
可以自己作相应的修改。
以上是babyLinux根文件系统的所有内容,他的总大小应该在1M左右。
我还计划做一个live CD,但是目前已经有很多live CD了,而且都做的非常好。但是我会自己做一个作为学习Linux的一种手段。如果有时间,可能写一个做U盘Linux和live CD的教程。但是,我想不会写的和这个文档一样详细了,我的时间有限。可能大概讲一下原理和步骤。有经验的Linux爱好者应该可以通过阅读文档完成制作。
BabyLinux操作系统的制作过程(上)
(参考链接: http://linux.ccidnet.com/art/741/20070119/1005117_1.html)
|