/etc/ /inittab 初始化脚本 /init.d/rcS 启动挂载 /fstab 文件系统挂载表 /profile /hostname 主机名 /hosts /passwd 密码信息 /shadow 密码信息 /issue 交互登录前,显示的提示信息 (1) inittab # Startup the system null::sysinit:/bin/mount -o remount,rw / null::sysinit:/bin/mount -t proc proc /proc null::sysinit:/bin/mount -a null::sysinit:/bin/hostname -F /etc/hostname# Now run any rc scripts ::sysinit:/etc/init.d/rcS # Now invoke shell ::askfirst:/bin/ash # Logging junk null::sysinit:/bin/touch /var/log/messages null::respawn:/sbin/syslogd -n -m 0 null::respawn:/sbin/klogd -n # Stuff to do for the 3-finger salute ::ctrlaltdel:/sbin/reboot # Stuff to do before rebooting null::shutdown:/usr/bin/killall klogd null::shutdown:/usr/bin/killall syslogd null::shutdown:/bin/umount -a -r null::shutdown:/sbin/swapoff -a (2) rcS #!/bin/ash PATH=/sbin:/bin:/usr/sbin:/usr/bin runlevel=S prevlevel=N umask 022 export PATH runlevel prevlevel #mount rootfs success /bin/mount -a # /bin/echo /sbin/mdev > /proc/sys/kernel/hotplug mdev -s # Configure net interface /sbin/ifconfig lo 127.0.0.1 up /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo /sbin/ifconfig eth0 192.168.2.25 netmask 255.255.255.0 /sbin/route add default gw 192.168.2.1 (3)fstab #device mount-point type option dump fsck order proc /proc proc defaults 0 0 none /tmp ramfs defaults 0 0 sysfs /sys sysfs defaults 0 0 mdev /dev ramfs defaults 0 0 (4)profile #Set search library path #Set user path USER="id -un" LOGNAME=$USER PS1=‘[\[email protected]\h=W]#‘ PATH=$PATH HOSTNAME=‘/bin/hostname‘ export USER LOGNAME PS1 PATH (5)hostname (6)issue
制作根文件系统树
时间: 2024-10-17 18:08:22