news 2026/8/21 7:31:39

笔记 30 - 1 :rootfs 配置文件定制,lib 文件夹,etc / inittab

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
笔记 30 - 1 :rootfs 配置文件定制,lib 文件夹,etc / inittab

(244 - a)

++接着复制库文件

++库文件的来源

(244 - b)

++ 示例源代码在文末 :

++

(245)chmod +w lib


++

(246)

(247)du -mh lib/

++

(248)


(249)该文件夹下该文件的示例源码

++

# /etc/inittab init(8) configuration for BusyBox## Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>### Note, BusyBox init doesn't support runlevels. // 注意,BusyBox初始化不支持运行级别# The runlevels field is completely ignored by BusyBox init. If you want runlevels, use sysvinit.# // runlevels字段被 BusyBox 初始化完全忽略。如果您需要运行级别,请使用 sysvinit。## Format for each entry: <id>:<runlevels>:<action>:<process> // 书写格式## // <id>:<runlevels>:<action>:<process>## <id>: WARNING: This field has a non-traditional meaning for BusyBox init!# // 此字段对BusyBox初始化具有非传统含义!## // id 字段由 BusyBox 初始化程序用于指定指定进程运行的控制终端。# 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. // 此字段的内容将被追加到“/dev”并直接使用。# 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. // 如果此字段留空,则将使用 init 的stdin/out。# // 此字段无需唯一,但若不唯一,可能会出现异常结果。## // <id>:<runlevels>:<action>:<process>## <runlevels>: The runlevels field is completely ignored. // runlevels 字段被完全忽略。## <action>: Valid actions include: sysinit, respawn, askfirst, wait, once, restart, ctrlaltdel, and shutdown.## Note: askfirst acts just like respawn, // 注意:askfirst 的行为类似于 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.# // 但在运行指定进程之前,它会显示“请按Enter键激活此控制台”,然后等待用户按下回车键后再启动指定的进程。## Note: unrecognized actions (like initdefault) will cause init to emit an error message,# and then go along with its business.# // 注意:未识别的操作(如 initdefault )将导致初始化程序发出错误消息,然后继续其业务。## <process>: Specifies the process to be executed and it's command line. // 指定要执行的进程及其命令行。## Note: BusyBox init works just fine without an inittab. // BusyBox 初始化在没有 inittab 的情况下也能正常工作。# If no inittab is found, it has the following default behavior: // 如果未找到 inittab ,它将具有以下默认行为:# ::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.# // 请注意,我们在 shell 命令前加上“-”来指示该 shell 应作为登录 shell .# Normally this is handled by login, but since we are bypassing login in this case,# BusyBox lets you do this yourself...# // 通常这种情况由登录处理,但由于在此情况下我们绕过了登录,BusyBox 允许您自行完成此操作...## // 在控制台启动一个“ askfirst”shell (无论那是什么)# Start an "askfirst" shell on the console (whatever that may be)::askfirst:-/bin/sh## Start an "askfirst" shell on /dev/tty2-4tty2::askfirst:-/bin/sh tty3::askfirst:-/bin/sh tty4::askfirst:-/bin/sh# /sbin/getty invocations for selected ttystty4::respawn:/sbin/getty38400tty5 tty5::respawn:/sbin/getty38400tty6# 如何在串行线(用于终端)上放置 getty 的示例# 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

(250)

谢谢

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/8/21 7:30:26

ChatBI落地踩坑复盘:我见过的3种失败场景和规避方案

## 导语很多企业在布局生成式AI赋能数据分析时&#xff0c;都会把ChatBI作为第一优先级的落地场景&#xff0c;不少团队上线后效果不达预期&#xff0c;第一反应都会归因为“大模型能力不行&#xff0c;理解不了我们的业务问题”。但我们基于近2年服务不同行业客户ChatBI落地的…

作者头像 李华
网站建设 2026/8/21 7:28:54

CAST框架:用游戏求解器作为回合制导师,高效训练LLM智能体

1. 从“单步求解器”到“回合制导师”&#xff1a;CAST框架的诞生背景最近在探索大语言模型&#xff08;LLM&#xff09;驱动的智能体&#xff08;Agent&#xff09;时&#xff0c;一个核心的痛点始终挥之不去&#xff1a;如何让这些“聪明”但“莽撞”的模型学会在复杂、多步骤…

作者头像 李华
网站建设 2026/8/21 7:25:45

从 OData 请求到可观测性闭环,SAP Gateway Integration Scenarios 中的日志体系与故障追踪

在真实的 SAP S/4HANA 项目里,OData 服务出了问题,现场收到的信息往往非常有限。业务人员看到的是 SAP Fiori 页面一直转圈,浏览器 Network 面板里可能只有一个 HTTP 500,或者某个请求返回一段很短的错误文本。到了 ABAP 开发人员手里,问题很快会变成另外几个问题,究竟是…

作者头像 李华
网站建设 2026/8/21 7:24:45

基于Spring Boot与Vue的家居物流管理系统毕业设计实战指南

1. 先搞清楚这个项目能帮你解决什么实际问题如果你正在为计算机或软件工程专业的毕业设计发愁&#xff0c;特别是需要一个能跑起来、有完整代码、有前后端、有数据库、有文档&#xff0c;甚至最好还有讲解视频的“交差”项目&#xff0c;那么这个基于 Spring Boot 和 Vue 的家居…

作者头像 李华
网站建设 2026/8/21 7:23:50

聚类分析实战:从K-Means到DBSCAN,掌握无监督学习核心算法与应用

1. 从“分类”到“聚类”&#xff1a;数学建模中无监督学习的核心价值在数学建模竞赛和实际数据分析项目中&#xff0c;我们常常会遇到这样的场景&#xff1a;手头有一大堆数据&#xff0c;比如几百个城市的经济发展指标、几千个用户的消费行为记录&#xff0c;或者一堆未知的矿…

作者头像 李华
网站建设 2026/8/21 7:23:40

Java+Vue汽车资讯网站毕业设计:全栈项目实战与二次开发指南

这次我们来看一个面向计算机专业毕业设计的开源项目&#xff1a;一个完整的汽车资讯网站。这个项目基于 Java Vue Spring Boot MySQL 技术栈&#xff0c;不仅提供了完整的源码和数据库&#xff0c;还配套了详细的文档和答辩教程&#xff0c;并且是免费开源的。对于正在寻找毕…

作者头像 李华