/************************************************************************** * i.mx6 BusyBox set hosname and L Ogin with root * declaration: * Take BusyBox file system, set device name, log in with root, no password required. * * * 2016-1-16 shenzhen Nanshan Ping Shan village Zengjianfeng ****************************************************** *******************/First, reference documents:1. Linux file system startup process andLoginimplementation of http://read.pudn.com/downloads151/ebook/656465/linux_init_program_intro.pdf 2. Using BusyBox to make embedded Linux file system http://www.jiancool.com/article/6782467490/ 3. BusyBox file System etc directory, loginLogin, Password Password,shadow http://blog.csdn.net/lanmanck/article/details/5218438 4. "Original" solution PS1 display problem, BusyBox's/U/h Special Character parsing problem http://blog.csdn.net/lanmanck/article/details/4360431Second, the configuration content:1、Cat/etc/inittab. Ttymxc0::once:-/bin/Login# Use the login method ...2.Cat/etc/passwd# set root user without password ... root::0:0: root:/root:/bin/Ash ...3.Cat/etc/Group # Set up users and Groups ... root:x:0: Root ...4.Cat/etc/hostname# host name ZENGJF4.Cat/etc/init.d/RcS # Get host name .../bin/hostname-f/etc/hostname ...... 4.Cat/etc/Profile ... HOSTNAME= '/bin/hostname' # Get host name PS1="[\[email protected]\u \w]\#"# Set the display effect in shell export PS1 HOSTNAME # exported to environment variable ... Third, the effect is as follows: Input:usb OPTICAL MOUSE as/DEVICES/PLATFORM/FSL-EHCI.1/usb2/2-1/2-1.2/2-1.2:1.0/input/input4 Generic-usb0003:0000:0538.0001: Input,hidraw0:usb HID v1. OneMouse [USB OPTICAL Mouse] on USB-FSL-EHCI.1-1.2/input0 ZENGJFLogin: RootLogin[1427]: RootLoginOn'ttymxc0'[[Email protected]~]# CD/[[Email protected]/]#lsbin etc linuxrc mnt root sys usr Dev Lib lost+found proc sbin tmp [[email protected]/]# cd/etc/INIT.D [[email protected]/etc/init.d]#lsRcS [[email protected]/etc/init.d]#
i.mx6 BusyBox set Hosname and login with root