Bug 12914 - [2.6 M2 RC1][Meta-Intel 10.0][NUC7 & Mturbot][Test case 197] reboot command missing while installing image
Summary: [2.6 M2 RC1][Meta-Intel 10.0][NUC7 & Mturbot][Test case 197] reboot command m...
Status: CLOSED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-meta-intel (show other bugs)
Version: 2.6
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.5.4
Assignee: Armin Kuster
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-09-04 02:24 UTC by pravin
Modified: 2019-05-30 13:51 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
screenshot (3.47 MB, image/jpeg)
2018-09-04 02:24 UTC, pravin
no flags Details
Screenshoot (3.47 MB, image/jpeg)
2018-12-14 07:32 UTC, pravin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description pravin 2018-09-04 02:24:53 UTC
Created attachment 4368 [details]
screenshot

following are the steps to reproduce issue.

1. plugin usb which contains live image burned
2. configure device BIOS to firstly boot from USB if necessary
3. boot the device and select option "Install"  from boot menu
4. proceed through default install process
5. Remove USB, and reboot into new installed system.

Expected :
after completion of yocto image installation on system should be reboot after removed 
USB and pressed Enter.
Actual : ERROR: target efi install failed
required system rebooting by manually. 
Note: I have attached screenshot.
This issue is came on NUC7 and corei7-64_MTURBOT64.
Comment 1 pravin 2018-09-06 02:30:57 UTC
Anuj believe that this issue was due to this commit in OE-core:
https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b6fbb3f3d4d6367b0fd7921078f67057551c7ede
This takes out reboot, poweroff from initramfs because VIRTUAL-RUNTIME_init_manager isn't set to busybox. 

after done following changes as suggested by Anuj

/meta/recipes-core/busybox/busybox/defconfig
CONFIG_HALT=y
CONFIG_POWEROFF=y
CONFIG_REBOOT=y

with this changes image is building successfully.
Image successfully installed and booted on NUC7 and Mturtbot. 
In this new image doesn’t have boot and install issue.
Comment 2 Anuj Mittal 2018-10-11 03:24:10 UTC
So the problem is that busybox in initramfs doesn't have reboot because it's no longer built unless init manager is set to be busybox.

I can't find a way to fix this properly.

Does anyone have any suggestions?

Why was the original change needed? Would setting up alternatives for reboot work for that use case?
Comment 3 Chen Qi 2018-10-11 04:53:43 UTC
(In reply to comment #2)
> So the problem is that busybox in initramfs doesn't have reboot because it's
> no longer built unless init manager is set to be busybox.
> 
> I can't find a way to fix this properly.
> 
> Does anyone have any suggestions?
> 
> Why was the original change needed? Would setting up alternatives for reboot
> work for that use case?

I made that patch to avoid conflicts between systemd and busybox's reboot/halt/poweroff. I didn't take into consideration of initramfs which uses no init manager and requires reboot.
And YES, setting up alternatives will work for that use case.
When I made the patch, I chose moving the CONFIG_XXX into init.cfg over setting up alternatives, although both ways would solve the problem.
As we've past feature freeze, I think what we can do is to move reboot out of init.cfg and also set update-alternatves for reboot in systemd.

Any other suggestion?
Comment 5 pravin 2018-12-14 07:30:16 UTC
This bug is observed in yocto- 2.5.2 relaese.

image is downloaded from following URL
https://autobuilder.yocto.io/pub/releases/yocto-2.5.2.rc1/machines/genericx86-64/core-image-sato-sdk-genericx86-64.hddimg

following are the steps to reproduce issue.

1. plugin usb which contains live image burned
2. configure device BIOS to firstly boot from USB if necessary
3. boot the device and select option "Install"  from boot menu
4. proceed through default install process
5. Remove USB, and reboot into new installed system.

Expected :
after completion of yocto image installation on system should be reboot after removed 
USB and pressed Enter.
Actual : ERROR: target efi install failed
required system rebooting by manually. 
Note: I have attached screenshot.
This issue is came on NUC7 and corei7-64_MTURBOT64.
Comment 6 pravin 2018-12-14 07:32:23 UTC
Created attachment 4409 [details]
Screenshoot

logs screenshot is attached.
Comment 7 Armin Kuster 2019-03-11 05:12:41 UTC
is this something I need to back port or does someone with this board need to help find a fix?
Comment 8 Stephen K Jolley 2019-03-28 15:30:38 UTC
See Armin's question.
Comment 9 Anuj Mittal 2019-03-29 10:08:40 UTC
(In reply to comment #7)
> is this something I need to back port or does someone with this board need
> to help find a fix?

Yes, I think someone had sent a backport request too some time back. This isn't board specific. We need these commits:

https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=360bba5cc90f7404c517d4d5aabde8cf186917c5

https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8421aede4fdd5132eb953a59099670f9ab1f7f01

https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ef4a417ab04779bd9fc8a6540a20cca7d14e98cf
Comment 10 Armin Kuster 2019-04-01 22:26:07 UTC
(In reply to comment #9)
> (In reply to comment #7)
> > is this something I need to back port or does someone with this board need
> > to help find a fix?
> 
> Yes, I think someone had sent a backport request too some time back. This
> isn't board specific. We need these commits:
> 
> https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> ?id=360bba5cc90f7404c517d4d5aabde8cf186917c5
> 
> https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> ?id=8421aede4fdd5132eb953a59099670f9ab1f7f01
> 
> https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> ?id=ef4a417ab04779bd9fc8a6540a20cca7d14e98cf

We have all three are in Thud since Nov 2018.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-core/systemd?h=thud&id=8421aede4fdd5132eb953a59099670f9ab1f7f01

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-core/systemd?h=thud&id=360bba5cc90f7404c517d4d5aabde8cf186917c5

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-core/busybox?h=thud&id=ef4a417ab04779bd9fc8a6540a20cca7d14e98cf
Comment 11 Armin Kuster 2019-04-01 22:27:25 UTC
Anything else?
Comment 12 Armin Kuster 2019-05-30 13:51:34 UTC
I am closing this for now. Please re-open if it appears again.
Comment 13 Armin Kuster 2019-05-30 13:51:44 UTC
.