Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #240136

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

From Andrei POPESCU <andreimpopescu@gmail.com>
Newsgroups linux.debian.user
Subject Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card to a 16Gb Class 10 A1 MicroSD card?
Date 2021-09-19 07:00 +0200
Message-ID <CYX5L-2Kk-3@gated-at.bofh.it> (permalink)
References <CYH10-1gf-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card to a  16Gb Class 10 A1 MicroSD card? Myron <myron@co-hop.uk> - 2021-09-18 13:50 +0200
  Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Reco <recoverym4n@enotuniq.net> - 2021-09-18 14:00 +0200
    Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? The Wanderer <wanderer@fastmail.fm> - 2021-09-18 14:10 +0200
      Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Reco <recoverym4n@enotuniq.net> - 2021-09-18 14:40 +0200
        Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? The Wanderer <wanderer@fastmail.fm> - 2021-09-18 14:50 +0200
          Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Reco <recoverym4n@enotuniq.net> - 2021-09-18 15:00 +0200
      Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Myron <myron@co-hop.uk> - 2021-09-27 14:50 +0200
    Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Myron <myron@co-hop.uk> - 2021-09-27 14:40 +0200
      Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Reco <recoverym4n@enotuniq.net> - 2021-09-27 16:40 +0200
        Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Myron <myron@co-hop.uk> - 2021-09-30 17:40 +0200
          Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Reco <recoverym4n@enotuniq.net> - 2021-09-30 21:10 +0200
            Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? "Andrew M.A. Cater" <amacater@einval.com> - 2021-09-30 21:50 +0200
            Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Andrei POPESCU <andreimpopescu@gmail.com> - 2021-10-01 08:30 +0200
              Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Andrei POPESCU <andreimpopescu@gmail.com> - 2021-10-02 14:10 +0200
          Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Andrei POPESCU <andreimpopescu@gmail.com> - 2021-10-02 08:20 +0200
  Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? "Andrew M.A. Cater" <amacater@einval.com> - 2021-09-18 15:40 +0200
  Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? David Christensen <dpchrist@holgerdanske.com> - 2021-09-18 21:30 +0200
    Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Myron <myron@co-hop.uk> - 2021-09-27 15:00 +0200
    Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Myron <myron@co-hop.uk> - 2021-09-27 21:30 +0200
  Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Andrei POPESCU <andreimpopescu@gmail.com> - 2021-09-19 07:00 +0200
    Re: How do I clone a Debian Distro from a 32Gb Class 10 MicroSD card  to a 16Gb Class 10 A1 MicroSD card? Myron <myron@co-hop.uk> - 2021-09-27 15:00 +0200

csiph-web