BusyBox inittab

# /etc/inittab init(8) configuration for BusyBox
#
# Copyright (C) 1999-2004 by Erik Andersen <[email protected]>
#
#
# Note, BusyBox init doesn‘t support runlevels.  The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use sysvinit.
#
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# <id>: WARNING: This field has a non-traditional meaning for BusyBox init!
#
#    The id field is used by BusyBox init to specify the controlling tty for
#    the specified process to run on.  The contents of this field are
#    appended to "/dev/" and used as-is.  There is no need for this field to
#    be unique, although if it isn‘t you may have strange results.  If this
#    field is left blank, then the init‘s stdin/out will be used.
#
# <runlevels>: The runlevels field is completely ignored.
#
# <action>: Valid actions include: sysinit, respawn, askfirst, wait, once,
#                                  restart, ctrlaltdel, and shutdown.
#
#       Note: askfirst acts just like respawn, but before running the specified
#       process it displays the line "Please press Enter to activate this
#       console." and then waits for the user to press enter before starting
#       the specified process.
#
#       Note: unrecognized actions (like initdefault) will cause init to emit
#       an error message, and then go along with its business.
#
# <process>: Specifies the process to be executed and it‘s command line.
#
# Note: BusyBox init works just fine without an inittab. If no inittab is
# found, it has the following default behavior:
#         ::sysinit:/etc/init.d/rcS
#         ::askfirst:/bin/sh
#         ::ctrlaltdel:/sbin/reboot
#         ::shutdown:/sbin/swapoff -a
#         ::shutdown:/bin/umount -a -r
#         ::restart:/sbin/init
#         tty2::askfirst:/bin/sh
#         tty3::askfirst:/bin/sh
#         tty4::askfirst:/bin/sh
#
# Boot-time system configuration/initialization script.
# This is run first except when booting in single-user mode.
#
::sysinit:/etc/init.d/rcS

# /bin/sh invocations on selected ttys
#
# Note below that we prefix the shell commands with a "-" to indicate to the
# shell that it is supposed to be a login shell.  Normally this is handled by
# login, but since we are bypassing login in this case, BusyBox lets you do
# this yourself...
#
# Start an "askfirst" shell on the console (whatever that may be)
::askfirst:-/bin/sh
# Start an "askfirst" shell on /dev/tty2-4
tty2::askfirst:-/bin/sh
tty3::askfirst:-/bin/sh
tty4::askfirst:-/bin/sh

# /sbin/getty invocations for selected ttys
tty4::respawn:/sbin/getty 38400 tty5
tty5::respawn:/sbin/getty 38400 tty6

# Example of how to put a getty on a serial line (for a terminal)
#::respawn:/sbin/getty -L ttyS0 9600 vt100
#::respawn:/sbin/getty -L ttyS1 9600 vt100
#
# Example how to put a getty on a modem line.
#::respawn:/sbin/getty 57600 ttyS2

# Stuff to do when restarting the init process
::restart:/sbin/init

# Stuff to do before rebooting
::ctrlaltdel:/sbin/reboot
::shutdown:/bin/umount -a -r
::shutdown:/sbin/swapoff -a

-----------------------------------------------------------------------------------

respawn:重生,重启。

时间: 2024-08-11 09:53:45

BusyBox inittab的相关文章

BusyBox inittab配置

inittab第一行指定初始化脚本,开启所有应用程序,必须有. ::sysinit:/etc/init.d/rcS 在第一行执行完后,执行剩余行命令,此终端要接受命令交互需开启sh. ::askfirst:/bin/sh 上述两行必须有,初始化系统,终端交互. -------------------------------------------------------------------------------- bootargs中参数console指定了终端口为ttyS0,所以initt

Busybox构建根文件系统和制作Ramdisk

定制根文件系统的方法很多,最常用的是使用BusyBox来构建定制根文件系统.它集成压缩了Linux的许多工具和命令,可以使用户迅速方便地建立一套相对完整.功能丰富的文件系统,其中包括大量常用的应用程序.下面详细介绍有关Busybox定制根文件系统. 一.系统环境: 1.操作系统:Ubuntu140.4 2.交叉编译工具:gcc version 6.1.1 20160711 (Linaro GCC 6.1-2016.08) 3.busybox源码包:busybox-1.26.2 二.构建rootf

使用busybox制作rootfs

Build Busybox as a static binary(no shared libs),如果选择上,则busybox将以静态形式进行编译,否则将以动态方式编译.此外,还需要对交叉编译环境进行配置,选择其中的Cross Compiler Perfix,输入交叉编译器的前缀,我们的嵌入式平台上使用的是arm-uclinux-linu TAG: busybox  rootfs 1  获取源码解压 从busybox的官方主页http://www.busybox.net ,下载busybox的源

linux-裁剪Linux功能,编译/bin/login, busybox编译linux

linux功能:终端提示信息 [[email protected] ~]# cat /etc/issueRed Hat Enterprise Linux Server release 5.8 (Tikanga)Kernel \r on an \m [[email protected] ~]# uname -r2.6.18-308.el5[[email protected] ~]# uname -mx86_64[[email protected] ~]# linux功能:用户 nsswitch:

Linux根文件系统分析之init和busybox

Hi,大家好!我是CrazyCatJack.今天给大家讲解Linux根文件系统的init进程和busybox的配置及编译. 先简单介绍一下,作为一个嵌入式系统,要想在硬件上正常使用的话.它的软件组成大概有这三部分:1)bootloader  2)嵌入式系统kernel  3)根文件系统 .这其实非常好理解,类比于PC上的操作系统,首先我们需要类似BIOS的东东,来控制系统的启动项,决定从哪里启动,怎样启动,启动什么.在嵌入式系统里bootloader就起着这样的作用.再者,我们需要一个已经配置.

Linux系统裁剪之四(自定义内核及busybox完成系统定制)

Linux系统裁剪之四(自定义内核及busybox完成系统定制) ·busybox busybox是一个二进制程序,可以模拟实现许许多多的Linux命令,busybox在编译安装完成之后会在我们系统的bin目录下生成一个名为busybox的二进制程序,其它的文件都是该二进制程序的软链接,几乎上百个命令都可以依靠这一个可执行程序来实现,还可以模拟几个shell,可以模拟实现我们Linux操作系统上bin和sbin目录下的很多命令,而且该文件所占的存储空间还非常的小,因此在一些存储设备容量非常小的环

从开始到结束,手把手教你使用busybox构建类嵌入式Linux系统

概述: 本篇博客是一个自制类嵌入式Linux系统的制作手册,内容涵盖使用宿主机通过busybox实 现制作类嵌入式Linu系统的详细过程,一步一步教你如何制作属于你自己的linux系统,同时 帮助你更加清楚的了解linux系统的组成结构,本篇博客需要读者对linux系统的启动流程及ssh 远程连接有一定的了解,这部分很多博客都有介绍,这里就不说明了,不了解的读者可以先去 看看这方面的博客. 制作的整个过程比较漫长(主要是编译源码需要耗费大量时间,因此,在编译内核时,记 得另起虚拟终端先完成其它操

使用BusyBox制作Linux根文件系统

STEP 1:构建目录结构 创建根文件系统目录,主要包括以下目录/dev  /etc /lib  /usr  /var /proc /tmp /home /root /mnt /bin  /sbin  /sys #mkdir     /home/rootfs#cd        /home/rootfs #mkdir  dev  etc  lib  usr  var  proc  tmp  home  root  mnt   sys STEP 2:    使用busybox构建/bin /sbi

使用BusyBox制作根文件系统

1.BusyBox简介 BusyBox 是很多标准 Linux 工具的一个单个可执行实现.BusyBox 包含了一些简单的工具,例如 cat 和 echo,还包含了一些更大.更复杂的工具,例如 grep.find.mount 以及 telnet:有些人将 BusyBox 称为 Linux 工具里的“瑞士军刀”. BusyBox 揭露了这样一个事实:很多标准 Linux 工具都可以共享很多共同的元素.例如,很多基于文件的工具(比如 grep 和 find)都需要在目录中搜索文件的代码.当这些工具被