Skip to contentSkip to conversation

Wic creates spurious partition

WIC Rudolf J Streif 3 participants 3 messages Apr 30, 2020

lore
Share & tools
lore
#0 lore raw

I seem to be running into wic problems today...

I have the following wks file:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

part SPL --source rawcopy --sourceparams="file=SPL" --ondisk mmcblk --no-table --align 1
part u-boot --source rawcopy --sourceparams="file=${UBOOT_BINARY}" --ondisk mmcblk --no-table --align 69
part /boot --source bootimg-partition --ondisk mmcblk1 --fstype=vfat --label boot --active --align 4096 --fixed-size 16

part /mnt/persistent --ondisk mmcblk1 --fstype=ext4 --label persistent --fixed-size 10
part / --source rootfs --ondisk mmcblk1 --fstype=ext4 --label rootfs1 --size 500
part /mnt/rootfs2 --source rootfs --ondisk mmcblk1 --fstype=ext4 --label rootfs2 --size 500
part /mnt/internal_storage --ondisk mmcblk1 --fstype=ext4 --label data --size 1000

bootloader --ptable msdos

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

That should create 7 partitions of which 5 have a file system. However, when I flash the emmc with it and boot the device:

# fdisk /dev/mmcblk1

Disk /dev/mmcblk1: 3.62 GiB, 3867148288 bytes, 7553024 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: 0x0813790a

Device         Boot   Start     End Sectors  Size Id Type /dev/mmcblk1p1 *       8192   40959   32768   16M  c W95 FAT32 (LBA) /dev/mmcblk1p2        40960   61439   20480   10M 83 Linux /dev/mmcblk1p3        61440 1392639 1331200  650M 83 Linux /dev/mmcblk1p4      1392640 4771841 3379202  1.6G  f W95 Ext'd (LBA) /dev/mmcblk1p5      1392641 2723840 1331200  650M 83 Linux /dev/mmcblk1p6      2723842 4771841 2048000 1000M 83 Linux

There is another partition that essentially overlaps the last two. That makes no sense.

Thanks,
Rudi

#1 lore raw

Hi Rudi,

Quoted 5 lines · Rudolf J Streif

bootloader --ptable msdos

That should create 7 partitions of which 5 have a file system. However, when I flash the emmc with it and boot the device:

did you mean --ptable gpt?

Quoted 3 lines

/dev/mmcblk1p4      1392640 4771841 3379202  1.6G  f W95 Ext'd (LBA) /dev/mmcblk1p5      1392641 2723840 1331200  650M 83 Linux /dev/mmcblk1p6      2723842 4771841 2048000 1000M 83 Linux

In msdos layout you can only have a limited number of primary partitions, anything exceeding that will go into extended partitions which you see as "overlapping" here, in the above paste p5 and p6 are actually within the extended p4 (hinted by W95 Ext'd)

Kind regards,
Jin

Quoted 1 line
#2 lore raw
In reply to Rudolf J Streif
Quoted 44 lines · Rudolf J Streif

I seem to be running into wic problems today...

I have the following wks file:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

part SPL --source rawcopy --sourceparams="file=SPL" --ondisk mmcblk --no-table --align 1
part u-boot --source rawcopy --sourceparams="file=${UBOOT_BINARY}" --ondisk mmcblk --no-table --align 69
part /boot --source bootimg-partition --ondisk mmcblk1 --fstype=vfat --label boot --active --align 4096 --fixed-size 16

part /mnt/persistent --ondisk mmcblk1 --fstype=ext4 --label persistent --fixed-size 10
part / --source rootfs --ondisk mmcblk1 --fstype=ext4 --label rootfs1 --size 500
part /mnt/rootfs2 --source rootfs --ondisk mmcblk1 --fstype=ext4 --label rootfs2 --size 500
part /mnt/internal_storage --ondisk mmcblk1 --fstype=ext4 --label data --size 1000

bootloader --ptable msdos

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

That should create 7 partitions of which 5 have a file system. However, when I flash the emmc with it and boot the device:

# fdisk /dev/mmcblk1

Disk /dev/mmcblk1: 3.62 GiB, 3867148288 bytes, 7553024 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: 0x0813790a

Device         Boot   Start     End Sectors  Size Id Type /dev/mmcblk1p1 *       8192   40959   32768   16M  c W95 FAT32 (LBA) /dev/mmcblk1p2        40960   61439   20480   10M 83 Linux /dev/mmcblk1p3        61440 1392639 1331200  650M 83 Linux /dev/mmcblk1p4      1392640 4771841 3379202  1.6G  f W95 Ext'd (LBA) /dev/mmcblk1p5      1392641 2723840 1331200  650M 83 Linux /dev/mmcblk1p6      2723842 4771841 2048000 1000M 83 Linux

Quoted 2 lines

There is another partition that essentially overlaps the last two. That makes no sense.

That makes sense for DOS partitioning; there can only be 4 primary partitions, so number 4 is marked as an extended partition with the total space of the further logical partitions.

Scott