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 11:32:42
Message-Id: 20160116113222.025ba903@digimed.co.uk
In Reply to: Re: [gentoo-user] Creating an firmware image from a too large microSDcard...? by Bill Kenworthy
1 On Sat, 16 Jan 2016 17:53:18 +0800, Bill Kenworthy wrote:
2
3 > It is possible to create a dd image of the whole SD card and mount it in
4 > a loopback to repartition etc.
5 >
6 > Mount it then shrink your existing file system (and probably the
7 > partition too) to less than the required size, then recreate the dd
8 > image to a size still less than the new sd card.
9 >
10 > On the new card, dd it across until it errors off, then fix/expand the
11 > partition and then the file system. You dont care if the end is missing
12 > as long as your data is within the size needed.
13
14 I get the impression that Meino is trying to keep it as simple as
15 possible for the other user, so fixing after errors is not a good idea.
16 Otherwise you could do what you suggest with the original card, shrink the
17 filesystem and partition to fit a smaller card then create a dd image
18 that will overflow but should work.
19
20
21 --
22 Neil Bothwick
23
24 RISC: Reduced Into Silly Code

Replies