[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card to a 16Gb Class 10 A1 MicroSD card?



It's Armbian Focal on a Lemaker BananaPro AllWinner ARM A20 SoC device. Boots off the card and is also the root filesystem.  No other physical storage is attached to.

On Sat, 18 Sept 2021 at 13:02, The Wanderer <wanderer@fastmail.fm> wrote:
On 2021-09-18 at 07:53, Reco wrote:

>       Hi.
>
> On Sat, Sep 18, 2021 at 12:35:13PM +0100, Myron wrote:
>> This is relatively easy to do on Windows.
>
> This is true only if you're using that sad excuse for a filesystem
> called NTFS.
>
>> No clue how to do this with Linux.
>
> 1) Plug-in source card, use dump(8) to backup the contents of its
> filesystem.
> 2) Plug-in target card, create appropriate partition(s) on it.
> 3) Make the needed amount of filesystems on a target SD card.
> For ext4 you'll want to use -U option of mkfs to clone filesystem UUIDs
> (i.e. UUID on the target card must be the same compared to the source
> one).
> 4) Use restore(8) to recreate filesystem(s) contents on a target card.
> 5) Unmount filesystems made on a target card.

Will this really be enough?

I'd expect that you'd also need to bring across the bootability
configuration, which - depending on how it's set up on that particular
device - might well require additional steps.

For hard-drive installs you're likely to have a GRUB installation, which
wouldn't be brought across by a measure like this. For a SD-card-based
install I'm not sure, but I'd be a bit surprised to learn that no such
non-filesystem-based configuration is necessary.

--
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw


Reply to: