Bug 1503496

Summary: FileNotFoundError: [Errno 2] No such file or directory: 'grub2-mkconfig'
Product: [Fedora] Fedora Reporter: Alessio <alciregi>
Component: anacondaAssignee: Peter Jones <pjones>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: alciregi, anaconda-maint-list, awilliam, bugzilla, gmarr, jkonecny, jonathan, kellin, kparal, mkolman, robatino, rvykydal, sumukher, vanmeeuwen+fedora, vpodzime, vponcova, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:bd6950defe69f508078bd7f6446baa4cae752af19e74a0b0ffc21939a5a14e57; AcceptedBlocker
Fixed In Version: anaconda-27.20.4-2 anaconda-27.20.4-4.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-08 22:10:10 UTC Type: ---
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: 1396704    
Attachments:
Description Flags
File: anaconda-tb
none
File: anaconda.log
none
File: dnf.librepo.log
none
File: environ
none
File: hawkey.log
none
File: lorax-packages.log
none
File: lsblk_output
none
File: lvm.log
none
File: nmcli_dev_list
none
File: os_info
none
File: program.log
none
File: storage.log
none
File: syslog
none
File: ifcfg.log
none
File: packaging.log none

Description Alessio 2017-10-18 09:32:26 UTC
Description of problem:
Installing workstation everything

Version-Release number of selected component:
anaconda-27.20.2-1

The following was filed automatically by anaconda:
anaconda 27.20.2-1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python3.6/subprocess.py", line 1333, in _execute_child
    raise child_exception_type(errno_num, err_msg)
  File "/usr/lib64/python3.6/subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/iutil.py", line 205, in startProgram
    preexec_fn=preexec, cwd=root, env=env, **kwargs)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/iutil.py", line 284, in _run_program
    env_prune=env_prune)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/iutil.py", line 360, in execWithRedirect
    log_output=log_output, binary_output=binary_output)[0]
  File "/usr/lib64/python3.6/site-packages/pyanaconda/iutil.py", line 337, in execInSysroot
    return execWithRedirect(command, argv, stdin=stdin, root=getSysroot())
  File "/usr/lib64/python3.6/site-packages/pyanaconda/bootloader.py", line 1578, in write_config
    ["-o", self.config_file])
  File "/usr/lib64/python3.6/site-packages/pyanaconda/bootloader.py", line 1771, in write
    self.write_config()  # pylint: disable=no-member
  File "/usr/lib64/python3.6/site-packages/pyanaconda/bootloader.py", line 2464, in writeBootLoaderFinal
    storage.bootloader.write()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/bootloader.py", line 2541, in writeBootLoader
    writeBootLoaderFinal(storage, payload, instClass, ksdata)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 438, in run_task
    self._task(*self._task_args, **self._task_kwargs)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 472, in start
    self.run_task()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 304, in start
    item.start()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation_tasks.py", line 304, in start
    item.start()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/installation.py", line 365, in doInstall
    installation_queue.start()
  File "/usr/lib64/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/threading.py", line 252, in run
    threading.Thread.run(self)
FileNotFoundError: [Errno 2] No such file or directory: 'grub2-mkconfig'

Additional info:
addons:         com_redhat_docker, com_redhat_kdump
blivet-gui-utils.log: 
cmdline:        /usr/libexec/system-python  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=/images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Fedora-WS-dvd-x86_64-27 quiet
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         4.13.4-300.fc27.x86_64
product:        Fedora
release:        Cannot get release name.
type:           anaconda
version:        27

Comment 1 Alessio 2017-10-18 09:32:43 UTC
Created attachment 1340073 [details]
File: anaconda-tb

Comment 2 Alessio 2017-10-18 09:32:47 UTC
Created attachment 1340074 [details]
File: anaconda.log

Comment 3 Alessio 2017-10-18 09:32:52 UTC
Created attachment 1340075 [details]
File: dnf.librepo.log

Comment 4 Alessio 2017-10-18 09:32:54 UTC
Created attachment 1340076 [details]
File: environ

Comment 5 Alessio 2017-10-18 09:32:56 UTC
Created attachment 1340077 [details]
File: hawkey.log

Comment 6 Alessio 2017-10-18 09:32:58 UTC
Created attachment 1340078 [details]
File: lorax-packages.log

Comment 7 Alessio 2017-10-18 09:33:00 UTC
Created attachment 1340079 [details]
File: lsblk_output

Comment 8 Alessio 2017-10-18 09:33:04 UTC
Created attachment 1340080 [details]
File: lvm.log

Comment 9 Alessio 2017-10-18 09:33:06 UTC
Created attachment 1340081 [details]
File: nmcli_dev_list

Comment 10 Alessio 2017-10-18 09:33:07 UTC
Created attachment 1340082 [details]
File: os_info

Comment 11 Alessio 2017-10-18 09:33:10 UTC
Created attachment 1340083 [details]
File: program.log

Comment 12 Alessio 2017-10-18 09:33:12 UTC
Created attachment 1340084 [details]
File: storage.log

Comment 13 Alessio 2017-10-18 09:33:16 UTC
Created attachment 1340085 [details]
File: syslog

Comment 14 Alessio 2017-10-18 09:33:17 UTC
Created attachment 1340086 [details]
File: ifcfg.log

Comment 15 Alessio 2017-10-18 09:33:22 UTC
Created attachment 1340087 [details]
File: packaging.log

Comment 16 Alessio 2017-10-18 11:21:30 UTC
Similar problem has been detected:

Again. At the end of workstation netinst

addons:         com_redhat_docker, com_redhat_kdump
blivet-gui-utils.log: 
cmdline:        /usr/libexec/system-python  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=/images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Fedora-WS-dvd-x86_64-27 rd.live.check quiet
hashmarkername: anaconda
kernel:         4.13.4-300.fc27.x86_64
package:        anaconda-27.20.2-1
product:        Fedora
reason:         FileNotFoundError: [Errno 2] No such file or directory: 'grub2-mkconfig'
release:        Cannot get release name.
version:        27

Comment 17 Jiri Konecny 2017-10-19 07:04:39 UTC
Hello Alessio,

This looks to me like a problem with compose creation. What compose are you using? Could you please provide link to the boot.iso.

Thank you,
Jirka

Comment 18 Alessio 2017-10-19 07:41:12 UTC
(In reply to Jiri Konecny from comment #17)
> Hello Alessio,
> 
> This looks to me like a problem with compose creation. What compose are you
> using? Could you please provide link to the boot.iso.

Fedora-Workstation-netinst-x86_64-27-20171017.n.0.iso

Comment 19 Radek Vykydal 2017-10-19 08:42:45 UTC
Peter, seems like either we don't require the right packages or there are missing dependencies for Mac?

anaconda.log:

08:48:13,845 INF bootloader: bootloader MacEFIGRUB on MacEFI platform


04:54:08,640 DBG payload: added package requirement 'hfsplus-tools' for storage, strong=True
04:54:08,641 DBG payload: added package requirement 'lvm2' for storage, strong=True
04:54:08,642 DBG payload: added package requirement 'e2fsprogs' for storage, strong=True
04:54:08,642 DBG payload: added package requirement 'mactel-boot' for storage, strong=True
04:54:08,642 DBG payload: no package requirement added for realm
04:54:08,642 DBG payload: added package requirement 'authconfig' for authconfig, strong=True
04:54:08,643 DBG payload: no package requirement added for firewall
04:54:08,643 DBG payload: no package requirement added for network
04:54:08,643 DBG payload: added package requirement 'chrony' for ntp, strong=False
04:54:08,643 DBG payload: added package requirement 'grub2-tools-efi' for bootloader, strong=True
04:54:08,643 DBG payload: added package requirement 'mactel-boot' for bootloader, strong=True

packaging.log:
05:06:57,407 INF packaging: Installed: grub2-tools-minimal-1:2.02-18.fc27.x86_64 1505937712 e4e2cd839379d7b8423b44b7324e779c60d738436f313a4dba29de7b610db9d1
05:13:52,298 INF packaging: Installed: grub2-tools-efi-1:2.02-18.fc27.x86_64 1505937712 1b38f1edf6e3adb281abe3a81c9bd45201f7c1bc3a30bc05770a859cdf67943c

Comment 20 Fedora Blocker Bugs Application 2017-10-19 08:46:23 UTC
Proposed as a Blocker for 27-final by Fedora user jkonecny using the blocker tracking app because:

 The installer must be able to install into free space alongside an existing OS X installation, install and configure a bootloader that will boot Fedora.

Comment 21 Alessio 2017-10-19 08:50:19 UTC
(In reply to Radek Vykydal from comment #19)
> Peter, seems like either we don't require the right packages or there are
> missing dependencies for Mac?

Yes. I forgot to say that I was installing Fedora on a MacBook. However I am installing Fedora as the unique operating system (no dual boot).

Comment 22 Adam Williamson 2017-10-19 18:06:34 UTC
https://github.com/rhinstaller/anaconda/pull/1222

Comment 23 Adam Williamson 2017-10-19 18:09:23 UTC
Can someone please test with this updates image:

https://www.happyassassin.net/updates/1503496.0.img

and see if it works? Thanks! To test, boot the installer with parameter:

inst.updates=https://www.happyassassin.net/updates/1503496.0.img

Comment 24 Adam Williamson 2017-10-19 21:00:11 UTC
BTW, +1 blocker on this.

Comment 25 sumantro 2017-10-21 10:23:17 UTC
This is a Blocker for me +1

Comment 26 Geoffrey Marr 2017-10-23 19:27:57 UTC
Discussed during the 2017-10-23 blocker review meeting: [1]

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

"The installer must be able to install into free space alongside an existing OS X installation, install and configure a bootloader that will boot Fedora" (and all 'must complete installation' criteria for Macs)

[1] https://meetbot.fedoraproject.org/fedora-blocker-review/2017-10-23/f27-blocker-review.2017-10-23-16.00.txt

Comment 27 Alessio 2017-10-24 10:51:58 UTC
I have an issue.

Adding inst.updates=https://www.happyassassin.net/updates/1503496.0.img in grub, I'm then unable to boot, since ctrl-x doesn't work on the macbook.
Maybe I'm a little dumb, but I'm unable to boot...

Comment 28 Adam Williamson 2017-10-24 21:58:38 UTC
hah, I'm sure there's some way you can get through it on a Mac keyboard, but I'm afraid I don't know what it is :/ cmurf, do you know by any chance? How to edit kernel parameters for installer boot on a Mac, and continue with the boot once you're done editing?

Comment 29 Jiri Konecny 2017-10-25 06:22:46 UTC
Ups, it looks like we have had this Ctrl + X problem reported on the bug 1253637 and closed as EOL :( . Also I'm able to find this issue on many places on the internet without a successful solution.

Comment 30 Adam Williamson 2017-10-25 16:14:08 UTC
That bug report says "A workaround is to use F10 which is not mentioned."...

Comment 31 Alessio 2017-10-26 08:18:48 UTC
(In reply to Adam Williamson from comment #30)
> That bug report says "A workaround is to use F10 which is not mentioned."...

Indeed it works.

But adding inst.updates=https://www.happyassassin.net/updates/1503496.0.img to linuxefi line, dracut throws many errors and exit to a shell.

Comment 32 Adam Williamson 2017-10-26 16:17:41 UTC
Huh, that's odd. What errors?

Comment 33 Fedora Update System 2017-10-26 17:00:58 UTC
anaconda-27.20.4-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-501b8f778f

Comment 34 Fedora Update System 2017-10-27 18:49:27 UTC
anaconda-27.20.4-2.fc27 has been pushed to the Fedora 27 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-501b8f778f

Comment 35 Fedora Update System 2017-10-30 15:58:44 UTC
anaconda-27.20.4-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-501b8f778f

Comment 36 Fedora Update System 2017-10-31 19:09:22 UTC
anaconda-27.20.4-3.fc27 has been pushed to the Fedora 27 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-501b8f778f

Comment 37 Adam Williamson 2017-11-02 00:19:57 UTC
The RC-1.2 compose (aka Fedora-27-20171101.0) includes this fix. Can anyone with a Mac please test with that compose and report whether install now works or not? https://kojipkgs.fedoraproject.org/compose/27/Fedora-27-20171101.0/

Comment 38 Alessio 2017-11-02 09:53:12 UTC
(In reply to Adam Williamson from comment #37)
> The RC-1.2 compose (aka Fedora-27-20171101.0) includes this fix. Can anyone
> with a Mac please test with that compose and report whether install now
> works or not?
> https://kojipkgs.fedoraproject.org/compose/27/Fedora-27-20171101.0/

Using Fedora-Workstation-netinst-x86_64-27-1.2.iso I hit another problem.

"The following error occurred while installing. This is a fatal error and installation will be aborted.

DNF error: Non-fatal <unknown> scriptlet failure in rpm package mactel-boot"

Exit installer is the only option.

https://alciregi.fedorapeople.org/screenshot/IMG_20171102_104330.jpg

Comment 39 Jiri Konecny 2017-11-02 13:04:02 UTC
Hello Alessio,

That is bug in a mactel-boot package scriptlet and they need to fix it. It is different bug which needs to be solved by different component. Could you please file a new bug for this issue?

Thanks,
Jirka

Comment 40 Alessio 2017-11-02 13:05:37 UTC
(In reply to Jiri Konecny from comment #39)
> Hello Alessio,
> 
> That is bug in a mactel-boot package scriptlet and they need to fix it. It
> is different bug which needs to be solved by different component. Could you
> please file a new bug for this issue?

Sure. Thank you.

Comment 41 Alessio 2017-11-02 15:25:46 UTC
(In reply to Adam Williamson from comment #37)
> The RC-1.2 compose (aka Fedora-27-20171101.0) includes this fix. Can anyone
> with a Mac please test with that compose and report whether install now
> works or not?
> https://kojipkgs.fedoraproject.org/compose/27/Fedora-27-20171101.0/

Using Fedora-Workstation-Live-x86_64-27-1.2.iso the installation was successful without any issue.

Comment 42 Adam Williamson 2017-11-02 15:35:49 UTC
Well, that sorta makes sense, because package scriptlets won't run during a live install, as no package installs are happening. It does make me curious as to what happened during the live image compose when that scriptlet ran, though.

The scriptlet in the mactel-boot package - there's only one - is a triggerin:

%triggerin -- grub-efi grub2-efi fedora-logos generic-logos
/usr/libexec/mactel-boot-setup

which basically means 'any time mactel-boot is already installed and any of (grub-efi grub2-efi fedora-logos generic-logos) gets installed, or any time one of those is already installed and mactel-boot gets installed, run /usr/libexec/mactel-boot-setup'. So presumably that's what happened. One way of figuring out more about the problem would just be to chroot into the installed system environment (within the installer, after install fails) and run /usr/libexec/mactel-boot-setup manually, and see what happens...

Comment 43 Alessio 2017-11-02 16:23:07 UTC
(In reply to Adam Williamson from comment #42)
> Well, that sorta makes sense, because package scriptlets won't run during a
> live install, as no package installs are happening. It does make me curious
> as to what happened during the live image compose when that scriptlet ran,
> though.
> 
> The scriptlet in the mactel-boot package - there's only one - is a triggerin:
> 
> %triggerin -- grub-efi grub2-efi fedora-logos generic-logos
> /usr/libexec/mactel-boot-setup
> 
> which basically means 'any time mactel-boot is already installed and any of
> (grub-efi grub2-efi fedora-logos generic-logos) gets installed, or any time
> one of those is already installed and mactel-boot gets installed, run
> /usr/libexec/mactel-boot-setup'. So presumably that's what happened. One way
> of figuring out more about the problem would just be to chroot into the
> installed system environment (within the installer, after install fails) and
> run /usr/libexec/mactel-boot-setup manually, and see what happens...

mactel-boot-setup doesn't print anything
however the errorlevel is 1

Comment 44 Alessio 2017-11-02 16:30:43 UTC
Btw I've filed this bug: bug 1508899

Comment 45 Fedora Update System 2017-11-02 20:50:36 UTC
anaconda-27.20.4-4.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-501b8f778f

Comment 46 Kamil Páral 2017-11-03 11:24:26 UTC
I tried RC1.2 Everything netinst with minimal install as a single system and encountered no problems on Mac Mini.

Then tried RC1.3 Everything netinst with minimal install as a single system, RC1.3 Workstation netinst with Workstation set into dual boot and RC1.3 Workstation Live into dual boot, all worked fine.

Comment 47 Fedora Update System 2017-11-04 18:01:14 UTC
anaconda-27.20.4-4.fc27 has been pushed to the Fedora 27 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-501b8f778f

Comment 48 Fedora Update System 2017-11-08 22:10:10 UTC
anaconda-27.20.4-4.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.