::ctrlaltdel:/bin/reboot
::shutdown:/bin/umount -a -r
::shutdown:/bin/swapoff -a
issue
Baby Linux release 0.1
motd
mtab
passwd
root::0:0:root:/root:/bin/ash
profile
# /etc/profile: system-wide .profile file for the Bourne shells
echo
echo
export PS1="[u@h w]$"
echo "Done"
alias ll='ls -l'
alias du='du -h'
alias df='df -h'
alias rm='rm -i'
echo
resolv.conf
nameserver 202.96.209.5
nameserver 202.96.209.6
shadow
root:$$adltAB9Sr/MSKqylIvSJT/:12705:0:99999:7:::
shadow-
root:$DWU.tenP$B7ANiXoGoiZMwJR6Ih8810:12705:0:99999:7:::
其中有很多是从原系统的/etc下拷贝过来修改的,假如您是个具备中等以上水平的linux爱好者,那么应该一看就明白了,当然,您也能够根据 自己的需要修改这些文档.其中最重要的是fstab和inittab,busybox内建的init程式用到的inittab文档的语法和一般的不相同, 不能直接把原系统/etc下inittab文档拷贝过来.能够把busybox-1.00目录下的示例文档拷贝过来修改用.具体请看busybox的文 档.busybox的init也能够不用inittab.但是在我制作babylinux过程中有一个很奇怪的bug.任何/sbin下的 busybox链接在做成压缩的根文档系统,解压后都不能正常运行,显示很难找到该命令.只有当我在/bin下做这些链接时才能运行.具体原因还不太清除, 所以您需要做下面的工作:
#cd /babylinux/rootfs/sbin
#ls
chroot getty ifconfig losetup pivot_root reboot swapoff sysctl
fdisk halt init mkswap poweroff route swapon telnetd
查看到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 " Welcom to 33[0;32mBabyLinux33[0;39m "
echo -en "33[0;36m "
echo
echo -en " "
echo -en " This is a tiny linux system based on a floppy.It contains "
echo -en " more than 100 basic Linux commands and tools.The kernel of "
echo -en " this tiny system support all kinds of normal filesystems. "
echo -en " linux ext2,ext3,jfs,reiserfs and windows fat,vfat,ntfs[readonly] "
echo -en " is supported! So it is a powerful small system you can use it "
echo -en " as a linux and windows rescue disk.Beside this,the kernel also "
echo -en " contains the drivers of Reltek8139,NE2000,via-rhine ethernet "
echo -en " adpater. you can configure the IPaddress and netmask with tools "
echo -en " 'ifconfig' and config the default gateway with command 'route'. "
echo -en " Is there anything else? Haha,this is a telnet server build-in "
echo -en " you can type 'telnetd' to startd it and thus your friends can "
echo -en " logon to your system to help you solve the problem. "
echo -en " 33[0;32mAll these great features are powered by BusyBox 1.033[0;36m "
echo -en " This is a free system tool developed by GuCuiwen. "
echo -en " RUN YOUR OWN RISK of using it ! if you have any problem please "
echo -en " mailto : win2linux@163.com Enjoy!! "
echo -en " "
echo -en "33[0;39m "
hostname BabyLinux
能够自己作相应的修改.
以上是babylinux根文档系统的任何内容,他的总大小应该在1M左右.
[root@gucuiwen baby]# du -hs
1.1M .
九,制作ramdisk映象文档
babylinux根文档系统任何东西都放在/babylinux/rootfs下,我们将利用ramdisk把这些内容做成ramdisk映象文档并压缩他.
以下主要是ramdisk的用法,看完以下内容,您应当学会ramdisk的使用.
[root@gucuiwen babylinux]# dd if=/dev/zero of=/dev/ram1
dd: 正在写入 ‘/dev/ram1’: 设备上没有空间
读入了 8193 0 个块
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




