All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] cannot log to my build root
@ 2010-12-14 13:06 Diego Iastrubni
  2010-12-14 13:25 ` Thomas Petazzoni
  0 siblings, 1 reply; 14+ messages in thread
From: Diego Iastrubni @ 2010-12-14 13:06 UTC (permalink / raw)
  To: buildroot

Hi all,

I am using buitdroot to create my development environment (the production is
something bigger and slower made manually once...). I am using codesourcery
for arm as the toolchain. the HW (which is not relevant  to the scenario) is
an OMAP3 device boots with my old firmware).

I forked (I use git and not released versions)  buildroot a few months and
its worked after I manually mknod'ed some devices. Now I pulled from you
guys, and now I cannot even login to my new clean environment (last time it
was /dev/tty ,which was not correct). Does anyone have an idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101214/972fa94b/attachment.html>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 13:06 [Buildroot] cannot log to my build root Diego Iastrubni
@ 2010-12-14 13:25 ` Thomas Petazzoni
  2010-12-14 13:39   ` Diego Iastrubni
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2010-12-14 13:25 UTC (permalink / raw)
  To: buildroot

On Tue, 14 Dec 2010 15:06:43 +0200
Diego Iastrubni <diegoiast@gmail.com> wrote:

> I am using buitdroot to create my development environment (the
> production is something bigger and slower made manually once...). I
> am using codesourcery for arm as the toolchain. the HW (which is not
> relevant  to the scenario) is an OMAP3 device boots with my old
> firmware).
> 
> I forked (I use git and not released versions)  buildroot a few
> months and its worked after I manually mknod'ed some devices. Now I
> pulled from you guys, and now I cannot even login to my new clean
> environment (last time it was /dev/tty ,which was not correct). Does
> anyone have an idea?

What is your boot log ?

Quite likely, you should read
http://buildroot.org/downloads/buildroot.html#faq-boot-hangs, but there
may be other problems as well, of course.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 13:25 ` Thomas Petazzoni
@ 2010-12-14 13:39   ` Diego Iastrubni
  2010-12-14 14:05     ` Thomas Petazzoni
  0 siblings, 1 reply; 14+ messages in thread
From: Diego Iastrubni @ 2010-12-14 13:39 UTC (permalink / raw)
  To: buildroot

Nope. In my original case /dev/tty was not a char device (a null file
instead). Creating these files fixed the problem:

rm -fr $ROOT/dev/*


mknod $ROOT/dev/tty     c 5 0


mknod $ROOT/dev/console c 5 1


mknod $ROOT/dev/null    c 1 3


mknod $ROOT/dev/tty0    c 4 0


mknod $ROOT/dev/tty1    c 4 1


mknod $ROOT/dev/tty2    c 4 2


mknod $ROOT/dev/tty3    c 4 3


mknod $ROOT/dev/ttyS0   c 4 64

(I only need the very basic before udev starts).

If I write "/bin/sh" at /etc/init.d/rc.S I *do* get a working shell, so my
problem is with login.

On Tue, Dec 14, 2010 at 3:25 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> On Tue, 14 Dec 2010 15:06:43 +0200
> Diego Iastrubni <diegoiast@gmail.com> wrote:
>
> > I am using buitdroot to create my development environment (the
> > production is something bigger and slower made manually once...). I
> > am using codesourcery for arm as the toolchain. the HW (which is not
> > relevant  to the scenario) is an OMAP3 device boots with my old
> > firmware).
> >
> > I forked (I use git and not released versions)  buildroot a few
> > months and its worked after I manually mknod'ed some devices. Now I
> > pulled from you guys, and now I cannot even login to my new clean
> > environment (last time it was /dev/tty ,which was not correct). Does
> > anyone have an idea?
>
> What is your boot log ?
>
> Quite likely, you should read
> http://buildroot.org/downloads/buildroot.html#faq-boot-hangs, but there
> may be other problems as well, of course.
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101214/d5f9be56/attachment.html>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 13:39   ` Diego Iastrubni
@ 2010-12-14 14:05     ` Thomas Petazzoni
  2010-12-14 14:38       ` Diego Iastrubni
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2010-12-14 14:05 UTC (permalink / raw)
  To: buildroot

On Tue, 14 Dec 2010 15:39:45 +0200
Diego Iastrubni <diegoiast@gmail.com> wrote:

> Nope. In my original case /dev/tty was not a char device (a null file
> instead). Creating these files fixed the problem:

This is because you are using the output/target/ directory, but you
should *not* do this. From the Buildroot documentation:

?
target/ which contains almost the complete root filesystem for the
target: everything needed is present except the device files in /dev/
(Buildroot can't create them because Buildroot doesn't run as root and
doesn't want to run as root). Therefore, this directory should not be
used on your target. Instead, you should use one of the images built in
the images/ directory. If you need an extracted image of the root
filesystem for booting over NFS, then use the tarball image generated
in images/ and extract it as root.
?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 14:05     ` Thomas Petazzoni
@ 2010-12-14 14:38       ` Diego Iastrubni
  2010-12-14 14:42         ` Thomas Petazzoni
  0 siblings, 1 reply; 14+ messages in thread
From: Diego Iastrubni @ 2010-12-14 14:38 UTC (permalink / raw)
  To: buildroot

Still no go. I do see the dev directory filled, and still login prevents me
from logging (both root and default, which should have an empty value.
correct?).

Tried with the full device list, and with the mini version.

On Tue, Dec 14, 2010 at 4:05 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> On Tue, 14 Dec 2010 15:39:45 +0200
> Diego Iastrubni <diegoiast@gmail.com> wrote:
>
> > Nope. In my original case /dev/tty was not a char device (a null file
> > instead). Creating these files fixed the problem:
>
> This is because you are using the output/target/ directory, but you
> should *not* do this. From the Buildroot documentation:
>
> ?
> target/ which contains almost the complete root filesystem for the
> target: everything needed is present except the device files in /dev/
> (Buildroot can't create them because Buildroot doesn't run as root and
> doesn't want to run as root). Therefore, this directory should not be
> used on your target. Instead, you should use one of the images built in
> the images/ directory. If you need an extracted image of the root
> filesystem for booting over NFS, then use the tarball image generated
> in images/ and extract it as root.
> ?
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101214/f3386710/attachment.html>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 14:38       ` Diego Iastrubni
@ 2010-12-14 14:42         ` Thomas Petazzoni
  2010-12-14 14:54           ` Diego Iastrubni
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2010-12-14 14:42 UTC (permalink / raw)
  To: buildroot

On Tue, 14 Dec 2010 16:38:47 +0200
Diego Iastrubni <diegoiast@gmail.com> wrote:

> Still no go. I do see the dev directory filled, and still login prevents me
> from logging (both root and default, which should have an empty value.
> correct?).

What is your .config ?

Do you see a login prompt ? Could you post your boot log, please ?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 14:42         ` Thomas Petazzoni
@ 2010-12-14 14:54           ` Diego Iastrubni
  2010-12-14 15:05             ` Thomas Petazzoni
  0 siblings, 1 reply; 14+ messages in thread
From: Diego Iastrubni @ 2010-12-14 14:54 UTC (permalink / raw)
  To: buildroot

Config and boot attached (compressed, I hope you don't mind). I do see this
in the boot logs:


VFS: Mounted root (nfs filesystem) on device 0:12.
Freeing init memory: 152K
Populating /dev using udev: done
Initializing random number generator... read-only file system
detected...done
Starting network...
ip: RTNETLINK answers: File exists
GPIO_M: init
usbcore: registered new interface driver fjveincam
v2.21:USB PalmVeinCam driver
net eth0: MAC Address: 00:11:22:33:44:57
*/bin/sh: can't access tty; job control turned off*


The line before comes from some S90* init.d script (this is OK). I don't
understand where does it come from.

On Tue, Dec 14, 2010 at 4:42 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> On Tue, 14 Dec 2010 16:38:47 +0200
> Diego Iastrubni <diegoiast@gmail.com> wrote:
>
> > Still no go. I do see the dev directory filled, and still login prevents
> me
> > from logging (both root and default, which should have an empty value.
> > correct?).
>
> What is your .config ?
>
> Do you see a login prompt ? Could you post your boot log, please ?
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101214/27e5322b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boot.txt.gz
Type: application/x-gzip
Size: 3563 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101214/27e5322b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.gz
Type: application/x-gzip
Size: 3815 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101214/27e5322b/attachment-0003.bin>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 14:54           ` Diego Iastrubni
@ 2010-12-14 15:05             ` Thomas Petazzoni
  2010-12-14 15:28               ` Diego Iastrubni
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2010-12-14 15:05 UTC (permalink / raw)
  To: buildroot

On Tue, 14 Dec 2010 16:54:00 +0200
Diego Iastrubni <diegoiast@gmail.com> wrote:

> VFS: Mounted root (nfs filesystem) on device 0:12.
> Freeing init memory: 152K
> Populating /dev using udev: done
> Initializing random number generator... read-only file system
> detected...done
> Starting network...
> ip: RTNETLINK answers: File exists
> GPIO_M: init
> usbcore: registered new interface driver fjveincam
> v2.21:USB PalmVeinCam driver
> net eth0: MAC Address: 00:11:22:33:44:57
> */bin/sh: can't access tty; job control turned off*
> 
> The line before comes from some S90* init.d script (this is OK). I don't
> understand where does it come from.

This last line "can't access tty; job control turned off" means that
the shell has been started directly on /dev/console, which is normal is
you start a shell directly from an init.d script, because those scripts
are executed with /dev/console as the standard input, standard output,
standard err.

You really having *nothing* else on the serial line after what you
sent ?

According to your Buildroot configuration, your /etc/inittab should
contain a line :

ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL

and you should see a login prompt on this serial line.

It's the /etc/inittab file that decides on which terminals a login
prompt should appear, by starting a getty program on those terminals.

What does your /etc/inittab look like ?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 15:05             ` Thomas Petazzoni
@ 2010-12-14 15:28               ` Diego Iastrubni
  2010-12-14 15:37                 ` Thomas Petazzoni
  2010-12-14 15:50                 ` William Wagner
  0 siblings, 2 replies; 14+ messages in thread
From: Diego Iastrubni @ 2010-12-14 15:28 UTC (permalink / raw)
  To: buildroot

On Tue, Dec 14, 2010 at 5:05 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> This last line "can't access tty; job control turned off" means that
> the shell has been started directly on /dev/console, which is normal is
> you start a shell directly from an init.d script, because those scripts
> are executed with /dev/console as the standard input, standard output,
> standard err.
>

Not that I am aware of.


>
> You really having *nothing* else on the serial line after what you
> sent ?
>
> There is the application I am developing. It sends text to stdout, which is
on the serial console (as you described above).


> According to your Buildroot configuration, your /etc/inittab should
> contain a line :
>
> ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL
>
/ # cat /etc/inittab | grep getty
# Set up a couple of getty's
tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
# Put a getty on the serial port
ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL


> and you should see a login prompt on this serial line.
>
> It's the /etc/inittab file that decides on which terminals a login
> prompt should appear, by starting a getty program on those terminals.
>
> What does your /etc/inittab look like ?
>

I probably did not express myself properly. I do soo login (which is started
by getty). The only problem is that whatever I do in "login" I get kicked
out -

buildroot login: root
Password: *[just enter]*
Login incorrect

The sad thing is that I do remember that once it did work and I would get by
just typing the username.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101214/870d7bab/attachment.html>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 15:28               ` Diego Iastrubni
@ 2010-12-14 15:37                 ` Thomas Petazzoni
  2010-12-14 15:56                   ` Diego Iastrubni
  2010-12-14 15:50                 ` William Wagner
  1 sibling, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2010-12-14 15:37 UTC (permalink / raw)
  To: buildroot

On Tue, 14 Dec 2010 17:28:54 +0200
Diego Iastrubni <diegoiast@gmail.com> wrote:

> > This last line "can't access tty; job control turned off" means that
> > the shell has been started directly on /dev/console, which is normal is
> > you start a shell directly from an init.d script, because those scripts
> > are executed with /dev/console as the standard input, standard output,
> > standard err.
> 
> Not that I am aware of.

Huh, sorry ?

> I probably did not express myself properly. I do soo login (which is started
> by getty). The only problem is that whatever I do in "login" I get kicked
> out -
> 
> buildroot login: root
> Password: *[just enter]*
> Login incorrect
> 
> The sad thing is that I do remember that once it did work and I would get by
> just typing the username.

Do you have the default /etc/securetty file, the default /etc/passwd
and the default /etc/shadow files ?

I tested a basic Buildroot build just two days ago, and I could log in
as root on ttyS0 without any problem.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 15:28               ` Diego Iastrubni
  2010-12-14 15:37                 ` Thomas Petazzoni
@ 2010-12-14 15:50                 ` William Wagner
  2010-12-14 16:00                   ` Thomas Petazzoni
  1 sibling, 1 reply; 14+ messages in thread
From: William Wagner @ 2010-12-14 15:50 UTC (permalink / raw)
  To: buildroot

On 14/12/2010 15:28, Diego Iastrubni wrote:
>
>     and you should see a login prompt on this serial line.
>
>     It's the /etc/inittab file that decides on which terminals a login
>     prompt should appear, by starting a getty program on those terminals.
>
>     What does your /etc/inittab look like ?
>
>
>
> I probably did not express myself properly. I do soo login (which is 
> started by getty). The only problem is that whatever I do in "login" I 
> get kicked out -
>
> buildroot login: root
> Password: /[just enter]/
> Login incorrect
>
> The sad thing is that I do remember that once it did work and I would 
> get by just typing the username.

I have also seen this. In my case the problem was that I had built an 
eglibc toolchain that had configured too much out (I think it was option 
OPTION_EGLIBC_NIS). Busybox built fine, only login as root failed.

Never got around to debugging it as much faster just to change my 
toolchain to include the necessary option.

Will

-- 
------------------------------------------------------------------------
Will Wagner                                     will_wagner at carallon.com
Development Manager                      Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101214/b4647d4a/attachment-0001.html>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 15:37                 ` Thomas Petazzoni
@ 2010-12-14 15:56                   ` Diego Iastrubni
  2010-12-14 16:00                     ` Thomas Petazzoni
  0 siblings, 1 reply; 14+ messages in thread
From: Diego Iastrubni @ 2010-12-14 15:56 UTC (permalink / raw)
  To: buildroot

!@Z#!@Z$%!@%!@

Just for google referene: I am booting from NFS, and this is what I see on
the device:

/ # cat /etc/shadow
cat: read error: Input/output error

On my desktop:
diego at diego-linux# ls -l /home/diego/rootfs-new/etc/shadow
-rw------- 1 root root 321 2010-10-10 11:33
/home/diego/rootfs-new/etc/shadow
diego at diego-linux# sudo chmod a+r /home/diego/rootfs-new/etc/shadow
[sudo] password for diego:
.......

And now it works. The problem is that shadow was not readable from the
remote NFS.  Now I wait for the correct fix for this problem.

DO NOT FOLLOW THIS ADVISE ON PRODUCTION ENVIRONMENTS AS THIS IS A HUGE
SECURITY HOLE.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101214/d08bedeb/attachment.html>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 15:56                   ` Diego Iastrubni
@ 2010-12-14 16:00                     ` Thomas Petazzoni
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-12-14 16:00 UTC (permalink / raw)
  To: buildroot

On Tue, 14 Dec 2010 17:56:06 +0200
Diego Iastrubni <diegoiast@gmail.com> wrote:

> And now it works. The problem is that shadow was not readable from the
> remote NFS.  Now I wait for the correct fix for this problem.

Ah, that's because your NFS directory is incorrectly exported. You
should use the no_root_squash option.

Otherwise, root accesses from the remote machine are made on the NFS
server as the nobody user, which obviously, can't access the
rootfs/etc/shadow file.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] cannot log to my build root
  2010-12-14 15:50                 ` William Wagner
@ 2010-12-14 16:00                   ` Thomas Petazzoni
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-12-14 16:00 UTC (permalink / raw)
  To: buildroot

On Tue, 14 Dec 2010 15:50:05 +0000
William Wagner <will_wagner@carallon.com> wrote:

> I have also seen this. In my case the problem was that I had built an 
> eglibc toolchain that had configured too much out (I think it was option 
> OPTION_EGLIBC_NIS). Busybox built fine, only login as root failed.
> 
> Never got around to debugging it as much faster just to change my 
> toolchain to include the necessary option.

Yes, but in his case, he is using a well-known CodeSourcery toolchain,
which I also tested, and which works.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-12-14 16:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-14 13:06 [Buildroot] cannot log to my build root Diego Iastrubni
2010-12-14 13:25 ` Thomas Petazzoni
2010-12-14 13:39   ` Diego Iastrubni
2010-12-14 14:05     ` Thomas Petazzoni
2010-12-14 14:38       ` Diego Iastrubni
2010-12-14 14:42         ` Thomas Petazzoni
2010-12-14 14:54           ` Diego Iastrubni
2010-12-14 15:05             ` Thomas Petazzoni
2010-12-14 15:28               ` Diego Iastrubni
2010-12-14 15:37                 ` Thomas Petazzoni
2010-12-14 15:56                   ` Diego Iastrubni
2010-12-14 16:00                     ` Thomas Petazzoni
2010-12-14 15:50                 ` William Wagner
2010-12-14 16:00                   ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.