[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?



On Sb, 18 sep 21, 12:35:13, Myron wrote:
> Never done this one with Linux before.  I know that there is less than 16Gb
> of data written to the Class 10 32Gb MicroSD card which is used as the
> primary system storage on a single board system-on-a-chip computer.  What
> I'm after is getting a 16 Gb Class 10 A1 MicroSD card and clone the entire
> system from the 32Gb card to the 16Gb card.
> 
> What I'm after is when I start the SOC computer from the replacement 16Gv
> Class 10 A1 MicroSD card, it will just start like there have been no
> changes, well, apart from there being 16Gb storage and not slower 32Gb
> storage.
> 
> This is relatively easy to do on Windows.  No clue how to do this with
> Linux.

Do you have another Linux (capable) system to work with? In this case 
try GParted, possibly from a live Linux if all your other systems are 
Windows:

https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/11.0.0-live+nonfree/amd64/iso-hybrid/

If all you have to work with is the Linux system itself you need to do 
an "online resize" of the filesystem(s) and then adjust the partition 
table to match[1].

Before starting the operation make sure you are shrinking to the correct 
size, because many SD cards are slightly smaller than advertised. If in 
doubt shrink more, copy and then grow (online grow is mostly the same as 
shrink -- in reverse order -- and will be much faster as there is no 
data to move around).

Please post the full output of:

    fdisk -l
    lsblk -f

    (use sudo or root as needed)

with both SD cards plugged in case you need assistance with the manual 
method.

[1] yes, the partition and the filesystem within it can be adjusted 
independently, even for NTFS. The graphical tools (GParted included) 
just show this to be one operation.

Hope this helps,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

Attachment: signature.asc
Description: PGP signature


Reply to: