Bug 1012646 - anaconda creates grub.cfg lacking an initrd entry, kernel panics on reboot
anaconda creates grub.cfg lacking an initrd entry, kernel panics on reboot
Status: CLOSED DUPLICATE of bug 864198
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Brian Lane
Fedora Extras Quality Assurance
Depends On:
Blocks: F20BetaBlocker
  Show dependency treegraph
Reported: 2013-09-26 15:12 EDT by Chris Murphy
Modified: 2014-05-22 20:11 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1100504 (view as bug list)
Last Closed: 2013-10-11 12:51:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
anaconda grub.cfg (11.26 KB, text/plain)
2013-09-26 15:15 EDT, Chris Murphy
no flags Details
manually created grub.cfg (11.35 KB, text/plain)
2013-09-26 15:17 EDT, Chris Murphy
no flags Details
anaconda.log (103.67 KB, text/plain)
2013-09-26 15:17 EDT, Chris Murphy
no flags Details
program.log (37.77 KB, text/plain)
2013-09-26 15:17 EDT, Chris Murphy
no flags Details
storage.state (36.00 KB, application/octet-stream)
2013-09-26 15:18 EDT, Chris Murphy
no flags Details
storage.log (470.14 KB, text/plain)
2013-09-26 15:18 EDT, Chris Murphy
no flags Details
journalctl output (808.58 KB, text/plain)
2013-09-26 20:19 EDT, Chris Murphy
no flags Details
c12, anaconda.log (67.06 KB, text/plain)
2013-09-26 22:36 EDT, Chris Murphy
no flags Details
c12, journalctl (736.19 KB, text/plain)
2013-09-26 22:37 EDT, Chris Murphy
no flags Details
c12, program.log (37.67 KB, text/plain)
2013-09-26 22:37 EDT, Chris Murphy
no flags Details
c12, storage.log (375.31 KB, text/plain)
2013-09-26 22:37 EDT, Chris Murphy
no flags Details

  None (edit)
Description Chris Murphy 2013-09-26 15:12:40 EDT
Description of problem: An installation of Fedora 20 alpha completes without errors, but on reboot immediately kernel panics. Upon inspection, the grub.cfg has two suspicious missing items.
a.) The linuxefi line uses root=/dev/sda7 instead of root=UUID.
b.) The grub.cfg is missing initrdefi lines

Starting over and repeating the install process, after successful completion I collect the anaconda grub.cfg, and manually create a new one within the install environment by chroot /mnt/sysimage and then running grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg to overwrite the anaconda one. The system then boots.

I don't know why the manually run grub2-mkconfig command produces a grub.cfg with root=UUID and with initrdefi line; while the anaconda one does not. Perhaps the initramfs has not yet been generated at the time the grub2-mkconfig command was executed?

Version-Release number of selected component (if applicable):
anaconda 20.20-1

How reproducible:

Steps to Reproduce:
1. Boot EFI Mac with Fedora 20 Desktop alpha (RC4/final)
2. Manual partitioning comprised of: /boot/efi, swap, and a single Btrfs volume with root, boot, home subvolumes.
3. Begin installation, reboot upon successful completion.

Actual results:
kernel panic

Expected results:
Boot to Gnome shell.

Additional info:
Comment 1 Chris Murphy 2013-09-26 15:15:32 EDT
Created attachment 803550 [details]
anaconda grub.cfg

This is the grub.cfg produced by anaconda.
Comment 2 Chris Murphy 2013-09-26 15:17:10 EDT
Created attachment 803551 [details]
manually created grub.cfg

After a successful install, but still booted in the install environment, I switch to a shell and run:

chroot /mnt/sysimage
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

This is that grub.cfg.
Comment 3 Chris Murphy 2013-09-26 15:17:34 EDT
Created attachment 803552 [details]
Comment 4 Chris Murphy 2013-09-26 15:17:42 EDT
Created attachment 803553 [details]
Comment 5 Chris Murphy 2013-09-26 15:18:23 EDT
Created attachment 803554 [details]
Comment 6 Chris Murphy 2013-09-26 15:18:25 EDT
Created attachment 803555 [details]
Comment 7 Chris Murphy 2013-09-26 15:22:48 EDT
Proposing as beta blocker: "A system installed without a graphical package set must boot to a working login prompt without any unintended user intervention, and all virtual consoles intended to provide a working login prompt must do so."
Comment 8 Chris Murphy 2013-09-26 15:57:27 EDT
Based on program.log
14:17:16,371 INFO program: Running... grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
14:17:23,121 INFO program: Generating grub.cfg ...
14:17:23,122 INFO program: Found linux image: /boot/vmlinuz-3.11.0-300.fc20.x86_64


14:17:26,235 INFO program: Running... new-kernel-pkg --mkinitrd --dracut --depmod --update 3.11.0-300.fc20.x86_64

Yep. The initramfs isn't created at the time grub2-mkconfig is called. That explains the missing initrdefi line in the anaconda grub.cfg; but not why root is referenced as /dev/sda7 instead of by UUID.
Comment 9 Brian Lane 2013-09-26 19:02:54 EDT
14:17:10,958 INFO program: rsync: read errors mapping "/mnt/install/source/usr/lib64/libicudata.so.50.1.2": Input/output error (5)
14:17:10,958 INFO program: rsync: read errors mapping "/mnt/install/source/usr/lib64/libicudata.so.50.1.2": Input/output error (5)
14:17:10,959 INFO program: ERROR: usr/lib64/libicudata.so.50.1.2 failed verification -- update discarded.
14:17:10,960 INFO program: rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1165) [sender=3.1.0pre1]
14:17:10,960 DEBUG program: Return code: 23

The install didn't finish. What does syslog look like?

Yes, I have to improve how we catch rsync errors, some of them are meaningful, and a pile of them aren't. "failed verification -- update discarded." sounds like either bad media or a bad drive.
Comment 10 Chris Murphy 2013-09-26 20:15:17 EDT
Good question. I don't have /tmp/syslog and didn't think to write out the systemd-journal. So I have a reproducer of these errors in the same order, and I'll attach a journal of that.

It shows grub2-mkconfig being called before dracut. It also shows many SQUASHFS errors. I ran badblocks on the media, a USB stick, and there are no errors. The ISO dd'd to the media passes checksums. The option in the EFI menu to check the media fails, but that's always failed for me on Mac EFI systems.
Comment 11 Chris Murphy 2013-09-26 20:19:00 EDT
Created attachment 803650 [details]
journalctl output

journalctl output after completed install. FWIW there is no longer a /tmp/syslog being created due to feature NoDefaultSyslog. It might be useful for anaconda to run journalctl to a file in /tmp in case it's needed.
Comment 12 Chris Murphy 2013-09-26 22:33:12 EDT
Replaced install media. I no longer get SQUASHFS errors in journal, I do still get some rsync errors in program.log, but not the two i/o ones you found. The grub.cfg still lacks an initrdefi entry, and I still get a kp. 

I'll post new logs for this attempt.
Comment 13 Chris Murphy 2013-09-26 22:36:55 EDT
Created attachment 803677 [details]
c12, anaconda.log
Comment 14 Chris Murphy 2013-09-26 22:37:17 EDT
Created attachment 803678 [details]
c12, journalctl
Comment 15 Chris Murphy 2013-09-26 22:37:32 EDT
Created attachment 803679 [details]
c12, program.log
Comment 16 Chris Murphy 2013-09-26 22:37:51 EDT
Created attachment 803680 [details]
c12, storage.log
Comment 17 Brian Lane 2013-09-27 12:25:37 EDT
USB Flash sometimes fails in odd ways. The xattr errors are 'normal' since that fs doesn't support them. That's the primary reason we ignore most rsync errors -- but that's not enough. Looks like I'll need to start parsing the output for errors.
Comment 18 Chris Murphy 2013-09-27 15:22:28 EDT
With new install media on baremetal, or on a totally separate system in a VM, I can always reproduce this bug as originally described. I think I know why, it's just a matter of which components bug this is:

1. anaconda always calls grub2-mkconfig before it calls new-kernel-pkg to create the initramfs. Therefore the grub.cfg entries all lack initrd lines.

2. new-kernel-pkg not only creates the initramfs, but it also calls grubby which edits the grub.cfg, and fixes the above problem.

3. Due to grubby bug 864198, the problem in 1 is not fixed if boot is a btrfs subvolume.

In Fedora 19 I was able to put boot on Btrfs and get a working installation, so I don't know what changed. Bug 864198 merely prevented kernel updates from updating grub.cfg. But now since it causes installations to effectively be broken on reboot, I'm thinking the blocker goes against grubby.

Alternative, the installer would need to disallow boot on Btrfs, which would be sad.
Comment 19 Mike Ruckman 2013-10-02 15:55:13 EDT
Discussed this in the 2013-10-02 Blocker Review Meeting [1]. This has been voted a RejectedBlocker. This is a problem but the actual bug is in grubby, not anaconda and in this case, anaconda is behaving as expected.

[1] http://meetbot.fedoraproject.org/fedora-blocker-review/2013-10-02/
Comment 20 Adam Williamson 2013-10-11 06:59:30 EDT
Note that the bug for grubby is https://bugzilla.redhat.com/show_bug.cgi?id=864198 . Is there any purpose to this bug remaining open any longer, or should we close it as a dupe of that one?
Comment 21 Chris Murphy 2013-10-11 10:51:08 EDT
Other than the possibility there's been an unintended change to anaconda that explains this regression from F19, no.
Comment 22 Adam Williamson 2013-10-11 12:51:47 EDT
Let's close for now then, for clarity. We can re-open if necessary.

*** This bug has been marked as a duplicate of bug 864198 ***

Note You need to log in before you can comment on or make changes to this bug.