Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1438046

Summary: initial-setup.service: Failed to set up stdin: Inappropriate ioctl for device
Product: [Fedora] Fedora Reporter: Paul Whalen <pwhalen>
Component: initial-setupAssignee: Martin Kolman <mkolman>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: alciregi, awilliam, gmarr, lbrabec, mkolman, pbrobinson, robatino, vpodzime
Target Milestone: ---   
Target Release: ---   
Hardware: armhfp   
OS: Linux   
Whiteboard: AcceptedBlocker
Fixed In Version: initial-setup-0.3.44-1 initial-setup-0.3.46-2.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-03 17:38:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 245418, 1349186    

Description Paul Whalen 2017-03-31 17:52:39 UTC
Description of problem:
On some hardware, initial-setup fails to run as expected. 

Version-Release number of selected component (if applicable):
initial-setup-gui-0.3.43-3.fc26.armv7hl

How reproducible:
On affected hardware, always. 

Steps to Reproduce:
1. Boot desktop images on Allwinner (Banana Pi, Cubietruck, etc)

Actual results:
Boots to log in screen. 

 systemctl status initial-setup
● initial-setup.service - Initial Setup configuration program
   Loaded: loaded (/usr/lib/systemd/system/initial-setup.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2017-03-01 16:43:32 EST; 4 weeks 1 days ago
  Process: 732 ExecStart=/usr/libexec/initial-setup/run-initial-setup (code=exited, status=208/STDIN)
  Process: 731 ExecStartPre=/bin/plymouth quit (code=exited, status=208/STDIN)
  Process: 712 ExecStartPre=/bin/kill -55 1 (code=exited, status=0/SUCCESS)
 Main PID: 732 (code=exited, status=208/STDIN)

Mar 01 16:43:32 localhost systemd[1]: Starting Initial Setup configuration program...
Mar 01 16:43:32 localhost systemd[731]: initial-setup.service: Failed to set up stdin: Inappropriate ioctl for device
Mar 01 16:43:32 localhost systemd[732]: initial-setup.service: Failed to set up stdin: Inappropriate ioctl for device
Mar 01 16:43:32 localhost systemd[1]: initial-setup.service: Main process exited, code=exited, status=208/STDIN
Mar 01 16:43:32 localhost systemd[1]: Failed to start Initial Setup configuration program.
Mar 01 16:43:32 localhost systemd[1]: initial-setup.service: Unit entered failed state.
Mar 01 16:43:32 localhost systemd[1]: initial-setup.service: Failed with result 'exit-code'.

Additional info:

Adding 'console=tty1' to the kernel args boots to initial-setup as expected. Unaffected hardware includes Raspberry Pi 2/3, Wandboard Quad(imx.6).

Comment 1 Paul Whalen 2017-04-10 15:12:58 UTC
Nominating as a blocker for Beta, criteria - "Release-blocking ARM disk images must boot to the initial-setup utility.". This affects at least some of the supported Allwinner boards.

Comment 2 Geoffrey Marr 2017-04-10 20:22:39 UTC
Discussed during the 2017-04-10 blocker review meeting: [1]

The decision to classify this bug as an AcceptedBlocker was made as it violates the following criteria:

"Release-blocking ARM disk images must boot to the initial-setup utility."

[1] https://meetbot.fedoraproject.org/fedora-blocker-review/2017-04-10/f26-blocker-review.2017-04-10-16.01.txt

Comment 3 Adam Williamson 2017-05-01 23:06:56 UTC
Ping? where are we with this?

Comment 4 Alessio 2017-05-12 12:43:20 UTC
*** Bug 1449391 has been marked as a duplicate of this bug. ***

Comment 5 Martin Kolman 2017-05-12 15:00:19 UTC
A pull request with a fix for this bug has been submitted for review:
https://github.com/rhinstaller/initial-setup/pull/27

Implementation of the fix is described in the the commit message.

Comment 6 Martin Kolman 2017-05-12 15:43:47 UTC
An scratch build for easy testing:

https://koji.fedoraproject.org/koji/taskinfo?taskID=19509426

Note: Due to an unrelated Anaconda bug you need to run Initial Setup in reconfig mode:

touch /.unconfigured
then reboot

Otherwise only a single spoke will be displayed on the Initial Setup TUI hub, triggering the Aanconda side bug.

Comment 7 Alessio 2017-05-12 20:49:11 UTC
(In reply to Martin Kolman from comment #5)
> https://github.com/rhinstaller/initial-setup/pull/27

I'm using a Raspberry Pi 3.
I created an SD card using arm-image-installer with Fedora-Minimal-armhfp-26-20170504.n.1-sda.raw.xz. 
After that I mounted the SD on my PC. Then downloaded the 4 files from github, and copied them in the related paths:

sudo cp common.py /run/media/alessio/__/usr/lib/python3.6/site-packages/initial_setup/common.py 
sudo cp initial-setup.service /run/media/alessio/__/usr/lib/systemd/system/initial-setup.service
sudo cp __init__.py /run/media/alessio/__/usr/lib/python3.6/site-packages/initial_setup/__init__.py
sudo cp tui.py /run/media/alessio/__/usr/lib/python3.6/site-packages/initial_setup/tui/tui.py

Booted the Rasperry with such SD card I can confirm that the initial-setup process starts and it works.

Thanks.

Comment 8 Fedora Update System 2017-05-15 18:54:40 UTC
initial-setup-0.3.44-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d45e5287f

Comment 9 Fedora Update System 2017-05-16 06:10:05 UTC
initial-setup-0.3.44-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d45e5287f

Comment 10 Paul Whalen 2017-05-16 13:31:59 UTC
Same error on the XFCE image(Banana Pi):

rpm -q initial-setup initial-setup-gui
initial-setup-0.3.44-1.fc26.armv7hl
initial-setup-gui-0.3.44-1.fc26.armv7hl

[root@localhost ~]# systemctl status initial-setup
● initial-setup.service - Initial Setup configuration program
   Loaded: loaded (/usr/lib/systemd/system/initial-setup.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2017-03-01 16:43:34 EST; 2 months 14 days ago
  Process: 599 ExecStart=/usr/libexec/initial-setup/run-initial-setup (code=exited, status=208/STDIN)
  Process: 596 ExecStartPre=/bin/plymouth quit (code=exited, status=208/STDIN)
  Process: 562 ExecStartPre=/bin/kill -55 1 (code=exited, status=0/SUCCESS)
 Main PID: 599 (code=exited, status=208/STDIN)

Mar 01 16:43:30 localhost systemd[1]: Starting Initial Setup configuration program...
Mar 01 16:43:34 localhost systemd[596]: initial-setup.service: Failed to set up stdin: Inappropriate ioctl for device
Mar 01 16:43:34 localhost systemd[1]: initial-setup.service: Main process exited, code=exited, status=208/STDIN
Mar 01 16:43:34 localhost systemd[1]: Failed to start Initial Setup configuration program.
Mar 01 16:43:34 localhost systemd[1]: initial-setup.service: Unit entered failed state.
Mar 01 16:43:34 localhost systemd[1]: initial-setup.service: Failed with result 'exit-code'.

Comment 11 Adam Williamson 2017-05-16 19:27:38 UTC
mkolman: what's the deal with the 'unrelated anaconda bug' you mention when only one spoke would be displayed in i-s? Is there a bug report for that?

Comment 12 Martin Kolman 2017-05-17 09:57:34 UTC
(In reply to Adam Williamson from comment #11)
> mkolman: what's the deal with the 'unrelated anaconda bug' you mention when
> only one spoke would be displayed in i-s? Is there a bug report for that?
As no one reported anything my theory is that it's something that has been introduced since the latest F26 Anaconda build. But I'm afraid it could also be that no one just hit it yet, as you need to:

- run the Initial Setup TUI
- there needs to be just a single spoke present (usually the user creation spoke)

This means people on ARM won't hit it as they have more than one spoke on the hub due to the reconfig mode. And most of regular installations also won't hit it as tehy are using the Initial Setup GUI, Gnome Initial Setup or nothing at all (if user is created during the installation).

In any case this is the PR that should fix it:
https://github.com/rhinstaller/anaconda/pull/1060

I've just merged it, which means that Rawhide & F26 should be fine once a new build is done. I can also cherry pick it to a F26 build during freeze if it *does* happen on current F26 & gets a FE/blocker.

Comment 13 Fedora Update System 2017-05-17 16:19:14 UTC
initial-setup-0.3.45-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d45e5287f

Comment 14 Fedora Update System 2017-05-18 19:03:28 UTC
initial-setup-0.3.45-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d45e5287f

Comment 15 Fedora Update System 2017-05-25 09:44:12 UTC
anaconda-26.21.7-1.fc26 initial-setup-0.3.46-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d45e5287f

Comment 16 Fedora Update System 2017-05-25 19:16:54 UTC
anaconda-26.21.7-1.fc26, initial-setup-0.3.46-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d45e5287f

Comment 17 Paul Whalen 2017-05-30 19:56:27 UTC
initial-setup-0.3.46-2.fc26 tui working on beaglebone black, password issues are now fixed.

Comment 18 Lukas Brabec 2017-05-31 10:16:55 UTC
Tested F26 Beta 1.3 (with initial-setup-0.3.45-1.fc26) on Raspberry Pi 3 (serial) and Banana Pi (serial and hdmi), works for me with the exception of the password issue.

Comment 19 Fedora Update System 2017-06-03 17:38:05 UTC
anaconda-26.21.7-1.fc26, initial-setup-0.3.46-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.