Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Creating an firmware image from a too large microSDcard...?
Date: Sat, 16 Jan 2016 06:13:58
Message-Id: 0B90280E-7AB9-4B7F-996D-735CA15C78AE@antarean.org
In Reply to: [gentoo-user] Creating an firmware image from a too large microSDcard...? by Meino.Cramer@gmx.de
1 On 16 January 2016 04:50:49 CET, Meino.Cramer@×××.de wrote:
2 >Hi,
3 >
4 >to post a firmware image of my embedded linux computer
5 >to a friend I want to size it down.
6 >
7 >System wise I did that already (only the really necessary
8 >stuff of Gentoo plus some configuration and addons related
9 >to the embedded system)...the problem comes with the size of
10 >the microSDcard I use: 32 GB....
11 >
12 >The microSDcard (source) has two partitions (boot + the rest).
13 >The boot partition is the first partition and it is of a fixed
14 >and tiny size. The second partition contains the "rest": Gentoo.
15 >Currently the used space of this partition is also small.
16 >
17 >The image needs to be of a format, which makes
18 >it possble to 'dd' it onto a microSDcard (target) and afterwards use
19 >g/parted to resize/expand the second partition to the end
20 >of the microSDcard to get all storage space available.
21 >
22 >If I dd the source into an image I get all those zeroes also and
23 >the image only will fit onto a microSDcard (target) of at least
24 >the same size.
25 >
26 >If I dd each partition separately I get two files and the partition
27 >table is not copied...may be technically possible but not user
28 >friendly.
29 >
30 >How can I manage to get an image from my microSDcard (source), which
31 >only consists of the used space in a way that it can be put onto
32 >another microSDcard (target) in the waay described above?
33 >
34 >How can I acchieve that magic ? ;) :)
35 >
36 >Thank you very much in advance for any help!
37 >Best regards,
38 >Meino
39
40 I would create a script that partitions and formats the sdcard.
41 Then untar the contents of the partitions
42 Then set up the bootloader.
43
44 This should lead to a small size which is also user friendly.
45
46 --
47 Joost
48 --
49 Sent from my Android device with K-9 Mail. Please excuse my brevity.

Replies