Bug 13560 - Partition numbering is broken for MBR primary partition #4
Summary: Partition numbering is broken for MBR primary partition #4
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 2.7.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.8 M4
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-09-27 18:40 UTC by michaelcooper81
Modified: 2019-10-17 15:15 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Proposed patch (1.01 KB, application/octet-stream)
2019-09-27 18:40 UTC, michaelcooper81
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description michaelcooper81 2019-09-27 18:40:04 UTC
Created attachment 4572 [details]
Proposed patch

When wks describes extra partitions that aren't in the partition table (e.g. boot loader) and describes four proper MBR partitions, the last partition gets added to fstab as partition #5 instead of #4.

Repro wks:

part bootloader --no-table
part /boot --ondisk mmcblk0 --label boot
part / --ondisk mmcblk0 --label root1
part / --ondisk mmcblk0 --label root2
part /data --ondisk mmcblk0 --label data
bootloader --ptable msdos

Generated fstab:
/dev/mmcblk0p1	/boot	ext4	defaults	0	0
/dev/mmcblk0p5	/data

(/dev/mmcblk0p5 should be /dev/mmcblk0p4)

Proposed patch attached.
Comment 1 Randy MacLeod 2019-10-03 14:37:13 UTC
Is there a test that we can add to ensure that this doesn't happen in the future?

Are you able to send a patch to the email list?
https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Sending_using_git-send-email
Comment 3 Armin Kuster 2019-10-17 14:53:30 UTC
made it into zeus
Comment 4 Richard Purdie 2019-10-17 14:54:06 UTC
Fixed with the above commit.
Comment 5 Richard Purdie 2019-10-17 15:15:09 UTC
Mark as resolved