Set the embedded system boot Automatic startup program

Source: Internet
Author: User

Set the embedded system boot Automatic startup program
We hope that the more simple and easier it is to use the embedded system, the more simple it will be. The first step I will talk about is to simplify the process. The following is a record of my operation steps: to set a self-starting program, two problems need to be solved: 1. Automatic System logon; 2. Automatic script execution; 1) Automatic System Logon (1) Modifying/etc/inittab in inittab, configuration 1: 2345: respawn:/sbin/agetty tty1 9600 2: 2345: respawn:/sbin/agetty tty2 9600 3: 2345: respawn: /sbin/agetty tty3 9600 4: 2345: respawn:/sbin/agetty tty4 9600 5: 2345: respawn:/sbin/agetty tty5 9600 6: 2345: respawn: /sbin/agetty tty6 9600 indicates that the system can have six consoles, and ALT + (F1 ~ F6. While/sbin/agetty is a login verification program. When it is executed, the user is prompted to enter the user name and password, and then start a specified shell (specified in the passwd file ). Therefore, we only need to modify it to not execute agettty, but to execute a script compiled by ourselves, we can skip the user name and password input. Modify as follows: 1: 2345: respawn:/root/logintest tty1 9600 here I have assigned a test script in/root/, so that the script will be executed when the system starts. The script content: #! The/bin/sh/bin/login-f root script actually executes the login of a root user. 2) There are two methods for automatic program execution. One is to put the code to be executed after/root/logintest in 1; the other is to put the code to be executed after the/etc/profile file.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.