Bug 1200539 - Boot fails because grub initrd entry isn't generated
Summary: Boot fails because grub initrd entry isn't generated
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 22
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker
Depends On:
Blocks: F22BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2015-03-10 19:16 UTC by Michael Dempsey
Modified: 2015-05-12 16:26 UTC (History)
11 users (show)

Fixed In Version: anaconda-22.20.6-1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-29 16:29:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Kickstart (1.36 KB, text/plain)
2015-03-10 19:18 UTC, Michael Dempsey
no flags Details
Installer Generated Grub.conf (3.73 KB, text/plain)
2015-03-10 19:19 UTC, Michael Dempsey
no flags Details
grub2-mkconfig Generated Grub.conf (4.00 KB, text/plain)
2015-03-10 19:19 UTC, Michael Dempsey
no flags Details
Anaconda Logs (1.79 MB, application/x-tar)
2015-03-10 19:21 UTC, Michael Dempsey
no flags Details
Move location of writeBootLoader (1.72 KB, patch)
2015-03-10 23:54 UTC, Michael Dempsey
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 864198 0 unspecified CLOSED grubby fatal error updating grub.cfg when /boot is btrfs 2021-02-22 00:41:40 UTC

Internal Links: 864198

Description Michael Dempsey 2015-03-10 19:16:08 UTC
Description of problem:
Initrd entry in grub.conf is not created during installation process.

Version-Release number of selected component (if applicable): 22.20.2-1.fc22


How reproducible:
Every Time

Steps to Reproduce:
1. Boot Fedora 22 Alpha Live Image [http://download.fedoraproject.org/pub/fedora/linux/releases/test/22_Alpha/Workstation/x86_64/iso/Fedora-Live-Workstation-x86_64-22_Alpha-3.iso]
2. Select manual partitioning
3. Select BTRFS partitioning scheme
4. Add swap  2G
5. Add /root 18G
6. Add /home
7. Proceed to installation
8. Add root password [FRP^qTznPOJ8&o4D]
9. Add admin user    [bluestealth/FRP^qTznPOJ8&o4D]
10. reboot

Actual results:
Kernel Panic: Unable to Mount Root Filesystem on Unknown Block

Expected results:
Boot into Fedora 22

Additional info:

Comment 1 Michael Dempsey 2015-03-10 19:18:59 UTC
Created attachment 1000107 [details]
Kickstart

Comment 2 Michael Dempsey 2015-03-10 19:19:30 UTC
Created attachment 1000108 [details]
Installer Generated Grub.conf

Comment 3 Michael Dempsey 2015-03-10 19:19:57 UTC
Created attachment 1000109 [details]
grub2-mkconfig Generated Grub.conf

Comment 4 Michael Dempsey 2015-03-10 19:21:51 UTC
Created attachment 1000110 [details]
Anaconda Logs

Comment 5 Michael Dempsey 2015-03-10 19:50:03 UTC
From the logs it appears that the grub2-mkconfig was run before dracut created the initramfs.

Mar 10 15:08:46 localhost anaconda[2301]: bootloader.py: used boot args: rhgb quiet
Mar 10 15:08:46 localhost program[2301]: Running... grub2-set-default 0
Mar 10 15:08:46 localhost program[2301]: Running... grub2-mkconfig -o /boot/grub2/grub.cfg
Mar 10 15:08:48 localhost kernel: JFS: nTxBlock = 8192, nTxLock = 65536
Mar 10 15:08:48 localhost logger[19036]: os-prober: debug: /dev/sda1: is active swap
Mar 10 15:08:48 localhost logger[19036]: os-prober: debug: btrfs volume uuid=b05e7aa9-9f11-4e08-90d2-f9ed8c778be0 partition=/dev/sda2
Mar 10 15:08:48 localhost logger[19036]: os-prober: debug: running /usr/libexec/os-probes/50mounted-tests on btrfs /dev/sda2
Mar 10 15:08:48 localhost logger[19036]: 50mounted-tests: debug: begin btrfs processing for b05e7aa9-9f11-4e08-90d2-f9ed8c778be0
Mar 10 15:08:48 localhost logger[19036]: 50mounted-tests: debug: btrfs volume b05e7aa9-9f11-4e08-90d2-f9ed8c778be0 mounted
Mar 10 15:08:48 localhost logger[19036]: 50mounted-tests: debug: begin btrfs processing for b05e7aa9-9f11-4e08-90d2-f9ed8c778be0 subvol=root
Mar 10 15:08:48 localhost logger[19036]: 50mounted-tests: debug: begin btrfs processing for b05e7aa9-9f11-4e08-90d2-f9ed8c778be0 subvol=home
Mar 10 15:08:48 localhost logger[19036]: 50mounted-tests: debug: running subtest /usr/libexec/os-probes/mounted/90linux-distro
Mar 10 15:08:48 localhost program[2301]: Generating grub configuration file ...
Mar 10 15:08:48 localhost program[2301]: Found linux image: /boot/vmlinuz-4.0.0-0.rc1.git0.1.fc22.x86_64
Mar 10 15:08:48 localhost program[2301]: Found linux image: /boot/vmlinuz-0-rescue-f46c43d9c85e47538a0898451bd52803
Mar 10 15:08:48 localhost program[2301]: Found initrd image: /boot/initramfs-0-rescue-f46c43d9c85e47538a0898451bd52803.img
Mar 10 15:08:48 localhost program[2301]: done
Mar 10 15:08:48 localhost anaconda[2301]: Installing boot loader
Mar 10 15:08:48 localhost anaconda[2301]: Performing post-installation setup tasks
Mar 10 15:08:48 localhost program[2301]: Running... umount /run/install/source
Mar 10 15:08:48 localhost anaconda[2301]: Performing post-installation setup tasks
----------------------------------------------------------------------------
Mar 10 15:08:53 localhost.localdomain anaconda[2301]: Generating initramfs
Mar 10 15:08:53 localhost.localdomain packaging[2301]: recreating initrd for 4.0.0-0.rc1.git0.1.fc22.x86_64
Mar 10 15:08:53 localhost.localdomain program[2301]: Running... new-kernel-pkg --mkinitrd --dracut --depmod --update 4.0.0-0.rc1.git0.1.fc22.x86_64

Comment 6 Michael Dempsey 2015-03-10 23:54:37 UTC
Created attachment 1000213 [details]
Move location of writeBootLoader

Comment 7 Chris Murphy 2015-03-13 16:31:51 UTC
On the one hand, this is bug 864198. On the other hand, the installer is producing an invalid installation that has no chance of booting.

If Anaconda changes its behavior to call grub2-mkconfig later, the problem is fixed at install time. But then due to the grubby bug, subsequent kernel updates never get a menu entry, which is a potential security risk. What's needed is for grubby to incorporate the patches supplied by Gene Czarcinski some time ago.

Anaconda 19/20 proscribed /boot being on a Btrfs subvolume in order to meet release criteria. I don't know why this was changed for Fedora 21, but the bug is there now too, not just on 22.

Comment 8 Fedora Blocker Bugs Application 2015-03-13 16:58:52 UTC
Proposed as a Blocker for 22-beta by Fedora user chrismurphy using the blocker tracking app because:

 A system installed without a graphical package set must boot to a working login prompt without any unintended user intervention...
AND
No part of any release-blocking desktop's panel (or equivalent) configuration may crash on startup or be entirely non-functional.

Comment 9 Dan Mossor [danofsatx] 2015-03-16 16:22:23 UTC
Discussed at Fedora Blocker Review Meeting 2015-03-16 [0]:

AcceptedBlocker Beta - This bug is a clear violation of the Beta criterion[1]: "When using the custom partitioning flow, the installer must be able to: Create mount points backed by ext4 partitions, LVM volumes or btrfs volumes AND  Reject or disallow invalid disk and volume configurations without crashing."

[0]
http://meetbot.fedoraproject.org/fedora-blocker-review/2015-03-16/f22-blocker-review.2015-03-16-16.01.log.txt
[1] https://fedoraproject.org/wiki/Fedora_22_Beta_Release_Criteria#Custom_partitioning

Comment 10 Brian Lane 2015-03-16 17:46:14 UTC
We really don't support /boot on btrfs yet. This needs to be turned back off.

Also related to bug 1094489.

Comment 11 Chris Murphy 2015-03-16 18:10:09 UTC
(In reply to bcl from comment #10)
> We really don't support /boot on btrfs yet.

It's a dual bug.

Anaconda currently depends on grubby to fix a problem that's the direct result of anaconda calling grub2-mkconfig early enough that often an initramfs doesn't exist yet. This problem happen on all file systems, not just Btrfs. It's just that grubby doesn't mask this problem on Btrfs.

The correct thing happens if grub2-mkconfig is called just a bit later. The correct thing happens on all other distros now supporting /boot on Btrfs because they don't use grubby anymore.

So, we're kinda behind on this.

Comment 12 Chris Murphy 2015-03-17 05:08:51 UTC
This bug is not reproducible on netinstalls, it only happens with live installs.

What's happening is, Anaconda rsyncs everything on lives, excluding the initramfs, and then grub2-mkconfig is called before new-kernel-pkg is called to make the initramfs; so no matter the filesystems, the grub.cfg lacks an initrd line for the primary boot entry. Once new-kernel-pkg is run, it runs grubby which fixes the missing initrd line, except on Btrfs.

On netinstalls, the kernel RPM package is installed, which causes an initramfs to be created, and grub2-mkconfig runs after this, which is why the problem doesn't happen.

Comment 13 Fedora Update System 2015-03-19 18:16:54 UTC
anaconda-22.20.6-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/anaconda-22.20.6-1.fc22

Comment 14 Lukas Brabec 2015-03-20 08:11:50 UTC
(In reply to Fedora Update System from comment #13)
> anaconda-22.20.6-1.fc22 has been submitted as an update for Fedora 22.
> https://admin.fedoraproject.org/updates/anaconda-22.20.6-1.fc22

This fixed the problem for me.

Comment 15 Michael Dempsey 2015-03-20 21:32:16 UTC
(In reply to Fedora Update System from comment #13)
> anaconda-22.20.6-1.fc22 has been submitted as an update for Fedora 22.
> https://admin.fedoraproject.org/updates/anaconda-22.20.6-1.fc22

This also fixed the problem for me.

Comment 16 Chris Murphy 2015-03-21 04:57:54 UTC
Fixed. Bug 864198 is still a problem so kernel updates do not get new GRUB entries.

Comment 17 Fedora Update System 2015-03-21 05:03:21 UTC
Package anaconda-22.20.6-1.fc22, python-blivet-1.0.5-1.fc22, libblockdev-0.7-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-22.20.6-1.fc22 python-blivet-1.0.5-1.fc22 libblockdev-0.7-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-4351/libblockdev-0.7-1.fc22,python-blivet-1.0.5-1.fc22,anaconda-22.20.6-1.fc22
then log in and leave karma (feedback).

Comment 18 Fedora Update System 2015-03-23 07:10:44 UTC
anaconda-22.20.6-1.fc22, python-blivet-1.0.5-1.fc22, libblockdev-0.7-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Daniel Vrátil 2015-04-29 11:39:57 UTC
I just ran into the very same problem with anaconda-22.20.11-1.fc22, but on an ext3 filesystem.

I talked to Vojtech Trefny and Martin Kollman and we figured out that on F22 it is probably necessary to call writeBootLoader() even for non-BTRFS filesystem.

We took this patch [0] and changed boot_on_btrfs to be always True, which solved the problem.

[0] https://github.com/rhinstaller/anaconda/commit/0fc01e834082f20896728f330faea8e0b200a159

Comment 20 Brian Lane 2015-04-29 16:29:26 UTC
You are likely hitting a different problem, bug 1215839 which was fixed by a grub2 update yesterday.


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