Bug 815473 - Preugprade from F16 to F17 Beta doesn't successfully set the boot menu default
Summary: Preugprade from F16 to F17 Beta doesn't successfully set the boot menu default
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: preupgrade
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: RejectedBlocker https://fedoraproject...
: 821739 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-23 16:42 UTC by Eike Hein
Modified: 2013-02-13 14:43 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-13 14:43:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Eike Hein 2012-04-23 16:42:16 UTC
Running preupgrade on F16 with updates-testing enabled I got the following error output on the terminal just prior to being asked to reboot, which may be related:

sh: /sbin/grub: No such file or directory
/bin/echo: write error: Broken pipe

Then, upon rebooting, I was greeted by a boot menu that showed the upgrade entry at the top, but if memory serves the regular Fedora boot entry in the second row came preselected. I had to manually pick the upgrade entry before the timeout so the upgrade would start.

It is possible that I had done yum upgrade and installed a new kernel prior to running preupgrade and without a reboot inbetween. I'm not sure anymore, but since both make changes to the grub config I thought I'd mention it in case they interfered with each other in some way.

Comment 1 Adam Williamson 2012-04-23 17:07:07 UTC
yeah, I saw this in most of my preupgrade tests. I don't think it's caused by installing a new kernel or anything, I think preupgrade just doesn't properly set itself to be the default any more.

Comment 2 Adam Williamson 2012-05-08 21:03:14 UTC
So, this is fixed in preupgrade git:

commit adc78e09f14e2838d26a7c847d75451b02b19f5e
Author: Martin Krizek <mkrizek>
Date:   Fri Mar 30 14:34:47 2012 +0200

    Use grub2-reboot instead of grub --once
    
    Signed-off-by: Richard Hughes <richard>

but there has not been a new preupgrade build to put it into practice. Richard, could we get one? Thanks!



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 3 Adam Williamson 2012-05-15 15:36:20 UTC
*** Bug 821739 has been marked as a duplicate of this bug. ***

Comment 4 Adam Williamson 2012-05-15 15:38:40 UTC
Mads believes this is caused by bug 768106.

Transferring blocker nomination from #821739. I'm probably -1 blocker as the workarounds - pick the upgrade option manually, or correct the grub config before rebooting - should be good in most cases.

Note that we established a fairly solid consensus on the mailing list that it makes little sense to hold the media for preupgrade bugs, even if they're considered blockers.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 5 Mads Kiilerich 2012-05-15 15:52:40 UTC
The original problem here was that preupgrade used grub but f16 used grub2. That has been fixed and this issue could be closed.

If grub2-reboot doesn't work then it must be a bug elsewhere.

It do however seem like the Zen of Fedora Bootloading is that grubby should be used as a boot loader abstraction layer. From that point of view this problem haven't been fixed properly and it would have been better to use new-kernel-pkg.

Comment 6 Adam Williamson 2012-05-15 16:03:54 UTC
Well, no, it hasn't exactly been fixed. As per comment #2. A fix is in git but no preupgrade update has been pushed yet. A fix in git doesn't help anyone without an update.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 7 Martin Krizek 2012-05-17 06:57:24 UTC
Just a note: a fix mentioned in comment #2 does not fix the issue itself. It will however once grub2-reboot is fixed (806172) as it didn't work at the time of the commit.

Comment 8 Tim Flink 2012-05-17 19:01:06 UTC
Discussed at the 2012-05-17 Fedora 17 final go/no-go meeting. Rejected as a blocker for Fedora 17 final as it doesn't affect the ability of preupgrade to actually work and thus, doesn't violate any of the Fedora 17 release criteria. The workaround is relatively painless but a new preupgrade build is very much desired as the issue has been fixed in git for some time now.

Comment 9 Hongqing Yang 2012-05-21 09:00:56 UTC
reproduced with F17 Final RC2

Comment 10 Adam Williamson 2012-05-21 21:04:51 UTC
So, let's not lose track of this one, can we please try and fix it with updates? AIUI we need to push a new preupgrade build with the fix from git, and also a fixed grub2 for F16, to make this work right from F16. right?

Comment 11 Mads Kiilerich 2012-05-21 23:38:18 UTC
(In reply to comment #10)
> and also a fixed grub2 for F16, to make this work right from F16. right?

I doubt that will work. Grubby will have spoiled all f16 grub.cfg's out there because of bug 768106, so grub2-reboot will rarely do what it is expected to do.

The 'once' functionality of grub2 will also not be reliable if /boot uses fancy filesystems. grub2-reboot might thus not be a viable solution at all.

A better (short term?) solution will perhaps be to call call grubby with --make-default ... but that would probably be too dangerous on headless systems.

Comment 12 marc skinner 2012-05-31 18:57:33 UTC
I just did the pre-upgrade this morning.  The upgrade seemed to work, but no FC17 kernel was added in my /etc/grub2.cfg file.  The kernel was installed but the config file was not updated.  Once I updated the /etc/grub2.cfg to point to the new FC17 kernel - 'Fedora (3.3.7-1.fc17.x86_64)' - that was my workaround that worked.

Comment 13 Mads Kiilerich 2012-05-31 19:08:40 UTC
(In reply to comment #12)

That is a different bug - Bug 820340.

Comment 14 Germano Massullo 2012-05-31 20:13:37 UTC
I experienced this issue: after preupgrade finished to download fc17 packages, I rebooted, but grub did not have a “upgrade system” entry. So the computer is not upgradable with preupgrade.

Comment 15 Adam Williamson 2012-05-31 20:18:48 UTC
That's also not this bug. This bug is for when it creates the entry, but the entry is not default. Are you sure that's not the case for you? What bootloader is your existing system using?

Comment 16 Germano Massullo 2012-06-02 11:06:59 UTC
(In reply to comment #15)
> What bootloader is your existing system using?
Grub 0.97 since for some bugs it has never been updated in the passage from Fedora 15 to Fedora 16

Comment 17 Kamil Páral 2012-06-06 08:29:47 UTC
Richard, according to our IRC conversation this issue should be fixed in preupgrade-1.1.11-1. But it is built just for Rawhide. Can you please build it and submit it for all supported releases? Thanks.

Comment 18 Mads Kiilerich 2012-06-06 08:57:33 UTC
The fix in http://git.fedorahosted.org/git/?p=preupgrade.git;a=commitdiff;h=adc78e09f14e2838d26a7c847d75451b02b19f5e will not help the 99% of f16 installations that suffer from Bug 768106 ... and from the bigger question of whether Fedora should use grubby or grub2-reboot / grub2-set-default to set default kernels.

AFAICS the only way preupgrade can select the preupgrade kernel by default is to make a permanent change with grubby --make-default ... and that is probably not a good idea.

IMO it is much more important to make a new preupgrade update with a fix for Bug 827987 "preupgrade to f17 does not reinstall bootloader; no --location=mbr in ks"

Comment 19 Jan Houtsma 2012-06-13 15:09:20 UTC
[16:14:root@pegasus /boot/grub2]# preupgrade-cli "Fedora 17 (Beefy Miracle)"         
............. <<SNIP>> ..............
(1602/1603): zlib-devel-1.2.5-6.fc17.x86_64.rpm                                                                                                                              |  45 kB     00:00     
(1603/1603): zsh-4.3.17-1.fc17.x86_64.rpm                                                                                                                                    | 2.3 MB     00:02     
Generating metadata for preupgrade repo
preupgrade                                                                                                                                                                   | 3.7 kB     00:00     
preupgrade/primary_db                                                                                                                                                        | 2.3 MB     00:02     
preupgrade/group                                                                                                                                                             | 1.9 MB     00:02     
Spawning worker 0 with 1603 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
Preparing system to boot into installer
DEBUG /sbin/grubby --title="Upgrade to Fedora 17 (Beefy Miracle)" --remove-kernel="/boot/upgrade/vmlinuz" --add-kernel="/boot/upgrade/vmlinuz" --initrd="/boot/upgrade/initrd.img" --args="preupgrade repo=hd::/var/cache/yum/preupgrade  ks=hd:UUID=590db0a3-5e98-42ac-9605-ccb7dca038f0:/upgrade/ks.cfg stage2=http://mirror.nl.leaseweb.net/fedora/linux/releases/17/Fedora/x86_64/os/LiveOS/squashfs.img"
sh: /sbin/grub: No such file or directory
/bin/echo: write error: Broken pipe
All finished. The upgrade will begin when you reboot.

[16:09:root@pegasus /boot/grub2]# uname -a
Linux pegasus.houtsma.net 3.3.7-1.fc16.x86_64 #1 SMP Tue May 22 13:59:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
[16:13:root@pegasus /boot/grub2]# ls -1 /sbin/grub*
/sbin/grub2-install
/sbin/grub2-mkconfig
/sbin/grub2-mkdevicemap
/sbin/grub2-mknetdir
/sbin/grub2-probe
/sbin/grub2-reboot
/sbin/grub2-set-default
/sbin/grub2-setup
/sbin/grubby
/sbin/grub-crypt
/sbin/grub-md5-crypt
/sbin/grub-terminfo
[16:14:root@pegasus /boot/grub2]# 
[16:14:root@pegasus /boot/grub2]# cat grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
set default="1"
menuentry 'Upgrade to Fedora 17 (Beefy Miracle)' --class gnu-linux --class gnu --class os {
        linux /upgrade/vmlinuz preupgrade repo=hd::/var/cache/yum/preupgrade ks=hd:UUID=590db0a3-5e98-42ac-9605-ccb7dca038f0:/upgrade/ks.cfg stage2=http://mirror.nl.leaseweb.net/fedora/linux/releases/17/Fedora/x86_64/os/LiveOS/squashfs.img
        initrd /upgrade/initrd.img
}
menuentry 'Fedora (3.3.7-1.fc16.x86_64)' --class fedora --class gnu-linux --class gnu --class os {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos3)'
        search --no-floppy --fs-uuid --set=root 590db0a3-5e98-42ac-9605-ccb7dca038f0
        echo 'Loading Fedora (3.3.7-1.fc16.x86_64)'
        linux   /vmlinuz-3.3.7-1.fc16.x86_64 root=/dev/VolGroup00/Root ro rd.lvm.lv=VolGroup00/Root rd.md=0 rd.dm=0  KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 rd.lvm.lv=VolGroup00/Swap LANG=en_US.UTF-8
        echo 'Loading initial ramdisk ...'
        initrd /initramfs-3.3.7-1.fc16.x86_64.img
}
[16:16:root@pegasus /boot/grub2]# ls -al /boot/upgrade
total 28442
drwx------. 2 root root     1024 Jun 13 15:20 .
dr-xr-xr-x. 6 root root     1024 Jun 13 15:19 ..
-rw-------. 1 root root 24337760 May 22 22:55 initrd.img
-rw-------. 1 root root      262 Jun 13 15:20 ks.cfg
-rw-------. 1 root root  4662160 May  7 19:35 vmlinuz
[16:16:root@pegasus /boot/grub2]# 

So? What should i do now before i isuue a reboot?????????? Please advice!

Comment 20 Eike Hein 2012-06-18 21:29:49 UTC
I preupgraded another system today, and this still hasn't been fixed, which caused rather unpleasant hoop-jumping due to the system being headless. No plans to tackle this?

Comment 21 Adam Williamson 2012-06-18 23:14:03 UTC
It's not at all straightforward to 'tackle'. If you read up there's some discussion to this effect. I'm not entirely sure we _can_ fix it, at this point. See comment #18.

Comment 22 Eike Hein 2012-06-18 23:16:57 UTC
I did read the report of course, and gathered that grubby has a bug. Seems the route to take would be to fix grubby so that when preupgrade calls it, it will fix grub.cfg. That's impossible? :)

Comment 23 Jan Houtsma 2012-06-19 18:22:38 UTC
(In reply to comment #22)
> I did read the report of course, and gathered that grubby has a bug. Seems
> the route to take would be to fix grubby so that when preupgrade calls it,
> it will fix grub.cfg. That's impossible? :)

Isn't it that simple to manually edit /boot/grub2/grub.cfg and change the entry 

set default="1"

into:

set default="0"

??

Or does it need more?

Comment 24 Mads Kiilerich 2012-06-19 19:14:39 UTC
(In reply to comment #23)
> Isn't it that simple to manually edit /boot/grub2/grub.cfg and change the
> entry 
> 
> set default="1"
> 
> into:
> 
> set default="0"

Yes, it is that simple ... but it will turn into a big problem if the server is headless and the preupgrade kernel for some reason doesn't work.

Comment 25 Eike Hein 2012-06-20 21:00:44 UTC
Jan: Yeah, it's that simple, however it isn't supposed to be necessary to do it manually.

Comment 26 Jan Houtsma 2012-06-25 20:22:48 UTC
Seems i was also hit by another bug where dracut dropped me to the debug shell after i manually selected the grub "Upgrade to.." entry on reboot:

https://bugzilla.redhat.com/show_bug.cgi?id=813973#c12

It really sucks. I did about 16 upgrades so far from fc1 onwards on different systems most with success, but this one from 16->17 is a real pain! So far i am still on fc16 (did a restore this weekend because i was stuck). Will try another time maybe next weekend.

This really shouldn't be happening as it will move a lot of less experienced linux users away from linux back to windows! I won't give up until it works tho. But this is not good!

Comment 27 Fedora End Of Life 2013-01-16 13:49:16 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 28 Fedora End Of Life 2013-02-13 14:43:38 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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