Bug 1072900

Summary: rpi3 image initialization can break partition table
Product: [openSUSE] openSUSE Distribution Reporter: Stanislav Brabec <sbrabec>
Component: OtherAssignee: E-mail List <kernel-maintainers>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: afaerber, agraf, dmueller, ms, tiwai
Version: Leap 42.3   
Target Milestone: ---   
Hardware: aarch64   
OS: openSUSE 42.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Stanislav Brabec 2017-12-14 14:47:00 UTC
While installing a RPi3 XFCE image to a Flash disk with a GPT table, the device remains unbootable after finishing the initial boot.

I am not sure, which technology is used for the image deploy.

How to reproduce:

1) Take a zeroed flash (zeros on beginning and end are sufficient).

2) With fdisk or gdisk create a new GPT table, and create a single 100M FAT32 partition.

3) Write a Leap 42.3 aarch64 XFCE image (others are probably affected as well, maybe not only RPi).

4) Boot RPi3.

Device boots, does repartitioning.

5) reboot

Now device fails to boot.

6) Put the flash into the computer and check partitions. The device now has a single 100M FAT32 partition instead of 200M. Other partitions are completely missing.

What probably happened: The GPT table was not overwritten by the image deploy and confused the repartitioning tool.

Possible solution: If it is known that the image uses MBR (and probably all .img images use MBR out of the box), perform erase of GPT area, or force the partitioner to ignore the original GPT contents.
Comment 1 Andreas Färber 2017-12-14 15:54:21 UTC
In the past for Tumbleweed we had a bug that gptfdisk package was missing and a warning was visible when removing the "quiet" parameter at the GRUB prompt.

Is this specific to Leap 42.3 or is Tumbleweed affected, too?
Comment 2 Vincent Untz 2017-12-15 08:58:21 UTC
No idea why this got assigned to me, resetting assignee.
Comment 3 Stanislav Brabec 2017-12-19 16:35:50 UTC
Andreas Färber: Tumbleweed image does not finish the boot.

1) u-boot does not support my keyboard (Failed to get keyboard state from device 4555:1031; this problem was present in 42.3 as well) and ends in a grub prompt (this problem is Tumbleweed's u-boot specific).

2) After downgrade of u-boot, it starts to boot Linux, but it fails on write error while unpacking initrd (probably too big initrd).
Comment 4 Takashi Iwai 2019-07-05 13:19:56 UTC
Leap 42.3 reached EOL.  If you still have a same problem on the newer distros, please create a new entry.  Thanks.