Web lists-archives.com

Re: libgparted bug.

On Sunday 11 February 2018 12:35:54 Thomas Schmitt wrote:

> Hi,
> Gene Heskett wrote:
> > The real problem is of coarse that there has not ever been 2
> > identical sd cards made, so a dd image to the end of the card A,
> > will not ever install that image on another supposedly identical
> > card B or C, they are NOT the same size except in the salespersons
> > mind. Therefore, the image must be constrained to a gig or so beyond
> > the end of the used portion of the card. And some utility is then
> > invoked to look at the card during the initial bootup, that
> > re-expands the last partition to encompass the remainder of THAT
> > card.
> You could install a bumper partition 8 at the end of the card.
> Whatever automat you suffer from, it would have to be extra stupid to
> expand partition 7 into the range of the bumper.
> Let's assume a minimum size of rounded up 16 billion with a "16 GB"
> medium. Then let's subtract a coward's reserve of 100 million bytes,
> and divide by the block size:
>   ( 15.5e9 - 100e6 ) / 512 = 30078125
> So if you create partition 8 starting at block 30,078,125 and reaching
> up to the end of the usable block range, then the image from block 0
> to the end of partition 7 should be portable to any "16 GB" medium.
> Ideally you should delete partition 8 before copying from the original
> medium. So it does not confuse partition editors after the image was
> copied to a new medium.
> The GPT header and the backup GPT would have to be re-created with the
> new medium size. Partition 8 would have to be re-created from the same
> start block up to the end of the usable block range.
> gdisk seems to be able to do this.
> Start blocks for bumpers:
> Rounded up "8 GB"  -  50 MB :  14,550,781
> Rounded up "16 GB" - 100 MB :  30,078,125
> Rounded up "32 GB" - 200 MB :  61,132,812
> Rounded up "64 GB" - 500 MB : 123,046,875
This is all making sense, gee, I wish you were in charge of the man pages 
for all this.

I am atm, pulling a new copy out to count=16501000, which is, or should 
be, a wee bit past the end of partition 7. Then I'll write it to a 32GiB 
card, and have gparted extend #7 to the end of the disk. I did this 
earlier today, but all that got me was a kernel panic. But the write to 
the 32GiB card was likely broken as dd nearly locked up the machine and 
I finally just ejected the card as I couldn't kill dd even as root.

That new copy is made, swap cards wash, rinse & repeat in reverse to a 
32G card.

> Have a nice day :)
You too Thomas. And thank you.

> Thomas

Cheers, Gene Heskett
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>