Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Creating an firmware image from a too large microSDcard...?
Date: Sat, 16 Jan 2016 17:00:18
Message-Id: 2E7EB388-54B5-43D2-BD06-18E6693C9F96@digimed.co.uk
In Reply to: Re: [gentoo-user] Creating an firmware image from a too large microSDcard...? by Meino.Cramer@gmx.de
1 On 16 January 2016 12:27:15 GMT+00:00, Meino.Cramer@×××.de wrote:
2 > Neil Bothwick <neil@××××××××××.uk> [16-01-16 13:23]:
3 > > On Sat, 16 Jan 2016 13:02:04 +0100, Meino.Cramer@×××.de wrote:
4 > >
5 > > > You dd the image on a sdcard, put that one in a reader, copy two
6 > files
7 > > > from /boot to /media/boot, put the sdcard into the OrangePI-PC,
8 > boot
9 > > > it, log in via ssh and call a script named "fs_resize", the miniPC
10 > > > reboots...and VOILA!
11 > > >
12 > > > Now I want to create such an image from parts of another image
13 > > > (kernel, firmware) and a bootable Gentoo minimal setup.
14 > > >
15 > > > For that I need to understand the trick which is used to create
16 > such
17 > > > images.
18 > >
19 > > Raspbian images do a similar thing, with an option in raspi_config
20 > to
21 > > resize the root filesystem to fill the card. There's no real trick,
22 > just
23 > > create the system you want on the smallest SD card that will hold
24 > it,
25 > > include the resize script and dd that card to an image.
26 > >
27 > >
28 > > --
29 > > Neil Bothwick
30 > >
31 > > Copper wire was invented by two Scotsmen fighting over a penny!
32 >
33 > My problem is, that I dont know which will be the final size of
34 > that image. So I will take a sdcard, which is big enough in
35 > any case.....and end up with the problem, which caused my first
36 > posting of this thread....;)
37 > And I am not owning a great variety of sdcards...especially when
38 > it comes to feature of being EMPTY sdcards...;)
39 >
40 > Best regards,
41 > Meino
42
43 Set it up on your 32GB card then, when you know how much space it uses, rsync it to a suitable card, like I said previously. You'll need a smaller card anyway, to test that it works, and microSD cards are really cheap now.
44 --
45 Sent from my Android phone with K-9 Mail. Please excuse my brevity.