In iMX6 linux how to remove freescale rootfs login authentication.

cancel
Showing results for 
Search instead for 
Did you mean: 

In iMX6 linux how to remove freescale rootfs login authentication.

Jump to solution
2,503 Views
aravinthkumarja
Senior Contributor II

Hi,

i want to add a script into freescale file system, and also run automatically when iMX6 linux booted. So can you help me,

=> How to remove freescale rootfs login.

=> How to add script and run automatically when iMX6 linux booted, Where i add that script and script run command also.

Labels (6)
1 Solution
605 Views
b36401
NXP TechSupport
NXP TechSupport

You need to add "--autologin root" parameter

into the line with "respawn:/sbin/getty" option in /etc/inittab.

Have a great day,

Victor

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

View solution in original post

18 Replies
606 Views
b36401
NXP TechSupport
NXP TechSupport

You need to add "--autologin root" parameter

into the line with "respawn:/sbin/getty" option in /etc/inittab.

Have a great day,

Victor

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

View solution in original post

605 Views
chandraevolute
Contributor V

there are so many etc/inittab, in which file i need to write

/home/fsl-release-bsp/core-image-base/tmp/work/imx6ulevk-poky-linux-gnueabi/core-image-base/1.0-r0/rootfs/etc/inittab

/home/fsl-release-bsp/core-image-base/tmp/work/imx6ulevk-poky-linux-gnueabi/sysvinit-inittab/2.88dsf-r10/inittab

/home/fsl-release-bsp/core-image-base/tmp/work/imx6ulevk-poky-linux-gnueabi/sysvinit-inittab/2.88dsf-r10/package/etc/inittab

/home/fsl-release-bsp/core-image-base/tmp/work/imx6ulevk-poky-linux-gnueabi/sysvinit-inittab/2.88dsf-r10/packages-split/sysvinit-inittab/etc/inittab

/home/fsl-release-bsp/core-image-base/tmp/work/imx6ulevk-poky-linux-gnueabi/sysvinit-inittab/2.88dsf-r10/image/etc/inittab

0 Kudos
605 Views
aravinthkumarja
Senior Contributor II

Hi chandrasekhar​,

Add in below mention file.

/home/fsl-release-bsp/core-image-base/tmp/work/imx6ulevk-poky-linux-gnueabi/sysvinit-inittab/2.88dsf-r10/inittab

Regards,

Aravinth

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

0 Kudos
605 Views
chandraevolute
Contributor V

hi did the same thing, after bootup I am getting error getty doesnt recognize command -a

I tried with --autologion option also. I got the same error getty doesn,t recognize --autologin

and kernel hangs up for 5 minutes and then again throes the error for every 5 minutes

0 Kudos
605 Views
aravinthkumarja
Senior Contributor II

Hi chandrasekhar

Can you attach your inittab file here.

Regards,

Aravinth

0 Kudos
605 Views
chandraevolute
Contributor V

Hi aravinthkumarjayaprakasam

# /etc/inittab: init(8) configuration.

# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

# The default runlevel.

id:5:initdefault:

# Boot-time system configuration/initialization script.

# This is run first except when booting in emergency (-b) mode.

si::sysinit:/etc/init.d/rcS

# What to do in single-user mode.

~~:S:wait:/sbin/sulogin

# /etc/init.d executes the S and K scripts upon change

# of runlevel.

#

# Runlevel 0 is halt.

# Runlevel 1 is single-user.

# Runlevels 2-5 are multi-user.

# Runlevel 6 is reboot.

l0:0:wait:/etc/init.d/rc 0

l1:1:wait:/etc/init.d/rc 1

l2:2:wait:/etc/init.d/rc 2

l3:3:wait:/etc/init.d/rc 3

l4:4:wait:/etc/init.d/rc 4

l5:5:wait:/etc/init.d/rc 5

l6:6:wait:/etc/init.d/rc 6

# Normally not reached, but fallthrough in case of emergency.

z6:6:respawn:/sbin/sulogin

mxc0:12345:respawn:/sbin/getty --autologin root -L 115200 ttymxc0

# /sbin/getty invocations for the runlevels.

#

# The "id" field MUST be the same as the last

# characters of the device (after "tty").

#

# Format:

#  <id>:<runlevels>:<action>:<process>

#

1:12345:respawn:/sbin/getty 38400 tty1

this is my inittab

0 Kudos
605 Views
aravinthkumarja
Senior Contributor II

Hi chandrasekhar​,

Can you add like this,

mxc0:12345:respawn:/sbin/getty -L 115200 ttymxc0 --autologin root

Regards,

Aravinth

0 Kudos
605 Views
chandraevolute
Contributor V

hi aravinthkumarjayaprakasam

tried the way you told again same issue

Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

/sbin/getty: unrecognized option '--autologin'

BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.

Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

/sbin/getty: unrecognized option '--autologin'

BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.

Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

/sbin/getty: unrecognized option '--autologin'

BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.

Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

/sbin/getty: unrecognized option '--autologin'

BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.

Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

/sbin/getty: unrecognized option '--autologin'

BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.

Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

/sbin/getty: unrecognized option '--autologin'

BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.

Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

/sbin/getty: unrecognized option '--autologin'

BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.

Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

/sbin/getty: unrecognized option '--autologin'

BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.

Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

/sbin/getty: unrecognized option '--autologin'

BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.

Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

INIT: Id "mxc0" respawning too fast: disabled for 5 minutes

0 Kudos
605 Views
BiyongSUN
NXP Employee
NXP Employee

replace the login like following.

null::respawn:/bin/bash

0 Kudos
605 Views
onursengoz
Contributor II

Hi,

I could not understand what you mean but I did something like this;

null::respawn:/sbin/getty -L 115200 ttymxc0 --autologin root

But this did not work.

I found another solution which works;

1:2345:respawn:/bin/login -f root ttymxc0 </dev/ttymxc0 >/dev/ttymxc0 2>&1

Thanks..

605 Views
chandraevolute
Contributor V

this worked for me......remember it will set the baudrate to 38400 so we naeed to to write -L 115200 additionally

0 Kudos
605 Views
BiyongSUN
NXP Employee
NXP Employee

replace

null::respawn:/sbin/getty -L 115200 ttymxc0 --autologin root

with

null::respawn:/bin/bash

0 Kudos
605 Views
aravinthkumarja
Senior Contributor II

Hi,

Create autologin script located in /usr/bin. This script should contain following data.

#!/bin/sh

exec /bin/login -f usename

You have to change the /etc/inittab getty login line as follows:

mxc0:12345:respawn:/sbin/getty -l /usr/bin/autologin -n -L 115200 ttymxc0

Regards,

Aravinth

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

0 Kudos
605 Views
chandraevolute
Contributor V

Hi aravinthkumarjayaprakasam

do I need to add in any of the .bb file. I want it to be part of my build.Sorry for my basic questions.

Thanks

Chandrasekhar

0 Kudos
605 Views
aravinthkumarja
Senior Contributor II

Hi chandra sekhar,

First you try manually. If it's works then i will tell you how to add in yocto bsp

Regards,

Aravinth

0 Kudos
605 Views
onursengoz
Contributor II

Can you please go on this?

Thanks..

0 Kudos
605 Views
aravinthkumarja
Senior Contributor II

sure!

0 Kudos
605 Views
onursengoz
Contributor II

Hi,

I tried both solutions you have provided but they do not work.

For script solution, it says; getty: ttymxc0: can't execute '/usr/bin/autologin'

For --autologin option it says;

/sbin/getty: unrecognized option '--autologin'

BusyBox v1.23.1 (2016-08-12 11:49:01 EEST) multi-call binary.

Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

...

Can you please help on this? Thanks..

0 Kudos