Bug 8746

Summary: At startup system stops with 'cannot set terminal process group (-1): Inappropriate ioctl for device' error
Product: buildroot Reporter: Ralph Birt <rdbirt>
Component: OtherAssignee: unassigned
Status: RESOLVED INVALID    
Severity: normal CC: buildroot
Priority: P5    
Version: 2015.11   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: buildroot 2016.02-rc2 config file

Description Ralph Birt 2016-03-03 22:09:59 UTC
After updating from buildroot 2015.02 I am seeing this error on system startup:

.
.
.
EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:1.
devtmpfs: mounted
Freeing unused kernel memory: 228K (c07db000 - c0814000)
sh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh: no job control in this shell
sh-4.3# 

The same error occurs with 2016.02-rc2.  I am running this on a Wandboard quad with kernel 3.18.
Comment 1 Peter Korsgaard 2016-03-08 08:27:47 UTC
Is this with our wandboard_defconfig or some kind of customization?
Comment 2 Ralph Birt 2016-03-09 01:16:51 UTC
Created attachment 6381 [details]
buildroot 2016.02-rc2 config file
Comment 3 Ralph Birt 2016-03-09 01:17:53 UTC
It's a custom config file.  Attached here.
Comment 4 Thomas Petazzoni 2016-03-10 14:55:06 UTC
Your boot log shows that the kernel starts /bin/bash directly, but your configuration shows that you're using systemd as the init system. So things aren't matching really well here.

Are you booting with init=/bin/sh perhaps? If that's the case, then I believe it's expected for bash (the shell chosen as the default one in your configuration) to complain this way, because its standard input/output is /dev/console.

See https://lists.gnu.org/archive/html/bug-bash/2013-10/msg00097.html for example.

So, I believe this is not a bug in Buildroot, it is just a misconfiguration of the system on your side.

Peter, what do you think?
Comment 5 Ralph Birt 2016-03-10 17:36:27 UTC
It seems that /sbin has been removed from 2015.11 and is, instead, made a link to /usr/sbin.  So /sbin/init is now /usr/sbin/init.

I have an /sbin directory in my overlay skeleton directory structure so the link to /usr/bin disappears and /sbin now contains just the few files I have there, and those few files don't include /sbin/init.

The solution is for me to change my overlay directory structure so the files I used to put into /sbin will now go into /usr/sbin.

Thanks for looking at this with me.

Regards,
Ralph
Comment 6 Thomas Petazzoni 2016-03-10 20:34:43 UTC
Yes, since 2015.11, we have an option to merge /usr and /. From Buildroot's CHANGES file:

        - Add support for /bin, /sbin and /lib to be symlinks to their
          corresponding directories in /usr. This is enforced for
          systemd configurations, and optional for other
          configurations.

As said above, this is mandatory for systemd (because systemd people expect such a filesystem layout) and optional in other cases. Since you're using systemd, this new organization has been automatically enabled.

I'll mark the patch as invalid then. Thanks for following up!