Re: [yocto] wic creates invalid image
Hi Alex & Dimitris, Thank you for the info. I tried to use gpt partition table as you suggested, but the raspberry pi compute module 3 I am using wouldn't boot, so i switched back to mbr/msdos. Now that I understand the origin of the extra extended partition, I can work around it. best regards, Donal On Tue, 13 Nov 2018 at 19:29, Dimitris Tassopoulos wrote: > Hi Alex, > > If you don't want the extended partitions you need to create a gpt > partition, you can do this by adding this to your wks file. > > bootloader --ptable gpt > > Regards, > Dimitris > > > On Tue, 13 Nov 2018, 20:23 Alex Kiernan >> On Tue, Nov 13, 2018 at 7:13 PM Donal Morrissey >> wrote: >> > >> > Hi There, >> > I have a problem with an image being created by wic. If I add more than >> 4 partition definitions to the wks file, the generated image will include >> an additional partition with no Fstype, and spanning the full length of the >> additional partitions. >> > >> > Take the following wks file: >> > >> > part --source rawcopy --sourceparams="file=> path>/image-r0/uboot.env" --ondisk "mmcblk0" --align 4096 --no-table >> > part --source bootimg-partition --ondisk "mmcblk0" --fstype=vfat >> --label boot --align 4096 --active --fixed-size 40 >> > part --source rootfs --ondisk "mmcblk0" --fstype=ext4 --label primary >> --align 4096 --fixed-size 147456k --exclude-path data/ >> > part --source rootfs --ondisk "mmcblk0" --fstype=ext4 --label secondary >> --align 4096 --fixed-size 147456k --exclude-path data/ >> > part --ondisk "mmcblk0" --fstype=ext4 --label appdata1 --align 4096 >> --fixed-size 147456k >> > part --ondisk "mmcblk0" --fstype=ext4 --label appdata2 --align 4096 >> --fixed-size 147456k >> > bootloader --ptable msdos >> > >> > wic will create a .direct file with the following structure: >> > Num StartEnd Size Fstype >> > 1 12582912 54525951 41943040 fat16 >> > 2 54525952205520895150994944 ext4 >> > 3 205520896356515839150994944 ext4 >> > 4 360709632666894335306184704 >> > 5 360710144511705087150994944 ext4 >> > 6 515899392666894335150994944 ext4 >> > >> > Note the start and end addresses of partition 4, it spans from the >> start of partitions 5 (appdata1) to the end of partition 6 (appdata2). >> > >> > If I modify the wks file and remove the entry for appdata2, the created >> direct file is valid: >> > >> > Num StartEnd Size Fstype >> > 1 12582912 54525951 41943040 fat16 >> > 2 54525952205520895150994944 ext4 >> > 3 205520896356515839150994944 ext4 >> > 4 356515840507510783150994944 ext4 >> > >> > Any suggestions on what is going on here? >> > >> >> I've not checked, but I'd assume it's switched to extended partitions, >> since MBR only has 4 primary partitions. >> >> -- >> Alex Kiernan >> -- >> ___ >> yocto mailing list >> yocto@yoctoproject.org >> https://lists.yoctoproject.org/listinfo/yocto >> > -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] wic creates invalid image
Hi Alex, If you don't want the extended partitions you need to create a gpt partition, you can do this by adding this to your wks file. bootloader --ptable gpt Regards, Dimitris On Tue, 13 Nov 2018, 20:23 Alex Kiernan On Tue, Nov 13, 2018 at 7:13 PM Donal Morrissey > wrote: > > > > Hi There, > > I have a problem with an image being created by wic. If I add more than > 4 partition definitions to the wks file, the generated image will include > an additional partition with no Fstype, and spanning the full length of the > additional partitions. > > > > Take the following wks file: > > > > part --source rawcopy --sourceparams="file= path>/image-r0/uboot.env" --ondisk "mmcblk0" --align 4096 --no-table > > part --source bootimg-partition --ondisk "mmcblk0" --fstype=vfat --label > boot --align 4096 --active --fixed-size 40 > > part --source rootfs --ondisk "mmcblk0" --fstype=ext4 --label primary > --align 4096 --fixed-size 147456k --exclude-path data/ > > part --source rootfs --ondisk "mmcblk0" --fstype=ext4 --label secondary > --align 4096 --fixed-size 147456k --exclude-path data/ > > part --ondisk "mmcblk0" --fstype=ext4 --label appdata1 --align 4096 > --fixed-size 147456k > > part --ondisk "mmcblk0" --fstype=ext4 --label appdata2 --align 4096 > --fixed-size 147456k > > bootloader --ptable msdos > > > > wic will create a .direct file with the following structure: > > Num StartEnd Size Fstype > > 1 12582912 54525951 41943040 fat16 > > 2 54525952205520895150994944 ext4 > > 3 205520896356515839150994944 ext4 > > 4 360709632666894335306184704 > > 5 360710144511705087150994944 ext4 > > 6 515899392666894335150994944 ext4 > > > > Note the start and end addresses of partition 4, it spans from the start > of partitions 5 (appdata1) to the end of partition 6 (appdata2). > > > > If I modify the wks file and remove the entry for appdata2, the created > direct file is valid: > > > > Num StartEnd Size Fstype > > 1 12582912 54525951 41943040 fat16 > > 2 54525952205520895150994944 ext4 > > 3 205520896356515839150994944 ext4 > > 4 356515840507510783150994944 ext4 > > > > Any suggestions on what is going on here? > > > > I've not checked, but I'd assume it's switched to extended partitions, > since MBR only has 4 primary partitions. > > -- > Alex Kiernan > -- > ___ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] wic creates invalid image
On Tue, Nov 13, 2018 at 7:13 PM Donal Morrissey wrote: > > Hi There, > I have a problem with an image being created by wic. If I add more than 4 > partition definitions to the wks file, the generated image will include an > additional partition with no Fstype, and spanning the full length of the > additional partitions. > > Take the following wks file: > > part --source rawcopy --sourceparams="file=/image-r0/uboot.env" > --ondisk "mmcblk0" --align 4096 --no-table > part --source bootimg-partition --ondisk "mmcblk0" --fstype=vfat --label boot > --align 4096 --active --fixed-size 40 > part --source rootfs --ondisk "mmcblk0" --fstype=ext4 --label primary --align > 4096 --fixed-size 147456k --exclude-path data/ > part --source rootfs --ondisk "mmcblk0" --fstype=ext4 --label secondary > --align 4096 --fixed-size 147456k --exclude-path data/ > part --ondisk "mmcblk0" --fstype=ext4 --label appdata1 --align 4096 > --fixed-size 147456k > part --ondisk "mmcblk0" --fstype=ext4 --label appdata2 --align 4096 > --fixed-size 147456k > bootloader --ptable msdos > > wic will create a .direct file with the following structure: > Num StartEnd Size Fstype > 1 12582912 54525951 41943040 fat16 > 2 54525952205520895150994944 ext4 > 3 205520896356515839150994944 ext4 > 4 360709632666894335306184704 > 5 360710144511705087150994944 ext4 > 6 515899392666894335150994944 ext4 > > Note the start and end addresses of partition 4, it spans from the start of > partitions 5 (appdata1) to the end of partition 6 (appdata2). > > If I modify the wks file and remove the entry for appdata2, the created > direct file is valid: > > Num StartEnd Size Fstype > 1 12582912 54525951 41943040 fat16 > 2 54525952205520895150994944 ext4 > 3 205520896356515839150994944 ext4 > 4 356515840507510783150994944 ext4 > > Any suggestions on what is going on here? > I've not checked, but I'd assume it's switched to extended partitions, since MBR only has 4 primary partitions. -- Alex Kiernan -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] wic creates invalid image
Hi There, I have a problem with an image being created by wic. If I add more than 4 partition definitions to the wks file, the generated image will include an additional partition with no Fstype, and spanning the full length of the additional partitions. Take the following wks file: part --source rawcopy --sourceparams="file=/image-r0/uboot.env" --ondisk "mmcblk0" --align 4096 --no-table part --source bootimg-partition --ondisk "mmcblk0" --fstype=vfat --label boot --align 4096 --active --fixed-size 40 part --source rootfs --ondisk "mmcblk0" --fstype=ext4 --label primary --align 4096 --fixed-size 147456k --exclude-path data/ part --source rootfs --ondisk "mmcblk0" --fstype=ext4 --label secondary --align 4096 --fixed-size 147456k --exclude-path data/ part --ondisk "mmcblk0" --fstype=ext4 --label appdata1 --align 4096 --fixed-size 147456k part --ondisk "mmcblk0" --fstype=ext4 --label appdata2 --align 4096 --fixed-size 147456k bootloader --ptable msdos wic will create a .direct file with the following structure: Num StartEnd Size Fstype 1 12582912 54525951 41943040 fat16 2 54525952205520895150994944 ext4 3 205520896356515839150994944 ext4 4 360709632666894335306184704 5 360710144511705087150994944 ext4 6 515899392666894335150994944 ext4 Note the start and end addresses of partition 4, it spans from the start of partitions 5 (appdata1) to the end of partition 6 (appdata2). If I modify the wks file and remove the entry for appdata2, the created direct file is valid: Num StartEnd Size Fstype 1 12582912 54525951 41943040 fat16 2 54525952205520895150994944 ext4 3 205520896356515839150994944 ext4 4 356515840507510783150994944 ext4 Any suggestions on what is going on here? Cheers, Donal -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto