All of lore.kernel.org
 help / color / mirror / Atom feed
* wic: Setting partition id value?
@ 2016-02-10 17:23 Usman, Fahad
  2016-02-11  2:03 ` Jon Szymaniak
  2016-02-11  6:36 ` Ed Bartosh
  0 siblings, 2 replies; 5+ messages in thread
From: Usman, Fahad @ 2016-02-10 17:23 UTC (permalink / raw)
  To: yocto

Hi,
Is there a way to create a partition with an arbitrary partition id, 
using wic tool. We want to create a disk image using wic for Altera 
Cyclone V. It require the partition id to be set to a particular hex 
value for the partition it reads the boot loader binary from. The 
partition id does get set automatically to the correct value depending 
on the value of fstype (eg. 0x83 for ext3 or 0x0c for fat32), but I 
couldn't find a way to set it to an arbitrary value.

Best regards,
Fahad Usman.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wic: Setting partition id value?
  2016-02-10 17:23 wic: Setting partition id value? Usman, Fahad
@ 2016-02-11  2:03 ` Jon Szymaniak
  2016-02-11  7:31   ` Usman, Fahad
  2016-02-11  6:36 ` Ed Bartosh
  1 sibling, 1 reply; 5+ messages in thread
From: Jon Szymaniak @ 2016-02-11  2:03 UTC (permalink / raw)
  To: Usman, Fahad; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 747 bytes --]

On Feb 10, 2016 12:24 PM, "Usman, Fahad" <Fahad_Usman@mentor.com> wrote:
>
> Hi,
> Is there a way to create a partition with an arbitrary partition id,
using wic tool. We want to create a disk image using wic for Altera Cyclone
V. It require the partition id to be set to a particular hex value for the
partition it reads the boot loader binary from. The partition id does get
set automatically to the correct value depending on the value of fstype
(eg. 0x83 for ext3 or 0x0c for fat32), but I couldn't find a way to set it
to an arbitrary value.
>

I ran into this problem as well, but with parted. My hack was to use dd to
write the correct type ID into the image's MBR after I finished creating
the partitions on the image file.

[-- Attachment #2: Type: text/html, Size: 879 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wic: Setting partition id value?
  2016-02-10 17:23 wic: Setting partition id value? Usman, Fahad
  2016-02-11  2:03 ` Jon Szymaniak
@ 2016-02-11  6:36 ` Ed Bartosh
  2016-02-11 10:46   ` Usman, Fahad
  1 sibling, 1 reply; 5+ messages in thread
From: Ed Bartosh @ 2016-02-11  6:36 UTC (permalink / raw)
  To: Usman, Fahad; +Cc: yocto

On Wed, Feb 10, 2016 at 10:23:13PM +0500, Usman, Fahad wrote:
> Hi,
> Is there a way to create a partition with an arbitrary partition id,
> using wic tool. We want to create a disk image using wic for Altera
> Cyclone V. It require the partition id to be set to a particular hex
> value for the partition it reads the boot loader binary from. The
> partition id does get set automatically to the correct value
> depending on the value of fstype (eg. 0x83 for ext3 or 0x0c for
> fat32), but I couldn't find a way to set it to an arbitrary value.
>

This is not supported by wic, but shouldn't be hard to implement.
Please create an issue in bugzilla and assign to me if you want me to
do it.

--
Regards,
Ed


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wic: Setting partition id value?
  2016-02-11  2:03 ` Jon Szymaniak
@ 2016-02-11  7:31   ` Usman, Fahad
  0 siblings, 0 replies; 5+ messages in thread
From: Usman, Fahad @ 2016-02-11  7:31 UTC (permalink / raw)
  To: Jon Szymaniak; +Cc: yocto

On 02/11/2016 07:03 AM, Jon Szymaniak wrote:
> I ran into this problem as well, but with parted. My hack was to use 
> dd to write the correct type ID into the image's MBR after I finished 
> creating the partitions on the image file.
Thanks Jon Szymaniak,
I was also thinking about a similar solution, the reason wic has this 
limitation is probably because it uses parted under the hood and parted 
doesn't allow you to set the partition id to an arbitrary value. A safer 
way to do this might be with the help of fdisk as it allows you to 
change partition's system id using the 't' sub command in interactive 
mode. But I am looking for a way to do this using existing options in wic.

Regards,
Fahad Usman.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wic: Setting partition id value?
  2016-02-11  6:36 ` Ed Bartosh
@ 2016-02-11 10:46   ` Usman, Fahad
  0 siblings, 0 replies; 5+ messages in thread
From: Usman, Fahad @ 2016-02-11 10:46 UTC (permalink / raw)
  To: ed.bartosh; +Cc: yocto

On 02/11/2016 11:36 AM, Ed Bartosh wrote:
> This is not supported by wic, but shouldn't be hard to implement.
> Please create an issue in bugzilla and assign to me if you want me to
> do it.
Thanks Ed,
I have created this bug, 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=9096. Do let me know 
if you need any more information.

--
Regards,
Fahad.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-11 10:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-10 17:23 wic: Setting partition id value? Usman, Fahad
2016-02-11  2:03 ` Jon Szymaniak
2016-02-11  7:31   ` Usman, Fahad
2016-02-11  6:36 ` Ed Bartosh
2016-02-11 10:46   ` Usman, Fahad

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.