1 |
Bill Kenworthy <billk@×××××××××.au> [16-01-16 11:04]: |
2 |
> On 16/01/16 17:27, Neil Bothwick wrote: |
3 |
> > On Sat, 16 Jan 2016 04:50:49 +0100, Meino.Cramer@×××.de wrote: |
4 |
> > |
5 |
> >> to post a firmware image of my embedded linux computer |
6 |
> >> to a friend I want to size it down. |
7 |
> >> |
8 |
> >> System wise I did that already (only the really necessary |
9 |
> >> stuff of Gentoo plus some configuration and addons related |
10 |
> >> to the embedded system)...the problem comes with the size of |
11 |
> >> the microSDcard I use: 32 GB.... |
12 |
> >> |
13 |
> >> The microSDcard (source) has two partitions (boot + the rest). |
14 |
> >> The boot partition is the first partition and it is of a fixed |
15 |
> >> and tiny size. The second partition contains the "rest": Gentoo. |
16 |
> >> Currently the used space of this partition is also small. |
17 |
> >> |
18 |
> >> The image needs to be of a format, which makes |
19 |
> >> it possble to 'dd' it onto a microSDcard (target) and afterwards use |
20 |
> >> g/parted to resize/expand the second partition to the end |
21 |
> >> of the microSDcard to get all storage space available. |
22 |
> > |
23 |
> > Quick and kludgy. Partition an SD card of the correct size, rsync your |
24 |
> > data to it, then dd that card. |
25 |
> > |
26 |
> > Any other method you use will require you to have a smaller SD card to |
27 |
> > test the resultant image, so you may as well use that as the source and |
28 |
> > know it works. |
29 |
> > |
30 |
> > |
31 |
> |
32 |
> It is possible to create a dd image of the whole SD card and mount it in |
33 |
> a loopback to repartition etc. |
34 |
> |
35 |
> Mount it then shrink your existing file system (and probably the |
36 |
> partition too) to less than the required size, then recreate the dd |
37 |
> image to a size still less than the new sd card. |
38 |
> |
39 |
> On the new card, dd it across until it errors off, then fix/expand the |
40 |
> partition and then the file system. You dont care if the end is missing |
41 |
> as long as your data is within the size needed. |
42 |
> |
43 |
> BillK |
44 |
> |
45 |
> |
46 |
> |
47 |
Hi Neil, hi Bill, |
48 |
|
49 |
THANKS FOR THE EXPLANATIONS! :) |
50 |
|
51 |
Will try that! |
52 |
|
53 |
Best regards, |
54 |
Meino |