# resize partition on micro SD using gparted MiB or cylinder alignment



## blo (Jul 5, 2008)

Hi long time no see...
Sorry about heading... its a micro sd, not usb pen drive, but I cant change it for some reason... Maybe a moderator can change it to micro sd........
i'm trying to work out the right partition size for a fake capacity Micro-SD. I will bin it if it comes to it, (so i don't want anyone to tell me that, thank you), but I would like to run a kali linix live partition with persistence on it. I'm never going to put any important stuff on it, so it doesn't matter if it messes up in the future.
I know how to make the Kali Live with persistence, but need help in making the right choice of disc alignment and partitionin size in gparted. It is a fake 32 gigabyte drive which is only 8GB really... There is no specific reflash programs for this card, so I'm going to format it to under just under 8GB.
??? I want to know which of the below options to use for disc format... MiB or Cylinder Alignment ???
I can then work out how to convert the amount of bytes reported good by h2testw, and convert them to MiB/KiB to set the size in gparted. (If I need to use MiB).
Below, is what gparted manual says, but however many times I read it, I don't know which option to choose... I know what the tip is suggesting, (Use MiB), but is that correct for an SD Card!

GParted Manual Says:
Use*MiB*alignment for modern operating systems. This setting aligns partitions to start and end on precise mebibyte (1,048,576 byte) boundaries. MiB alignment provides enhanced performance when used with RAID systems and with Solid State Drives, such as USB flash drives.

Use*Cylinder*alignment to maintain compatibility with operating systems released before the year 2000, such as DOS. This setting aligns partitions to start and end on disk cylinder boundaries.

Tip
The Cylinder/Head/Sector values reported by modern disk devices no longer have a direct physical relationship to the data stored on the disk device. Hence it is no longer valid to use this alignment setting to achieve enhanced performance.
...
Many thanks, in advance. Blo.


----------



## hal8000 (Dec 23, 2006)

*Re: resize partition on USB pen drive using gparted MiB or cylinder alignment*

You dont need to touch the geometry just follow the documentation:

Kali Linux Live USB Install | Kali Linux Official Documentation

Burning the ISO image with dd will fix the size the partition size at 2.9G or whatever size the USB image is.

If you add a persistance image the docs are here:
Kali Linux Live USB Persistence | Kali Linux Official Documentation


----------



## blo (Jul 5, 2008)

hal8000 said:


> You dont need to touch the geometry[/URL]


Hi and thank you for your reply. Please don't think i'm being argumentative, or arrogant, but i've made live usb's before, and know that they make, and size their own partition, leaving the rest of the disc un-allocated. However if i use all of the un-allocated space for the second partition then eventually, some write operations will fall outside of the 'real' 8GB capacity causing data loss, hence my question.
I've reduced the partition to about 7.5GB, (and tested it with H2TestW), and tomorrow, when I make it persistent, I'm going to have to make the combined size of both partitions add up to no more than the 7.5GB that I tested, to prevent any future data loss... I hope you understand my theory.
I didnt want to waste any more time converting bytes into MiB/KiB etc, so i understated the actual space a little... Hence, the 7.5GB... sometimes my OCD gets the better of me! Lol.
Anyway, just to clarify... For a USB, or SD Card, you use the MiB option in gparted... Is that right?
Many thanks -Blo.


----------



## blo (Jul 5, 2008)

Oh dear! Another day, and the answer is apparent (MiB)... I must remember not to mess with computers after a pint of cider!


----------



## VividProfessional (Apr 29, 2009)

some of my best coding has been done after alcohol!


----------



## blo (Jul 5, 2008)

Me too... it supresses inhibition!
But after some reckless f-ups without a backup, it sometimes makes me too cautious too!
I think next time, I'll continue drinking to see where it takes me. Lol.


----------



## hal8000 (Dec 23, 2006)

blo said:


> I've reduced the partition to about 7.5GB, (and tested it with H2TestW), and tomorrow, when I make it persistent, I'm going to have to make the combined size of both partitions add up to no more than the 7.5GB that I tested, to prevent any future data loss... I hope you understand my theory.
> I didnt want to waste any more time converting bytes into MiB/KiB etc, so i understated the actual space a little... Hence, the 7.5GB... sometimes my OCD gets the better of me! Lol.
> Anyway, just to clarify... For a USB, or SD Card, you use the MiB option in gparted... Is that right?
> Many thanks -Blo.



No, dont use gparted, just parted from the shell.
The instructions are in the link:
Kali Linux Live USB Persistence | Kali Linux Official Documentation

Look at step 2 which creates a 5gb partition, just change the 5gb if you need a smaller partition.


----------

