How to Configure Debian for autobooting

 
Summary:
This article explain how to configure Debian for autobooting
 
Steps:
 
1: pls write a program named 'autologin.c',the content of it is as below.
 
autologin.c --> autologin
 
Code
/* autologin.c */
#include
<stdio.h>
int main() 
{
    execlp( 
"login""login""-f""root"0);
}
/* end of autologin */
 
 
2: compile autologin.c
Code
[root@Embedded001]#gcc -o3 -o autologin autologin.c
 
3: copy the binary file 'autologin' to the directory '/sbin'
 
Code
cp autologin /sbin/
 
4: edit the initializal file '/etc/inittab', change the line like this:
 
Code
   1:2345:respawn:/sbin/getty --/sbin/autologin 38400 tty1
 
5: reboot your system and see the result.

你可能感兴趣的:(Debian)