[Bug 1964771] [NEW] [u-boot-sifive] insufficient installation checks
Heinrich Schuchardt
1964771 at bugs.launchpad.net
Mon Mar 14 11:59:50 UTC 2022
Public bug reported:
The postinst script of package u-boot-sifive makes only rudimentary
checks:
No warning is written if partitions named loader1 or loader2 do not
exist.
The script happily writes to /dev/nmve0n1 or /dev/sda1 if a partition
there has the name loader1 or loader2.
Consider checking if /dev/disk/by-partlabel/loader1 and loader2 point to
a device called /dev/mmcblk*.
We should write a warning if /dev/disk/by-partlabel/loader1 or
/dev/disk/by-partlabel/loader2 are missing.
The boot ROM does not rely on the partition name but loads U-Boot SPL
from the SD card partition with GUID
5B193300-FC78-40CD-8002-E86C45580B47. So it may be preferable to use the
GUID instead of the label.
We could use 'lsblk -ro NAME,PARTTYPE' to identify the partition type
GUIDs.
Best regards
Heinrich
** Affects: u-boot (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to u-boot in Ubuntu.
https://bugs.launchpad.net/bugs/1964771
Title:
[u-boot-sifive] insufficient installation checks
Status in u-boot package in Ubuntu:
New
Bug description:
The postinst script of package u-boot-sifive makes only rudimentary
checks:
No warning is written if partitions named loader1 or loader2 do not
exist.
The script happily writes to /dev/nmve0n1 or /dev/sda1 if a partition
there has the name loader1 or loader2.
Consider checking if /dev/disk/by-partlabel/loader1 and loader2 point
to a device called /dev/mmcblk*.
We should write a warning if /dev/disk/by-partlabel/loader1 or
/dev/disk/by-partlabel/loader2 are missing.
The boot ROM does not rely on the partition name but loads U-Boot SPL
from the SD card partition with GUID
5B193300-FC78-40CD-8002-E86C45580B47. So it may be preferable to use
the GUID instead of the label.
We could use 'lsblk -ro NAME,PARTTYPE' to identify the partition type
GUIDs.
Best regards
Heinrich
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1964771/+subscriptions
More information about the foundations-bugs
mailing list