1 |
* Meino.Cramer@×××.de <Meino.Cramer@×××.de> [150730 14:32]: |
2 |
> Hi, |
3 |
> |
4 |
> I have a SDcard of this layout: |
5 |
> Number Start End Size Type File system Flags |
6 |
> 1 4194kB 32.0GB 32.0GB primary fat32 lba |
7 |
> |
8 |
> There are about 11 GByte of data on it. |
9 |
> |
10 |
> The final result should be a SDcard with two partitions. |
11 |
> First a FAT32 with about 20GByte and a second with 10GByte |
12 |
> (ext4). |
13 |
> |
14 |
> I took a look at parted and the resize command, which sounds |
15 |
> a little cryptic to me: |
16 |
> |
17 |
> resizepart partition end |
18 |
> Change the end position of partition. Note that this does not modify any |
19 |
> filesystem present in the partition. |
20 |
> |
21 |
> One should use resize2f for that purpose. |
22 |
> |
23 |
> Firstly I want to shrink the first partition and secondly it is a |
24 |
> plain FAT32 partition not ext-something. I did not find a |
25 |
> "resizefat32" or similiar. |
26 |
> |
27 |
> What tools do I need? |
28 |
> (beside the way to backup the SDcard, reinitialize it, put 2 |
29 |
> partitions on it and copy back the stuff.) |
30 |
> |
31 |
> How can I acchieve what I want? |
32 |
> |
33 |
> Thank you very much in advance for any help! |
34 |
> |
35 |
> Best regards, |
36 |
> Meino |
37 |
|
38 |
Hi Meino, |
39 |
|
40 |
The "difficulty" with shrinking partitions is that you need to shrink |
41 |
the filesystem in the partition first and then change the partition |
42 |
information (which you can then do if you're careful with your favorite |
43 |
partition tool.) |
44 |
|
45 |
There are definitely tools to do this and I'm surprised parted says it |
46 |
doesn't touch the filesystem in the partition (but that might have been |
47 |
a recent parted change?) |
48 |
|
49 |
Personally, since you're going to play around with the partitions and |
50 |
resizing existing filesystems, you should really have a backup. |
51 |
|
52 |
If you're going to have a backup then the easiest thing to me is to |
53 |
create new partitions and then filesystems and then restore from the |
54 |
backup. |
55 |
|
56 |
However, if you really want to live dangerously, the last gparted boot |
57 |
disc image I used could shrink FAT32 filesystems and partitions. You |
58 |
might want to see if it still can do so. |
59 |
|
60 |
Good luck! |
61 |
|
62 |
Todd |