0

In a previous posting, the Replication of a Raspberry pi SD Card is performed on an identical target SD card. If the goal is to replicate to a larger SD card with the same procedure:

If the source device is /dev/sdb and the target device is /dev/sdc. To replicate the SD card, run the following command as root:

sudo cat /dev/sdb >/dev/sdc

The SD card would need to be modified to extend the partition to utilize the incremental space on the larger SD card.

  1. What are the options to extend the partition and is there a best-practice?
  2. Is there a better (single step) command than cat that replicates the smaller SD card to the larger device and ensures the maximum size partition?

Is there a "best practice" or context-driven decision making process ("It depends on ....")?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
gatorback
  • 1,384
  • 23
  • 48
  • I'm not sure, but the raspberry pi boot scripts might do this for you already, or they used to. Here: somebody doesn't want it: https://raspberrypi.stackexchange.com/questions/56621/temporarily-disable-expand-filesystem-during-first-boot – A.B Dec 08 '19 at 11:38
  • @A.B After burning a Raspbian "disk", I have used raspbian's raspi-config utility to resize the disk and enable Raspbian to utilize the entirety of the SD-Card. In this exercise, raspi-config is not available because a different distro is replicated. Maybe this functionality common to all rPi Distros? – gatorback Dec 08 '19 at 16:16
  • @JeffSchaller: I noticed that the cat tag was removed. Please help me understand the why, so that I can make better decisions when choosing tags – gatorback Dec 08 '19 at 17:36
  • It seemed to me that the cat command was incidental to the question -- that it was either a predecessor or successor to a re-partioning step or was to be replaced by a "better (single step) command". Feel free to re-add it if you think it's central to the question. @gatorback – Jeff Schaller Dec 08 '19 at 19:13

1 Answers1

1

If you're replicating it on a PC and not the pi you can probably use gparted to copy and then enlarge the partition.

Glenn
  • 11