Bug 836695 - using grub2-install with grub2-2.00-1.fc18 breaks booting - "error: premature end of file /vmlinuz-3.5..."
Summary: using grub2-install with grub2-2.00-1.fc18 breaks booting - "error: premature...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F18Alpha, F18AlphaBlocker 838421
TreeView+ depends on / blocked
 
Reported: 2012-06-30 02:26 UTC by Andre Robatino
Modified: 2012-07-30 02:58 UTC (History)
15 users (show)

Fixed In Version: grub-2.00-3.fc18
Clone Of:
: 838421 (view as bug list)
Environment:
Last Closed: 2012-07-30 02:58:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
output of "fdisk -l" (1.08 KB, text/plain)
2012-06-30 19:36 UTC, Andre Robatino
no flags Details
output of "parted -l" (1.32 KB, text/plain)
2012-06-30 21:41 UTC, Andre Robatino
no flags Details

Description Andre Robatino 2012-06-30 02:26:43 UTC
Description of problem:
If grub2-2.00-1.fc18 is installed, then running grub2-install makes it impossible to boot ("error: you need to load the kernel first."). AFAICT this is the first version of grub2 with this problem. One can recover by booting into rescue mode, downgrading to an earlier grub2 version, and running grub2-install and grub2-mkconfig.

Version-Release number of selected component (if applicable):
grub2-2.00-1.fc18.x86_64

How reproducible:
always

Steps to Reproduce:
1. Install grub2-2.00-1.fc18.
2. Run "grub2-install /dev/sda" (or whatever the device is) and "grub2-mkconfig -o /boot/grub2/grub.cfg".
  
Actual results:
Can't boot any of the installed kernels.

Comment 1 Michal Schmidt 2012-06-30 08:39:04 UTC
I'm seeing the same problem. The complete error message from grub looks like this:

Loading Linux 3.5.0-0.rc4.git3.1.fc18.x86_64 ...
error: premature end of file /vmlinuz-3.5.0-0.rc4.git3.1.fc18.x86_64.
Loading initial ramdisk ...
error: you need to load the kernel first.


As a workaround it is possible to replace "linux" with "linux16" and "initrd" with "initrd16". Then it loads the kernel without problems.

Comment 2 Andre Robatino 2012-06-30 13:48:05 UTC
In the process of downgrading I ended up removing grub2 before installing the old version. Now the boot menu seems mostly busted (I can't see any of the entries). I think it might be good for testing each grub2 version to fully remove the old version, install the new one, and run grub2-install and grub2-mkconfig, just to catch such problems early.

Comment 3 Andre Robatino 2012-06-30 18:33:49 UTC
I removed grub2-2.00, removed the leftover /etc/default/grub file, installed the 17 Gold version (grub2-2.0-0.25.beta4.fc17), customized /etc/default/grub, and ran grub2-install and grub2-mkconfig. Booting worked normally at this point. I then updated to grub2-2.00 and ran grub2-mkconfig again (but NOT grub2-install). Booting still works normally.

Comment 4 Vladimir Serbinenko 2012-06-30 19:25:29 UTC
Could you provide information about your install layout? (including filesysems and partitioning info)

Comment 5 Andre Robatino 2012-06-30 19:28:53 UTC
This is a VirtualBox VM. I used the entire disk when installing, 30 GB image, default partitioning. It should be reproducible on almost any machine.

Comment 6 Andre Robatino 2012-06-30 19:36:01 UTC
Created attachment 595470 [details]
output of "fdisk -l"

Comment 7 Andre Robatino 2012-06-30 21:41:38 UTC
Created attachment 595478 [details]
output of "parted -l"

Comment 8 Jens Petersen 2012-07-05 09:29:14 UTC
Easily reproduced immediately after a fresh rawhide install.
ie Rawhide installs successfully and then fails to boot as above.

Comment 9 Mads Kiilerich 2012-07-05 10:19:13 UTC
A wild shot would be to blame the new grub-2.00-who-trusts-you-and-who-do-you-trust.patch - try to build a grub2 without that patch and see if that shows the same behaviour.

(grub-2.00-add-fw_path-search.patch cause other regressions for EFI - but that is probably no the issue here.)

Comment 10 Michal Schmidt 2012-07-05 11:26:41 UTC
A local build of grub2 without grub-2.00-who-trusts-you-and-who-do-you-trust.patch works for me.

Comment 11 Alexey V. Polyakov 2012-07-07 11:47:38 UTC
(In reply to comment #10)
> A local build of grub2 without
> grub-2.00-who-trusts-you-and-who-do-you-trust.patch works for me.

Works for me too, thanks!

Comment 12 Jayson Rowe 2012-07-09 01:37:31 UTC
Wanted to add I got the same trying to install Rawhide on physical hardware. My exact message is:
Loading Linux 3.5.0-0.rc5.git3.1.fc18.x86_64 ...
error: premature end of file /vmlinuz-3.5.0-0.rc5.git3.1.fc18.x86_64.
Loading initial ramdisk ...
error: you need to load the kernel first.

Press any key to continue...

Comment 13 Nils Philippsen 2012-07-10 12:02:55 UTC
Same here on physical hardware, /boot on ext4, / and /home on xfs. Will check if Mads' suggestion in comment #9 helps me as well.

Comment 14 Nils Philippsen 2012-07-10 12:32:33 UTC
It does help -- asks me for username and password before I'm allowed to boot the kernel, however. As a stop-gap for others affected, here's my scratch build with the patch removed:

http://koji.fedoraproject.org/koji/taskinfo?taskID=4230032

Comment 15 Jens Petersen 2012-07-19 07:33:22 UTC
This critical issue has been open now for nearly 3 weeks...
What is the plan of action??

Comment 16 Ben Boeckel 2012-07-20 01:32:31 UTC
Still an issue with Rawhide as of today. Will try the grub above if this boot works (been looking at Plymouth with a tty login prompt visible, but not active, for a while).

Comment 17 Jens Petersen 2012-07-20 03:50:19 UTC
Who votes for untagging grub2-2.00-1.fc18?

Comment 18 Jens Petersen 2012-07-23 01:16:05 UTC
(In reply to comment #14)
> It does help -- asks me for username and password before I'm allowed to boot
> the kernel, however.

So disabling grub-2.00-who-trusts-you-and-who-do-you-trust.patch?
I wonder if the discrepancy with others is due to difference between
installing rawhide and just updating kernel for existing install?

Anyway really wish something could be done about it this.
Breaking rawhide boot for over 3 weeks seems unacceptable to me.

Comment 19 Mads Kiilerich 2012-07-23 12:10:08 UTC
(In reply to comment #18)
> Anyway really wish something could be done about it this.
> Breaking rawhide boot for over 3 weeks seems unacceptable to me.

The grub2 package owner rarely (if ever) pays any attention to bugzilla and might not be aware of the issue. Try to contact him directly or through internal channels.

Comment 20 Nils Philippsen 2012-07-23 16:05:28 UTC
(In reply to comment #18)
> (In reply to comment #14)
> > It does help -- asks me for username and password before I'm allowed to boot
> > the kernel, however.
> 
> So disabling grub-2.00-who-trusts-you-and-who-do-you-trust.patch?

Yes.

Comment 21 Nils Philippsen 2012-07-24 09:19:42 UTC
(In reply to comment #19)
> The grub2 package owner rarely (if ever) pays any attention to bugzilla and
> might not be aware of the issue. Try to contact him directly or through
> internal channels.

How is this acceptable?

Comment 22 Peter Jones 2012-07-25 13:51:34 UTC
Please try grub-2.00-3.fc18 , it should be better.

Comment 23 Andre Robatino 2012-07-26 19:55:38 UTC
(In reply to comment #22)
> Please try grub-2.00-3.fc18 , it should be better.

Works for me. (Had to grab from Koji since there hasn't been a Rawhide push.)

Comment 24 Jens Petersen 2012-07-30 02:58:17 UTC
Works for me too from rawhide install.  Closing this out.


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