[opensuse-arm] kiwi - Add bootflag to partition #2 when vboot is used
Hi Marcus, now, u-boot lists all bootable partitions to look for boot scripts. If no partition has a bootflag, it falls back to 1st partition. This break Chromebook (and maybe Raspberry Pi?) images, since 1st partition is hidden and we use partition 2 for our boot script, kernel and initrd. Could we add the boot flag to partition number 2 when vboot is used? Guillaume -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Am 28.05.2015 um 15:13 schrieb Guillaume Gardet <guillaume.gardet@free.fr>:
Hi Marcus,
now, u-boot lists all bootable partitions to look for boot scripts. If no partition has a bootflag, it falls back to 1st partition. This break Chromebook (and maybe Raspberry Pi?) images, since 1st partition is hidden and we use partition 2 for our boot script, kernel and initrd.
Could we add the boot flag to partition number 2 when vboot is used?
We should be able to do this in out u-boot-install and first boot script, no? Alex
Guillaume
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Le 28/05/2015 15:27, Alexander Graf a écrit :
Am 28.05.2015 um 15:13 schrieb Guillaume Gardet <guillaume.gardet@free.fr>:
Hi Marcus,
now, u-boot lists all bootable partitions to look for boot scripts. If no partition has a bootflag, it falls back to 1st partition. This break Chromebook (and maybe Raspberry Pi?) images, since 1st partition is hidden and we use partition 2 for our boot script, kernel and initrd.
Could we add the boot flag to partition number 2 when vboot is used? We should be able to do this in out u-boot-install and first boot script, no?
Maybe, but you need parted or fdisk tool (not sure they are always available). If it is done during build with kiwi, we should be fine and no need for another hack. ;) For MBR partitions, 1st partition is already flagged as bootable. So, I guess so there is not much work to flag partition #2 bootable when CGPT/vboot is used. Guillaume
Alex
Guillaume
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Hi,
now, u-boot lists all bootable partitions to look for boot scripts. If no partition has a bootflag, it falls back to 1st partition. This break Chromebook (and maybe Raspberry Pi?) images, since 1st partition is hidden and we use partition 2 for our boot script, kernel and initrd.
Could we add the boot flag to partition number 2 when vboot is used?
I can look into this, could you send me the current partition layout parted <device> unit s print Thanks Regards, Marcus -- Public Key available via: https://keybase.io keybase search marcus_schaefer ------------------------------------------------------- Marcus Schäfer (Res. & Dev.) SUSE Linux GmbH Tel: 0911-740 53 0 Maxfeldstrasse 5 FAX: 0911-740 53 479 D-90409 Nürnberg HRB: 21284 (AG Nürnberg) Germany GF: Felix Imendörffer, Jane Smithard GF: Dilip Upmanyu, Graham Norton http://www.suse.de ------------------------------------------------------- -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Le 28/05/2015 16:27, Marcus Schäfer a écrit :
Hi,
now, u-boot lists all bootable partitions to look for boot scripts. If no partition has a bootflag, it falls back to 1st partition. This break Chromebook (and maybe Raspberry Pi?) images, since 1st partition is hidden and we use partition 2 for our boot script, kernel and initrd.
Could we add the boot flag to partition number 2 when vboot is used? I can look into this, could you send me the current partition layout
parted <device> unit s print
On raw files I get: ******************************************************************************** Model: (file) Disk /home/guillaume/perso/Libre/images/factory/openSUSE-Tumbleweed-ARM-JeOS-chromebook.armv7l-1.12.1-Build308.2.raw: 2566144s Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 2048s 411651s 409604s U-BOOT 2 413696s 827395s 413700s ext3 lxboot 3 829440s 2566016s 1736577s ext4 lxroot ******************************************************************************** Boot flag is for #2 : lxboot. Guillaume
Thanks
Regards, Marcus
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Hi,
parted <device> unit s print
On raw files I get: ******************************************************************************** Model: (file) Disk /home/guillaume/perso/Libre/images/factory/openSUSE-Tumbleweed-ARM-JeOS-chromebook.armv7l-1.12.1-Build308.2.raw: 2566144s Sector size (logical/physical): 512B/512B Partition Table: gpt
Number Start End Size File system Name Flags 1 2048s 411651s 409604s U-BOOT 2 413696s 827395s 413700s ext3 lxboot 3 829440s 2566016s 1736577s ext4 lxroot ********************************************************************************
Boot flag is for #2 : lxboot.
Thanks, ok I can certainly set the boot flag to lxboot. However I'm concerned that this table has no boot flag set at all while I'm sure kiwi does set it to one partition. The 'U-BOOT' partition seems to be changed/added by your custom scripts and I suspect this fiddling with the partition table cleaned the boot flag. Because of that I fear even if I change the code in kiwi to set the boot flag to the lxboot partition it will not end up in the final image due to the post processing scripts we maintain in the various image descriptions I have not verified this though Regards, Marcus -- Public Key available via: https://keybase.io keybase search marcus_schaefer ------------------------------------------------------- Marcus Schäfer (Res. & Dev.) SUSE Linux GmbH Tel: 0911-740 53 0 Maxfeldstrasse 5 FAX: 0911-740 53 479 D-90409 Nürnberg HRB: 21284 (AG Nürnberg) Germany GF: Felix Imendörffer, Jane Smithard GF: Dilip Upmanyu, Graham Norton http://www.suse.de ------------------------------------------------------- -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On 28.05.15 16:36, Guillaume Gardet wrote:
Le 28/05/2015 16:27, Marcus Schäfer a écrit :
Hi,
now, u-boot lists all bootable partitions to look for boot scripts. If no partition has a bootflag, it falls back to 1st partition. This break Chromebook (and maybe Raspberry Pi?) images, since 1st partition is hidden and we use partition 2 for our boot script, kernel and initrd.
Could we add the boot flag to partition number 2 when vboot is used? I can look into this, could you send me the current partition layout
parted <device> unit s print
On raw files I get: ********************************************************************************
Model: (file) Disk /home/guillaume/perso/Libre/images/factory/openSUSE-Tumbleweed-ARM-JeOS-chromebook.armv7l-1.12.1-Build308.2.raw: 2566144s Sector size (logical/physical): 512B/512B Partition Table: gpt
Number Start End Size File system Name Flags 1 2048s 411651s 409604s U-BOOT 2 413696s 827395s 413700s ext3 lxboot 3 829440s 2566016s 1736577s ext4 lxroot ********************************************************************************
Boot flag is for #2 : lxboot.
Plase also keep in mind that we're manually creating a hybrid GPT with an MBR reflecting most of the layout. I don't know which label type u-boot prefers in such a case - Linux will use the GPT. The reason this is important is that the hybrid GPT bits are in our scripts, not kiwi. Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Le 28/05/2015 16:54, Alexander Graf a écrit :
On 28.05.15 16:36, Guillaume Gardet wrote:
Le 28/05/2015 16:27, Marcus Schäfer a écrit :
Hi,
now, u-boot lists all bootable partitions to look for boot scripts. If no partition has a bootflag, it falls back to 1st partition. This break Chromebook (and maybe Raspberry Pi?) images, since 1st partition is hidden and we use partition 2 for our boot script, kernel and initrd.
Could we add the boot flag to partition number 2 when vboot is used? I can look into this, could you send me the current partition layout
parted <device> unit s print On raw files I get:
Model: (file) Disk /home/guillaume/perso/Libre/images/factory/openSUSE-Tumbleweed-ARM-JeOS-chromebook.armv7l-1.12.1-Build308.2.raw: 2566144s Sector size (logical/physical): 512B/512B Partition Table: gpt
Number Start End Size File system Name Flags 1 2048s 411651s 409604s U-BOOT 2 413696s 827395s 413700s ext3 lxboot 3 829440s 2566016s 1736577s ext4 lxroot ********************************************************************************
Boot flag is for #2 : lxboot.
Plase also keep in mind that we're manually creating a hybrid GPT with an MBR reflecting most of the layout. I don't know which label type u-boot prefers in such a case - Linux will use the GPT.
u-boot too, I think.
The reason this is important is that the hybrid GPT bits are in our scripts, not kiwi.
Alex
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
participants (3)
-
Alexander Graf
-
Guillaume Gardet
-
Marcus Schäfer