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


Groups > linux.debian.user > #240792

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-10-02 14:10 +0200
Message-ID <D3M02-1Ro-1@gated-at.bofh.it> (permalink)
References (4 earlier) <D36at-1aI-3@gated-at.bofh.it> <D36at-1aI-5@gated-at.bofh.it> <D36at-1aI-1@gated-at.bofh.it> <D39Bp-3kr-43@gated-at.bofh.it> <D3kds-1C2-3@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 Vi, 01 oct 21, 09:23:52, Andrei POPESCU wrote:
> On Jo, 30 sep 21, 21:51:20, Reco wrote:
> > 
> > On Thu, Sep 30, 2021 at 04:26:18PM +0100, Myron wrote:
> > 
> > > Does it mean that if I remove the partition and then re-create the
> > > partition from the same starting block as the old partition, that the data
> > > on the MicroSD card will not actually be erased, but will be encapsulated
> > > by the new smaller partition?
> > 
> > Haha. You won't be able to do that, Red Hat took care of it back in 3.2
> > kernel days. You cannot cannot change a partition layout on a block
> > device which has any filesystem mounted (or swap is used), the kernel
> > won't permit you to do that. Red Hat deserved and deserves whatever
> > things IBM is doing to them now, let's leave it at this.
> > Moreover, even if was possible, you'd need to shrink the filesystem
> > first, or you will damage it. And shrinking a mounted ext4 is impossible.
>  
> [citation needed]

Apologies, I should have checked it before challenging that. From 
resize2fs(8):

    If the filesystem is mounted, it can be used to expand the size of 
    the mounted filesystem, assuming the kernel and the file system 
    supports  on-line resizing.

so ext4 indeed doesn't support online shrinking.

According to Wikipedia it seems very few file systems do (notable 
exceptions btrfs and (!) NTFS).

https://en.wikipedia.org/wiki/Comparison_of_file_systems#Resize_capabilities
 
> > It's plain and downright impossible, unless you're using LVM. And even
> > then it's filesystem-specific, which excludes ext4 for instance. Sorry
> > to bring you the bad news.

> https://linuxconfig.org/how-to-resize-ext4-root-partition-live-without-umount

This however implies growing should be possible.

Kind regards,
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