Raspberry Pi SD Card Cloning
Given a Raspberry Pi with a 32GB SD card, the user decided to upgrade to a 128GB SD card for Raspberry Pi 5. Therefore, they cloned the old card to the new one using:
sudo dd if=/dev/sdX of=/dev/sdY
Explanation
The command sudo dd is used to clone the entire disk, sector by sector. The if (input file) option specifies the source device, which is the old SD card (/dev/sdX). The of (output file) option specifies the destination device, which is the new SD card (/dev/sdY).
Notes
- Replace sdX with the appropriate letter for the old SD card (e.g.,
sdc). - Replace sdY with the appropriate letter for the new SD card (e.g.,
sdb). - This command will erase all data on the destination device, so make sure to backup any important data before proceeding.
References
- dd Command - Raspberry Pi Documentation