Bug 1467436 - fedora-arm-image-installer fails on Fedora 26 due to partition mismatch of aarch64 .raw.xz
Summary: fedora-arm-image-installer fails on Fedora 26 due to partition mismatch of aa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-arm-installer
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Paul Whalen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-03 21:41 UTC by John Reiser
Modified: 2017-12-12 14:40 UTC (History)
4 users (show)

Fixed In Version: fedora-arm-installer-2.1-1.fc27 fedora-arm-installer-2.1-1.fc26 fedora-arm-installer-2.1-1.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-10 05:07:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description John Reiser 2017-07-03 21:41:13 UTC
Description of problem: The partition format in Fedora-Workstation-26-1.3.aarch64.raw.xz cannot be processed by fedora-arm-installer-1.99.16-1.fc25.noarch, so the media preparation of uSDHC fails.


Version-Release number of selected component (if applicable):
fedora-arm-installer-1.99.16-1.fc25.noarch

How reproducible: every time


Steps to Reproduce:
1. fedora-arm-image-installer --image=Fedora-Workstation-26-1.3.aarch64.raw.xz --target=rpi3 --media=/dev/sdh --selinux=OFF --norootpass --resizefs --addconsole
2.
3.

Actual results:
Two instances of:
    /dev/sdh4: Failed to resize partition #4.

complete Terminal log: 
=====================================================
= Selected Image:                                 
= Fedora-Workstation-26-1.3.aarch64.raw.xz
= Selected Media : /dev/sdh
= U-Boot Target : rpi3
= SELINUX = OFF
= Root Password will be removed.
= Root partition will be resized
= Console for rpi3 will be added.
=====================================================
 
*****************************************************
*****************************************************
******** WARNING! ALL DATA WILL BE DESTROYED ********
*****************************************************
*****************************************************
 
 Type 'YES' to proceed, anything else to exit now 
 
= Proceed? YES
= Writing: 
= Fedora-Workstation-26-1.3.aarch64.raw.xz 
= To: /dev/sdh ....
0+961139 records in
0+961139 records out
8589934592 bytes (8.6 GB, 8.0 GiB) copied, 471.943 s, 18.2 MB/s
= Writing image complete!
= Resizing /dev/sdh ....
Checking that no-one is using this disk right now ... OK

Disk /dev/sdh: 29.6 GiB, 31724666880 bytes, 61962240 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x79a4cfef

Old situation:

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdh1  *       2048   411647   409600  200M  6 FAT16
/dev/sdh2        411648  2508799  2097152    1G 83 Linux
/dev/sdh3       2508800  4188159  1679360  820M 82 Linux swap / Solaris
/dev/sdh4       4188160 16777215 12589056    6G  5 Extended
/dev/sdh5       4190208 16777215 12587008    6G 83 Linux

/dev/sdh4: Failed to resize partition #4.
Leaving.

Checking that no-one is using this disk right now ... OK

Disk /dev/sdh: 29.6 GiB, 31724666880 bytes, 61962240 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x79a4cfef

Old situation:

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdh1  *       2048   411647   409600  200M  6 FAT16
/dev/sdh2        411648  2508799  2097152    1G 83 Linux
/dev/sdh3       2508800  4188159  1679360  820M 82 Linux swap / Solaris
/dev/sdh4       4188160 16777215 12589056    6G  5 Extended
/dev/sdh5       4190208 16777215 12587008    6G 83 Linux

/dev/sdh4: Failed to resize partition #4.
Leaving.

e2fsck 1.43.3 (04-Sep-2016)
fsck.ext4: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdh4
Could this be a zero-length partition?
resize2fs 1.43.3 (04-Sep-2016)
resize2fs: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdh4
Couldn't find valid filesystem superblock.
= Turning SELinux off ...
sed: can't read /tmp/boot/extlinux/extlinux.conf: No such file or directory
= Removing the root password.
sed: can't read /tmp/root/etc/passwd: No such file or directory
= No U-Boot will be installed.

= Installation Complete! Insert into the rpi3 and boot.
==============================================================================


Expected results: No failure.


Additional info: The actual image layout is:
=====
# parted /dev/sdh
GNU Parted 3.2
Using /dev/sdh
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit MiB                                                         
(parted) p                                                                
Model:  Multi-Reader -3 (scsi)
Disk /dev/sdh: 30255MiB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start    End      Size     Type      File system     Flags
 1      1.00MiB  201MiB   200MiB   primary   fat16           boot
 2      201MiB   1225MiB  1024MiB  primary   ext4
 3      1225MiB  2045MiB  820MiB   primary   linux-swap(v1)
 4      2045MiB  8192MiB  6147MiB  extended
 5      2046MiB  8192MiB  6146MiB  logical   ext4
=====
where the root partition is #5; but fedora-arm-image-installer expects root as partition #4, and cannot cope.



The bug is in this code from /usr/bin/fedora-arm-image-installer,
which does not recognized that partition #4 is the Extended partition,
and that the root partition actually is partition #5:
=====
# check to see how many partitions on the image
partprobe "$MEDIA"
sleep 1
case $MEDIA in
        "/dev/mmcblk"*)
                if [ -e "$MEDIA"p4 ]; then
                        export FIRMPART="${MEDIA}p1"
                        BOOTPART="${MEDIA}p2"
                        ROOTPART="${MEDIA}p4"
                        PARTNUM=4
                else
                        BOOTPART="${MEDIA}p1"
                        ROOTPART="${MEDIA}p3"
                        PARTNUM=3
                fi
                ;;
        *)
                if [ -e "$MEDIA"4 ]; then     ####  WRONG
                        export FIRMPART="${MEDIA}1"
                        BOOTPART="${MEDIA}2"
                        ROOTPART="${MEDIA}4"
                        PARTNUM=4
                else
                        BOOTPART="${MEDIA}1"
                        ROOTPART="${MEDIA}3"
                        PARTNUM=3
                fi
                ;;
esac

=====

Comment 1 Peter Robinson 2017-07-03 21:51:02 UTC
> Steps to Reproduce:
> 1. fedora-arm-image-installer
> --image=Fedora-Workstation-26-1.3.aarch64.raw.xz --target=rpi3
> --media=/dev/sdh --selinux=OFF --norootpass --resizefs --addconsole

1) you can also use the documented dd process for RPi3 as it doesn't need a u-boot write out: https://fedoraproject.org/wiki/Architectures/ARM/Raspberry_Pi#Manual

2) the aarch64 images are not generally supported, there are other issues with them in the auto boot process.

Comment 2 Christos Triantafyllidis 2017-07-23 23:56:42 UTC
The dd method also fails. The u-boot kernel is in the image so it doesn't matter you are using dd or fedora-arm-image-installer.

What seems to be missing from the image is the extlinux installation/configuration.

Comment 3 Peter Robinson 2017-07-24 09:05:12 UTC
(In reply to Christos Triantafyllidis from comment #2)
> The dd method also fails. The u-boot kernel is in the image so it doesn't
> matter you are using dd or fedora-arm-image-installer.
> 
> What seems to be missing from the image is the extlinux
> installation/configuration.

We don't use extlinux on aarch64, we use grub2/uefi for the boot on all devices (SBBA compliant or not). The images produced for aarch64 are currently unsupported and produced for people wishing to assist with fixing some of the low level boot issues. The u-boot not working is a known issue (and the reason they're not supported). Once we have the issue resolved there will be a documented means of getting the official F-26 images working, until then if you don't understand the low level boot process you'll need to wait.

Comment 4 Fedora End Of Life 2017-11-16 18:33:25 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 5 Fedora Update System 2017-11-23 10:15:58 UTC
fedora-arm-installer-2.0-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2e0498d5e1

Comment 6 Fedora Update System 2017-11-23 10:16:18 UTC
fedora-arm-installer-2.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f660aac9a6

Comment 7 Fedora Update System 2017-11-23 10:16:31 UTC
fedora-arm-installer-2.0-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2076106713

Comment 8 Fedora Update System 2017-11-24 23:23:16 UTC
fedora-arm-installer-2.0-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-2076106713

Comment 9 Fedora Update System 2017-11-25 00:35:58 UTC
fedora-arm-installer-2.0-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-2e0498d5e1

Comment 10 Fedora Update System 2017-11-25 01:34:49 UTC
fedora-arm-installer-2.0-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f660aac9a6

Comment 11 John Reiser 2017-11-25 04:11:03 UTC
(In reply to Fedora Update System from comment #8)
> fedora-arm-installer-2.0-1.fc25 ...

Works for me on Fedora 25; karma +1 left.

Comment 12 Fedora Update System 2017-11-28 11:27:19 UTC
fedora-arm-installer-2.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-0e4021062c

Comment 13 Fedora Update System 2017-11-28 11:27:39 UTC
fedora-arm-installer-2.1-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-62f44716bb

Comment 14 Fedora Update System 2017-11-28 11:27:53 UTC
fedora-arm-installer-2.1-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c8712c7fc3

Comment 15 John Reiser 2017-11-28 16:57:48 UTC
The story continues in bugzilla #1517469.  fedora-arm-installer-2.1-1.fc27 evades the issue by refusing to resize.  Technically this is progress, but I have not seen graphical login yet.

Comment 16 Fedora Update System 2017-11-28 17:48:29 UTC
fedora-arm-installer-2.1-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-62f44716bb

Comment 17 Fedora Update System 2017-11-28 18:36:54 UTC
fedora-arm-installer-2.1-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-0e4021062c

Comment 18 Fedora Update System 2017-11-29 01:46:54 UTC
fedora-arm-installer-2.1-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c8712c7fc3

Comment 19 Fedora Update System 2017-12-10 05:07:01 UTC
fedora-arm-installer-2.1-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2017-12-12 13:41:17 UTC
fedora-arm-installer-2.1-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2017-12-12 14:40:08 UTC
fedora-arm-installer-2.1-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


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