Early root=PARTLABEL= lookup fails on Apple Partition Map disks because the on-disk names are absent from the kernel's partition metadata. Copy the name from each entry and append a NUL terminator so that names that fill the 32-byte field can be used. Tested on an arm64 QEMU guest with Linux v7.4-rc3 and no initramfs. Before the patch, boot failed with PARTLABEL and succeeded with the device path for the same partition. With the patch, boot succeeded with both a short name and a 32-byte name. Boot with root=PARTLABEL=6200-Linux was also verified on a Performa 6200CD using a kernel with local platform support. AI assistance was used to investigate early root lookup and draft the change. Signed-off-by: Tim Douglas --- block/partitions/mac.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/block/partitions/mac.c b/block/partitions/mac.c index f372392af..da170a65d 100644 --- a/block/partitions/mac.c +++ b/block/partitions/mac.c @@ -100,6 +100,12 @@ int mac_partition(struct parsed_partitions *state) (sector_t)be32_to_cpu(part->start_block) * (secsize/512), (sector_t)be32_to_cpu(part->block_count) * (secsize/512)); + /* Expose the APM name for early root=PARTLABEL lookup. */ + memcpy(state->parts[slot].info.volname, part->name, + sizeof(part->name)); + state->parts[slot].info.volname[sizeof(part->name)] = '\0'; + state->parts[slot].has_info = true; + if (!strncasecmp(part->type, "Linux_RAID", 10)) state->parts[slot].flags = ADDPART_FLAG_RAID; #ifdef CONFIG_PPC_PMAC base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3 -- 2.39.5