public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* "parted" vs "sfdisk"
@ 2016-08-05 10:19 Robert P. J. Day
  2016-08-05 10:28 ` Gary Thomas
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Robert P. J. Day @ 2016-08-05 10:19 UTC (permalink / raw)
  To: OE Core mailing list


  your personal opinions, if you would -- i'm working on some scripts
to do automated installs on a target board, currently based on
parted, but parted seems a bit dense at times, and awkward, and i'm
thinking of switching to sfdisk.

  for people who have done this sort of thing, do you have any strong
opinions either way of parted versus sfdisk? i realize that's not much
to go on, just curious about personal preferences, and why.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



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

* Re: "parted" vs "sfdisk"
  2016-08-05 10:19 "parted" vs "sfdisk" Robert P. J. Day
@ 2016-08-05 10:28 ` Gary Thomas
  2016-08-05 10:31   ` Robert P. J. Day
  2016-08-05 13:00 ` Andrew Bradford
  2016-08-09 12:22 ` Mike Looijmans
  2 siblings, 1 reply; 6+ messages in thread
From: Gary Thomas @ 2016-08-05 10:28 UTC (permalink / raw)
  To: openembedded-core

On 2016-08-05 12:19, Robert P. J. Day wrote:
>
>   your personal opinions, if you would -- i'm working on some scripts
> to do automated installs on a target board, currently based on
> parted, but parted seems a bit dense at times, and awkward, and i'm
> thinking of switching to sfdisk.
>
>   for people who have done this sort of thing, do you have any strong
> opinions either way of parted versus sfdisk? i realize that's not much
> to go on, just curious about personal preferences, and why.

As you know, I went the other way - I started with sfdisk and
I find parted more intuitive and easier to use.  I also think
it has a better long-term support horizon.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: "parted" vs "sfdisk"
  2016-08-05 10:28 ` Gary Thomas
@ 2016-08-05 10:31   ` Robert P. J. Day
  0 siblings, 0 replies; 6+ messages in thread
From: Robert P. J. Day @ 2016-08-05 10:31 UTC (permalink / raw)
  To: Gary Thomas; +Cc: openembedded-core

On Fri, 5 Aug 2016, Gary Thomas wrote:

> On 2016-08-05 12:19, Robert P. J. Day wrote:
> >
> >   your personal opinions, if you would -- i'm working on some scripts
> > to do automated installs on a target board, currently based on
> > parted, but parted seems a bit dense at times, and awkward, and i'm
> > thinking of switching to sfdisk.
> >
> >   for people who have done this sort of thing, do you have any strong
> > opinions either way of parted versus sfdisk? i realize that's not much
> > to go on, just curious about personal preferences, and why.
>
> As you know, I went the other way - I started with sfdisk and
> I find parted more intuitive and easier to use.  I also think
> it has a better long-term support horizon.

  i figured you'd weigh in on this. :-) i'm going to experiment both
ways for a bit.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



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

* Re: "parted" vs "sfdisk"
  2016-08-05 10:19 "parted" vs "sfdisk" Robert P. J. Day
  2016-08-05 10:28 ` Gary Thomas
@ 2016-08-05 13:00 ` Andrew Bradford
  2016-08-05 14:02   ` Robert P. J. Day
  2016-08-09 12:22 ` Mike Looijmans
  2 siblings, 1 reply; 6+ messages in thread
From: Andrew Bradford @ 2016-08-05 13:00 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list

Hi Robert,

On 08/05 06:19, Robert P. J. Day wrote:
> 
>   your personal opinions, if you would -- i'm working on some scripts
> to do automated installs on a target board, currently based on
> parted, but parted seems a bit dense at times, and awkward, and i'm
> thinking of switching to sfdisk.
> 
>   for people who have done this sort of thing, do you have any strong
> opinions either way of parted versus sfdisk? i realize that's not much
> to go on, just curious about personal preferences, and why.

sfdisk has changed both its input format and command-line options in
recent versions of util-linux.  If you're scripting sfdisk, you need to
be aware of this as some of the people who use your scripts will have
varying versions of util-linux.  For example, in my experience,
util-linux 2.28 in Debian Stretch and util-linux 2.25.2 in Debian Jessie
cannot have their sfdisk executables scripted in the same way and then
produce the same set of partitions when setting up an SD card for an
embedded system.

The change in input format and command-line options happened around
util-linux 2.26-2.27 but I haven't dug into it too much to find out
exactly when.

The newer input format for sfdisk is quite nice, imho, and easy to read.
You can do something like this now:

{
echo "label: dos"
echo "start=1MiB size=32MiB type=0x0C bootable"
echo "start=33MiB"
} | sfdisk ${DEVICE}

While the older sfdisk input format would look something like:

{
echo 1,32,0x0C,*
echo 33,,,-
} | sfdisk ${DEVICE}

Thanks,
Andrew


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

* Re: "parted" vs "sfdisk"
  2016-08-05 13:00 ` Andrew Bradford
@ 2016-08-05 14:02   ` Robert P. J. Day
  0 siblings, 0 replies; 6+ messages in thread
From: Robert P. J. Day @ 2016-08-05 14:02 UTC (permalink / raw)
  To: Andrew Bradford; +Cc: OE Core mailing list

On Fri, 5 Aug 2016, Andrew Bradford wrote:

> Hi Robert,
>
> On 08/05 06:19, Robert P. J. Day wrote:
> >
> >   your personal opinions, if you would -- i'm working on some scripts
> > to do automated installs on a target board, currently based on
> > parted, but parted seems a bit dense at times, and awkward, and i'm
> > thinking of switching to sfdisk.
> >
> >   for people who have done this sort of thing, do you have any strong
> > opinions either way of parted versus sfdisk? i realize that's not much
> > to go on, just curious about personal preferences, and why.
>
> sfdisk has changed both its input format and command-line options in
> recent versions of util-linux.  If you're scripting sfdisk, you need to
> be aware of this as some of the people who use your scripts will have
> varying versions of util-linux.  For example, in my experience,
> util-linux 2.28 in Debian Stretch and util-linux 2.25.2 in Debian Jessie
> cannot have their sfdisk executables scripted in the same way and then
> produce the same set of partitions when setting up an SD card for an
> embedded system.
>
> The change in input format and command-line options happened around
> util-linux 2.26-2.27 but I haven't dug into it too much to find out
> exactly when.
>
> The newer input format for sfdisk is quite nice, imho, and easy to read.
> You can do something like this now:
>
> {
> echo "label: dos"
> echo "start=1MiB size=32MiB type=0x0C bootable"
> echo "start=33MiB"
> } | sfdisk ${DEVICE}
>
> While the older sfdisk input format would look something like:
>
> {
> echo 1,32,0x0C,*
> echo 33,,,-
> } | sfdisk ${DEVICE}

  ah, now *that* i like ... of course, i'd probably use a here
document:

sfdisk ${DEVICE} <<-EOF
	label: dos
	start=1MiB size=32MiB type=0x0C bootable
	start=33MiB"
EOF

pretty sure that would have the same effect, yes?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



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

* Re: "parted" vs "sfdisk"
  2016-08-05 10:19 "parted" vs "sfdisk" Robert P. J. Day
  2016-08-05 10:28 ` Gary Thomas
  2016-08-05 13:00 ` Andrew Bradford
@ 2016-08-09 12:22 ` Mike Looijmans
  2 siblings, 0 replies; 6+ messages in thread
From: Mike Looijmans @ 2016-08-09 12:22 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/html, Size: 5384 bytes --]

[-- Attachment #2: imagee9558b.PNG --]
[-- Type: image/png, Size: 9075 bytes --]

[-- Attachment #3: image4a2ca1.JPG --]
[-- Type: image/jpeg, Size: 1088 bytes --]

[-- Attachment #4: image73d6c1.JPG --]
[-- Type: image/jpeg, Size: 1087 bytes --]

[-- Attachment #5: imagef82dfc.JPG --]
[-- Type: image/jpeg, Size: 1060 bytes --]

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

end of thread, other threads:[~2016-08-09 13:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-05 10:19 "parted" vs "sfdisk" Robert P. J. Day
2016-08-05 10:28 ` Gary Thomas
2016-08-05 10:31   ` Robert P. J. Day
2016-08-05 13:00 ` Andrew Bradford
2016-08-05 14:02   ` Robert P. J. Day
2016-08-09 12:22 ` Mike Looijmans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox