Bug 7971 - PTEST image does not install on hdd
Summary: PTEST image does not install on hdd
Status: VERIFIED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-runtime (show other bugs)
Version: 1.9
Hardware: x86 x86_64
: Medium+ major
Target Milestone: 1.9 M3
Assignee: Leonardo Sandoval Gonzalez
QA Contact: Lucian Musat
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-07-08 15:34 UTC by Lucian Musat
Modified: 2015-10-06 14:37 UTC (History)
7 users (show)

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


Attachments
Install failure (180.88 KB, image/jpeg)
2015-07-08 15:34 UTC, Lucian Musat
no flags Details
the installation process as it is now (29.33 MB, video/mp4)
2015-07-29 08:01 UTC, Costin
no flags Details
kernel log on a non-ptest image (2.09 MB, image/jpeg)
2015-07-30 22:07 UTC, Leonardo Sandoval Gonzalez
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lucian Musat 2015-07-08 15:34:05 UTC
Created attachment 2580 [details]
Install failure

Commit: 18e902b2dc17746af453869bcc1fba4dbae7c94f
Release 1.9_M1

When trying to install an image with ptest packages included, it is not able to install the image to the hdd. Tried it on several boards and the result is the same. 
The image I tried is from the autobuilder here:
http://autobuilder.yoctoproject.org/pub/releases/yocto-1.9_M1.rc1/ptest/machines/genericx86-64/core-image-sato-sdk-genericx86-64.hddimg

Also tried the one from our own AB and it's the same result.

The live boot works fine.

Will attach a screenshot with the error.
Comment 1 Saul Wold 2015-07-09 19:00:00 UTC
I tried to boot this image both with a NUC and via runqemu using the following 
command:
runqemu qemux86-64 ~/Downloads/bzImage-genericx86-64.bin 
~/Downloads/core-image-sato-sdk-genericx86-64.ext3 

In both cases it booted to the Splash screen and Sato UI, I did not see any 
kind of failure, is it possibly your image is corrupted?  

15f4c8b9f9b6bd8437e373e72623cb10  
/home/sgw/Downloads/core-image-sato-sdk-genericx86-64.ext3
e3ead06891e27bbd4566d16dbfe5cf07  
/home/sgw/Downloads/core-image-sato-sdk-genericx86-64.hddimg

I would assume the same failure would occur with the .ext3 since it's a startup 
-> cmd prompt issue, but both worked correctly.

Please verify your image and re-flash it to the USB Stick or SD card.  Possibly 
try a new USB Stick.
Comment 2 Saul Wold 2015-07-10 19:34:26 UTC
Lucian reported that it worked using a fresh image and usb stick, so I would 
gather a corrupted image along the way.
Comment 3 Lucian Musat 2015-07-13 10:46:04 UTC
For what is worth I re-tested this and it seems that it works when booting the stick via legacy mode and fails as I reported when booting it in EFI mode. Using our sticks anyway.
Comment 4 Lucian Musat 2015-07-14 08:23:37 UTC
Re-opening this for further investigation because it blocks our automatic tests in the lab.
Comment 5 Leonardo Sandoval Gonzalez 2015-07-15 15:05:21 UTC
(In reply to comment #3)
> For what is worth I re-tested this and it seems that it works when booting
> the stick via legacy mode and fails as I reported when booting it in EFI
> mode. Using our sticks anyway.

Lucian: Could you provide the steps to boot in both modes (legacy and EFI)?
Comment 6 Lucian Musat 2015-07-16 08:50:14 UTC
When starting a machine press F10 to enter boot menu, and from there you should have the option to boot the stick normally or efi mode. If not, make sure you have checked "UEFI boot" option in bios.
Comment 7 Leonardo Sandoval Gonzalez 2015-07-26 03:35:28 UTC
(In reply to comment #6)
> When starting a machine press F10 to enter boot menu, and from there you
> should have the option to boot the stick normally or efi mode. If not, make
> sure you have checked "UEFI boot" option in bios.

Hi Lucian,
I have tried the kernel/rootfs from 1.9 M1.rc2 [1] using a qemux86-64 machine. As expected, things looks on this machine (the issue is not found). I will then try on a HW (minowboard) and with EFI mode. I let you know my results asap.

[1] http://autobuilder.yoctoproject.org/pub/releases/yocto-yocto-1.9_M1.rc2/ptest/machines/genericx86-64/
Comment 8 Alexandru Georgescu 2015-07-28 14:38:16 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > When starting a machine press F10 to enter boot menu, and from there you
> > should have the option to boot the stick normally or efi mode. If not, make
> > sure you have checked "UEFI boot" option in bios.
> 
> Hi Lucian,
> I have tried the kernel/rootfs from 1.9 M1.rc2 [1] using a qemux86-64
> machine. As expected, things looks on this machine (the issue is not found).
> I will then try on a HW (minowboard) and with EFI mode. I let you know my
> results asap.
> 
> [1]
> http://autobuilder.yoctoproject.org/pub/releases/yocto-yocto-1.9_M1.rc2/
> ptest/machines/genericx86-64/

Hi,
Did you manage to replicate the issue?
Comment 9 Leonardo Sandoval Gonzalez 2015-07-28 17:46:10 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > When starting a machine press F10 to enter boot menu, and from there you
> > > should have the option to boot the stick normally or efi mode. If not, make
> > > sure you have checked "UEFI boot" option in bios.
> > 
> > Hi Lucian,
> > I have tried the kernel/rootfs from 1.9 M1.rc2 [1] using a qemux86-64
> > machine. As expected, things looks on this machine (the issue is not found).
> > I will then try on a HW (minowboard) and with EFI mode. I let you know my
> > results asap.
> > 
> > [1]
> > http://autobuilder.yoctoproject.org/pub/releases/yocto-yocto-1.9_M1.rc2/
> > ptest/machines/genericx86-64/
> 
> Hi,
> Did you manage to replicate the issue?

Alex, Sorry for the delay.

I tried on a Minnowboard MAX, using a [2] with this (md5sum) checksum

0db9d820a4d73e082fb28c29280b9741  core-image-sato-sdk-genericx86-64.hddimg

There are the test I did

1. To boot in EFI mode, once board is power on, I typed the following

Shell> fs0:
FS0:\> cd EFI/BOOT
FS0:\> bootx64.efi

This leads to login prompt, log as root and run the ptest-runner. So far, all tests have passed correctly as seen in the below log:

.
.
PASS: 280 - Start tracing for session valid_filter
PASS: 281 - Stop lttng tracing for session valid_filter
PASS: 282 - Destroy session valid_filter
PASS: 283 - Validate trace filter output
PASS: 284 - Create session valid_filter in /tmp/tmp.RF7f0U3uuM
PASS: 285 - Enable lttng event with filtering
PASS: 286 - Start tracing for session valid_filter
PASS: 287 - Stop lttng tracing for session valid_filter
PASS: 288 - Destroy session valid_filter
PASS: 289 - Validate trace filter output
PASS: 290 - Kill session daemon

Unless I am not booting in EFI mode, this issue is NOT reproduced on the M1.rc2 ptest sato-sdk image.


[2] http://autobuilder.yoctoproject.org/pub/releases/yocto-yocto-1.9_M1.rc2/ptest/machines/genericx86-64/core-image-sato-sdk-genericx86-64.hddimg
Comment 10 Lucian Musat 2015-07-29 08:00:39 UTC
Did you select install or live boot? The install is the one that fails. We tried again now with a brand new minnowboard max and it still fails for us. We tried on all kinds of machines. We'll try to upload a video of the fail.
Comment 11 Costin 2015-07-29 08:01:53 UTC
Created attachment 2610 [details]
the installation process as it is now
Comment 12 Costin 2015-07-29 08:02:44 UTC
Hello,

The last attachment contains a small clip with the installation as it is now.
Comment 13 Leonardo Sandoval Gonzalez 2015-07-29 15:59:46 UTC
Lucian/Costin

The problem is that I am not using the same image.

Can you share the link of the image so I can test the same?

So far, I have used [2], instrument the grub.cfg file to include the install option (I only have the 'boot' option, which I believe this is what you call 'live boot'): 

menuentry 'install'{
linux /vmlinuz LABEL=install-efi root=/dev/ram0
initrd /initrd
}

and boot, but this is not booting the same way as seen on the video (no kernel messages and no automatic installation).
Comment 14 Lucian Musat 2015-07-30 07:58:59 UTC
Hi,

The image we used is the rc2 one:
http://autobuilder.yoctoproject.org/pub/releases/yocto-yocto-1.9_M1.rc2/ptest/machines/genericx86-64/core-image-sato-sdk-genericx86-64.hddimg

Just write it to an usb drive, stick it in a minnowboard max, and boot it from efi shell. But make sure that you are booting the drive and not the hdd.
Usually fs0: is the hdd.
Comment 15 Leonardo Sandoval Gonzalez 2015-07-30 18:43:06 UTC
I was able to reproduce the issue. This time I used dd instead of mkefidisk.sh, and connect a monitor instead of the serial console. I will work on finding the root cause ASAP.
Comment 16 Leonardo Sandoval Gonzalez 2015-07-30 22:03:35 UTC
Issue is reproduced using the image below (image produced by local builder, talking the latest master at midnight of the indicated day). This means that the problem is present on master and it is *not* related to ptest.

http://yctb01.zpn.intel.com/builds/nightly-x86-64/20150727-1/machines/genericx86-64/core-image-sato-sdk-genericx86-64.hddimg

looking into the root cause...
Comment 17 Leonardo Sandoval Gonzalez 2015-07-30 22:07:13 UTC
Created attachment 2616 [details]
kernel log on a non-ptest  image

Log taken using this image:

http://yctb01.zpn.intel.com/builds/nightly-x86-64/20150727-1/machines/genericx86-64/core-image-sato-sdk-genericx86-64.hddimg

on a minnowboardmax board.
Comment 18 Leonardo Sandoval Gonzalez 2015-07-31 16:22:33 UTC
An image can only be installed on a device different that the live one (live OS), so what we are seeing is expected. However, the output message 

    "No hard drive selected. Installation aborted" 

is not clear enough, and this needs a better message or a check before this happens. I will send a patch for the latter.
Comment 19 Leonardo Sandoval Gonzalez 2015-07-31 17:22:32 UTC
Patch sent to the OE-Core mailing list.
Comment 20 Lucian Musat 2015-08-03 08:43:01 UTC
(In reply to comment #18)
> An image can only be installed on a device different that the live one (live
> OS), so what we are seeing is expected. However, the output message 
> 
>     "No hard drive selected. Installation aborted" 
> 
> is not clear enough, and this needs a better message or a check before this
> happens. I will send a patch for the latter.

Hello Leonardo,

I am not sure I follow what you are saying. We are trying to install from USB stick onto the hard drive. The script clearly shows that it detects the HDD (MODEL=INTEL SSDSC2...) so the source is not the same as the destination.
Comment 21 Leonardo Sandoval Gonzalez 2015-08-03 17:06:19 UTC
(In reply to comment #20)
> (In reply to comment #18)
> > An image can only be installed on a device different that the live one (live
> > OS), so what we are seeing is expected. However, the output message 
> > 
> >     "No hard drive selected. Installation aborted" 
> > 
> > is not clear enough, and this needs a better message or a check before this
> > happens. I will send a patch for the latter.
> 
> Hello Leonardo,
> 
> I am not sure I follow what you are saying. We are trying to install from
> USB stick onto the hard drive. The script clearly shows that it detects the
> HDD (MODEL=INTEL SSDSC2...) so the source is not the same as the destination.

I have reproduced the issue you are seeing (for some reason, I though you were trying to boot & install at the same device). I will send a V2 patch as soon as I find the root cause.
Comment 22 Leonardo Sandoval Gonzalez 2015-08-03 23:09:49 UTC
A new patch sent to the community (titled '[PATCH] init-install-efi.sh: Avoid /mnt/mtab creation if already present'). Under review now.
Comment 23 Benjamin Esquivel 2015-08-21 20:00:04 UTC
The patch mentioned by Leo in the immediate previous comment is located at:

http://lists.openembedded.org/pipermail/openembedded-core/2015-August/108283.html

It looks good to me.
Comment 24 Leonardo Sandoval Gonzalez 2015-09-21 16:13:59 UTC
Patch integrated into master (5acf99d1afc7efa962e4e698cc09a7f08133a64e)
Comment 25 Lucian Musat 2015-10-06 14:37:52 UTC
Seems to be installing now. Verified on commit eac61f37e36099f74485dab398b57f3812826d17.