J. Roeleveld <[email protected]> [16-01-16 07:24]: > On 16 January 2016 04:50:49 CET, [email protected] wrote: > >Hi, > > > >to post a firmware image of my embedded linux computer > >to a friend I want to size it down. > > > >System wise I did that already (only the really necessary > >stuff of Gentoo plus some configuration and addons related > >to the embedded system)...the problem comes with the size of > >the microSDcard I use: 32 GB.... > > > >The microSDcard (source) has two partitions (boot + the rest). > >The boot partition is the first partition and it is of a fixed > >and tiny size. The second partition contains the "rest": Gentoo. > >Currently the used space of this partition is also small. > > > >The image needs to be of a format, which makes > >it possble to 'dd' it onto a microSDcard (target) and afterwards use > >g/parted to resize/expand the second partition to the end > >of the microSDcard to get all storage space available. > > > >If I dd the source into an image I get all those zeroes also and > >the image only will fit onto a microSDcard (target) of at least > >the same size. > > > >If I dd each partition separately I get two files and the partition > >table is not copied...may be technically possible but not user > >friendly. > > > >How can I manage to get an image from my microSDcard (source), which > >only consists of the used space in a way that it can be put onto > >another microSDcard (target) in the waay described above? > > > >How can I acchieve that magic ? ;) :) > > > >Thank you very much in advance for any help! > >Best regards, > >Meino > > I would create a script that partitions and formats the sdcard. > Then untar the contents of the partitions > Then set up the bootloader. > > This should lead to a small size which is also user friendly. > > -- > Joost > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. >
Hi Joost, thanks for your help. Due to technical circumstances I am urged to use the "dd-way" to create the contents. How can I accomplish, what I have described? Thank you very much in advance for any help ! :) Best regards, Meino

