Bug 859223 - grub2 must support IBM client architecture (CAS) reboot
Summary: grub2 must support IBM client architecture (CAS) reboot
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 18
Hardware: ppc64
OS: All
unspecified
low
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: F18Betappc
TreeView+ depends on / blocked
 
Reported: 2012-09-20 20:21 UTC by IBM Bug Proxy
Modified: 2012-10-30 23:29 UTC (History)
7 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2012-10-30 23:29:48 UTC


Attachments (Terms of Use)
IBM CAS reboot implementation patch using pjones's guideline (5.98 KB, text/plain)
2012-09-20 20:21 UTC, 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 20:21:38 UTC

Description IBM Bug Proxy 2012-09-20 20:21:38 UTC
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 20:21:55 UTC
Created attachment 615112 [details]
IBM CAS reboot implementation patch using pjones's guideline

Comment 2 Fedora Update System 2012-10-18 18:07:24 UTC
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 15:41:33 UTC
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 19:53:49 UTC
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 23:29:48 UTC
grub2-2.00-10.fc18 works fine.


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