HiFive Unmatched partitions are named "Unleashed"

Bug #1944741 reported by Alexandre Ghiti
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
util-linux (Debian)
Fix Released
Unknown
util-linux (Ubuntu)
Fix Released
Low
Unassigned
Impish
Fix Released
Low
Unassigned
Jammy
Fix Released
Low
Unassigned

Bug Description

[Impact]

Both HiFive Unleashed and HiFive Unmatched bootloaders seek for the same
UUIDs to load the next stage bootloader: the current name makes partitions
on Unmatched board appear as 'Unleashed'.

This issue gives the feeling that the Ubuntu RISC-V images made specifically
for those 2 boards were assembled in a rushed manner.

The attached patch fixes this by removing the 'Unleashed' part of the current
name so that it fits both, it was build againt all architectures here:
https://launchpad.net/~alexghiti/+archive/ubuntu/riscv/+sourcepub/12783067/+listing-archive-extra

[Test Plan]

1. Download the SiFive Unmatched image here: https://cdimage.ubuntu.com/ubuntu-server/daily-preinstalled/pending/impish-preinstalled-server-riscv64+unmatched.img.xz
2. Follow instructions here to launch a riscv64 VM: https://wiki.ubuntu.com/RISC-V
3. Execute the following command:
        ubuntu@ubuntu:~$ sudo fdisk -l
        Disk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 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: gpt
        Disk identifier: 0F66C0C3-A5E4-439B-907E-ABAD106FE4A7

        Device Start End Sectors Size Type
        /dev/vda1 235554 83886046 83650493 39.9G Linux filesystem
        /dev/vda12 227362 235553 8192 4M Linux filesystem
        /dev/vda13 34 2081 2048 1M HiFive Unleashed FSBL
        /dev/vda14 2082 10273 8192 4M HiFive Unleashed BBL
        /dev/vda15 10274 227361 217088 106M EFI System

        Partition table entries are not in disk order.
4. Download and install the new packages that contain the fix here:
        https://launchpad.net/~alexghiti/+archive/ubuntu/riscv/+files/libfdisk1_2.36.1-8ubuntu4_riscv64.deb
        https://launchpad.net/~alexghiti/+archive/ubuntu/riscv/+files/libfdisk-dev_2.36.1-8ubuntu4_riscv64.deb
        https://launchpad.net/~alexghiti/+archive/ubuntu/riscv/+files/fdisk_2.36.1-8ubuntu4_riscv64.deb
5. Re-execute the same command as above:
        ubuntu@ubuntu:~$ sudo fdisk -l
        Disk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 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: gpt
        Disk identifier: 0F66C0C3-A5E4-439B-907E-ABAD106FE4A7

        Device Start End Sectors Size Type
        /dev/vda1 235554 83886046 83650493 39.9G Linux filesystem
        /dev/vda12 227362 235553 8192 4M Linux filesystem
        /dev/vda13 34 2081 2048 1M HiFive FSBL
        /dev/vda14 2082 10273 8192 4M HiFive BBL
        /dev/vda15 10274 227361 217088 106M EFI System

        Partition table entries are not in disk order.

[Where problems could occur]

We may expect regressions if one uses fdisk output (ie the partition names
instead of the UUIDs) in her software: this risk is mitigated by the fact the
upstream accepted the patch and then does not expect this interface to be
immutable and that RISC-V is not widely used yet.

[Other Info]

None.

=== old bug description ===
Both HiFive Unleashed and HiFive Unmatched bootloaders seek for the same
UUIDs to load the next stage bootloader: the current name makes partitions
on Unmatched board appear as 'Unleashed'.

Fix that by removing the 'Unleashed' part of the current name so that it
fits both.

The attached debdiff contains the patch that was merged upstream (https://github.com/karelzak/util-linux/commit/10fd91d389497d8be435cc66abbdeb2eb6ea2f07).
~

Revision history for this message
Alexandre Ghiti (alexghiti) wrote :
Revision history for this message
Alexandre Ghiti (alexghiti) wrote :
Changed in util-linux (Debian):
status: Unknown → New
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "util_linux_debdiff.patch" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Brian Murray (brian-murray) wrote :

You'll want to reference the bug number in your changelog so this will automatically get closed by the Launchpad librarian.

Revision history for this message
Alexandre Ghiti (alexghiti) wrote :
Mathew Hodson (mhodson)
Changed in util-linux (Ubuntu):
importance: Undecided → Low
Changed in util-linux (Debian):
status: New → Confirmed
tags: added: fr-1786
Revision history for this message
Alexandre Ghiti (alexghiti) wrote (last edit ):

I actually missed the translation files that contain the translation of the partition names I changed. Attached the corresponding debdiff that contains all the changes.

This was built against all architectures in my PPA (https://launchpad.net/~alexghiti/+archive/ubuntu/riscv/+sourcepub/12783067/+listing-archive-extra) and autopkgtest on amd64 successfully.

description: updated
Revision history for this message
Lukas Märdian (slyon) wrote :

Thank you! You changes LGTM.
The first patch resembles the upstream commit, the 2nd patch (that touches the translation files) is not yet merged upstream, but makes sense.

With all builds passing in a PPA and a successful autopkgtest run, I'll stage this to be a 0-day SRU, as discussed with the release team.

$ dput ubuntu ../util-linux_2.36.1-8ubuntu2_source.changes
D: Setting host argument.
Checking signature on .changes
gpg: ../util-linux_2.36.1-8ubuntu2_source.changes: Valid signature from 5889C17AB1C8D890
Checking signature on .dsc
gpg: ../util-linux_2.36.1-8ubuntu2.dsc: Valid signature from 5889C17AB1C8D890
Uploading to ubuntu (via sftp to upload.ubuntu.com):
  Uploading util-linux_2.36.1-8ubuntu2.dsc: done.
  Uploading util-linux_2.36.1-8ubuntu2.debian.tar.xz: done.
  Uploading util-linux_2.36.1-8ubuntu2_source.buildinfo: done.
  Uploading util-linux_2.36.1-8ubuntu2_source.changes: done.
Successfully uploaded packages.

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Alexandre, or anyone else affected,

Accepted util-linux into impish-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/util-linux/2.36.1-8ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-impish to verification-done-impish. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-impish. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in util-linux (Ubuntu Impish):
status: New → Fix Committed
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (util-linux/2.36.1-8ubuntu2)

All autopkgtests for the newly accepted util-linux (2.36.1-8ubuntu2) for impish have finished running.
The following regressions have been reported in tests triggered by the package:

cluster-glue/1.0.12-20ubuntu2 (s390x, armhf)
gearmand/1.1.19.1+ds-2build1 (armhf)
ubuntu-image/1.11+21.04ubuntu2 (armhf)
glib2.0/2.68.4-1ubuntu1 (armhf)
gdisk/1.0.8-1 (armhf)
cyrus-imapd/3.2.6-2build1 (armhf)
facter/3.14.12-1build1 (armhf)
e2fsprogs/1.46.3-1ubuntu3 (armhf)
budgie-desktop/10.5.3-0ubuntu2 (armhf)
nfs-utils/1:1.3.4-6ubuntu1 (amd64)
libdap/3.20.7-7 (armhf)
casper/1.465 (armhf)
gnocchi/4.4.1+git2021091316.1207c4ad-0ubuntu1 (armhf)
asterisk/1:16.16.1~dfsg-2 (armhf)
ocsinventory-agent/2:2.8-2 (armhf)
udisks2/2.9.4-1 (arm64, amd64)
gfs2-utils/3.3.0-2 (armhf)
passwordsafe/1.12.0+dfsg-1 (armhf)
openjdk-8/8u302-b08-0ubuntu2 (armhf)
git-filter-repo/2.32.0-1 (armhf)
freedom-maker/0.28 (armhf)
kopanocore/8.7.0-7.1ubuntu4 (armhf)
libuuid-perl/0.28-1build2 (armhf)
ganeti-instance-debootstrap/0.16-6.1ubuntu1 (arm64)
gsequencer/3.7.44-3 (armhf)
pacemaker/2.0.5-2ubuntu3 (armhf)
systemd/248.3-1ubuntu8 (armhf)
ignition-transport/8.0.0+dfsg-3build1 (armhf)
libdata-uuid-libuuid-perl/0.05-3build4 (armhf)
cmake-extras/1.5-7 (armhf)
ceph/16.2.6-0ubuntu1 (armhf)
piuparts/1.1.2 (s390x, arm64, ppc64el, amd64)
ignition-common/3.5.0+dfsg1-5 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/impish/update_excuses.html#util-linux

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Alexandre Ghiti (alexghiti) wrote :
tags: added: verification-done-impish
Changed in util-linux (Debian):
status: Confirmed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for util-linux has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.36.1-8ubuntu2

---------------
util-linux (2.36.1-8ubuntu2) impish; urgency=medium

  * Fix HiFive partition names (LP: #1944741)
    - include: Rename HiFive partition UUIDs
    - po: Update translations after changes to HiFive partition names

 -- Alexandre Ghiti <email address hidden> Thu, 23 Sep 2021 16:07:01 +0200

Changed in util-linux (Ubuntu Impish):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.37.2-4ubuntu1

---------------
util-linux (2.37.2-4ubuntu1) jammy; urgency=low

  * Merge from Debian unstable. Remaining changes:
    - Build hwclock with audit support.
    - Drop debian/hwclock.rules and debian/util-linux.hwclock.default, recent
      kernels sync the RTC automatically.
    - Add sulogin-fallback-static-sh.patch: Add support for /bin/static-sh as
      fallback if the regular shell fails to execute. Patch ported from
      sysvinit. (see LP #505887)
    - Add sulogin-lockedpwd.patch: Make sure file systems can be fixed on
      machines with locked root accounts (as Ubuntu does by default). Don't
      require --force for sulogin.
    - Clean up weekly fstrim cron file, now a systemd timer unit.
    - Allow to build without udeb packages.
    - Update translations after changes to HiFive partition names

 -- Mario Limonciello <email address hidden> Wed, 27 Oct 2021 00:35:24 -0500

Changed in util-linux (Ubuntu Jammy):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.