Bug 859223 - grub2 must support IBM client architecture (CAS) reboot
grub2 must support IBM client architecture (CAS) reboot
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: grub2 (Show other bugs)
18
ppc64 All
unspecified Severity low
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F18Betappc
  Show dependency treegraph
 
Reported: 2012-09-20 16:21 EDT by IBM Bug Proxy
Modified: 2012-10-30 19:29 EDT (History)
7 users (show)

See Also:
Fixed In Version: grub2-2.00-10.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-30 19:29:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
IBM CAS reboot implementation patch using pjones's guideline (5.98 KB, text/plain)
2012-09-20 16:21 EDT, IBM Bug Proxy
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 85309 None None None 2012-09-20 16:21:38 EDT

  None (edit)
Description IBM Bug Proxy 2012-09-20 16:21:38 EDT
There are cases where the POWER firmware must reboot in order to support specific features requested by a kernel. The kernel calls ibm,client-architecture-support and it may either return or reboot with the new feature set. eg:

Calling ibm,client-architecture-support.../
Elapsed time since release of system processors: 70959 mins 50 secs
Welcome to GRUB!

Right now we get dumped back into the grub menus and we will end up booting the default kernel the second time around if the user doesn't catch it in time.

grub2 must catch and handle this by immediately booting the same kernel again. As an example the yaboot code does this before booting a kernel:

     prom_set_options("boot-last-label", bootlastlabel,
                      strlen(bootlastlabel) + 1);

And it checks a couple of properties to see if the reboot count is above 0:

     if (prom_get_options("ibm,client-architecture-support-reboot",fw_nbr_reboots, FW_NBR_REBOOTSZ) == -1 )
        prom_get_options("ibm,fw-nbr-reboots",fw_nbr_reboots, FW_NBR_REBOOTSZ);
     fw_reboot_cnt = simple_strtol(fw_nbr_reboots,&endp,10);
     if (fw_reboot_cnt > 0L)
          prom_get_options("boot-last-label", bootlastlabel, BOOTLASTSZ);

I tested Paulo's patch and it works great. Thanks Paulo!

A simple test case for this is to boot an old kernel (I used 2.6.31) and then reboot into Fedora's latest kernel. It starts booting, then you see the client-architecture-support call and a reboot. This time grub boots directly into the latest selected kernel. Even when I edited the menu entry (for additional kernel parameters) my changes were saved and reused on the second boot.
Comment 1 IBM Bug Proxy 2012-09-20 16:21:55 EDT
Created attachment 615112 [details]
IBM CAS reboot implementation patch using pjones's guideline
Comment 2 Fedora Update System 2012-10-18 14:07:24 EDT
grub2-2.00-10.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/grub2-2.00-10.fc18
Comment 3 Fedora Update System 2012-10-19 11:41:33 EDT
Package grub2-2.00-10.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing grub2-2.00-10.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16471/grub2-2.00-10.fc18
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2012-10-22 15:53:49 EDT
grub2-2.00-11.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/grub2-2.00-11.fc18
Comment 5 Gustavo Luiz Duarte 2012-10-30 19:29:48 EDT
grub2-2.00-10.fc18 works fine.

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