Post

Transferring Raspberry Pi Installation from 8GB to 64GB microSD Card on EndeavourOS

Transferring Raspberry Pi Installation from 8GB to 64GB microSD Card on EndeavourOS

I have a Raspberry Pi 3 Model B+, my first Pi, which has been running with an 8GB microSD card for ages. I also got a Flipper Zero and was looking for an 4 or 8GB card for its use and I figured my old RPi could you use an upgrade. I could save a lot of stuff on 64GB and maybe even try hosting a blog.

Below is the steps I followed to copy the data from 8GB to my laptop (only 1 card reader), prepare the 64GB card, copy the data to the 64GB card and finally expand the filesystem.

These went without any hiccups and RPi3 was able to boot from 64GB microSD card. I heard it could work with 128GB card as well, but I don’t need to do test this right now.

Below steps are for my own reference. Please do your own research before you follow this.

Step 1: Backup Your Data

Before proceeding, ensure you back up any important data on the 64GB microSD card, as the process will erase all data on it.

Step 2: Create an Image of the 8GB microSD Card

  1. Insert the 8GB microSD Card into your card reader.

  2. Open a Terminal.

  3. Identify the Device: Run the following command to find the device identifier for the 8GB card:
    1
    
    lsblk
    

    Look for your 8GB microSD card in the output (e.g., /dev/sdX, where X is a letter).

  4. Create an Image of the 8GB Card: Use the dd command to create an image file of the 8GB card. Replace sdX with the correct device identifier:
    1
    
    sudo dd if=/dev/sdX of=~/pi_backup.img bs=4M status=progress
    

    This command will create an image file named pi_backup.img in your home directory.

  5. Wait for the Process to Complete: This may take some time, depending on the size of the card and the speed of your card reader.

Step 3: Prepare the 64GB microSD Card

  1. Safely Eject the 8GB microSD Card:
    1
    
    sudo umount /dev/sdX
    
  2. Insert the 64GB microSD Card into the card reader.

  3. Identify the Device: Run lsblk again to find the device identifier for the 64GB card (e.g., /dev/sdY).

  4. Repartition the 64GB microSD Card:
    • You can use GParted to repartition the card. If you don’t have it installed, you can install it using:
      1
      
      sudo pacman -S gparted
      
    • Open GParted:
      1
      
      sudo gparted
      
    • Select the 64GB microSD card from the dropdown menu.
    • Delete any existing partitions on the 64GB card.
    • Create a new partition table (choose msdos).
    • Create a new FAT32 partition that uses the entire space.
    • Apply the changes.

Step 4: Write the Image to the 64GB microSD Card

  1. Write the Image: Use the dd command to write the image file to the 64GB card. Replace sdY with the correct device identifier:
    1
    
    sudo dd if=~/pi_backup.img of=/dev/sdY bs=4M status=progress
    
  2. Wait for the Process to Complete: This may take some time.

Step 5: Resize the Filesystem

  1. Insert the 64GB microSD Card into the Raspberry Pi.

  2. Boot the Raspberry Pi.

  3. Open Terminal and run:
    1
    
    sudo raspi-config
    
  4. Navigate to Advanced Options > Expand Filesystem.

  5. Finish and Reboot.

Step 6: Verify the Expansion

After rebooting, check the filesystem size using:

1
df -h

You should see that the filesystem now reflects the full capacity of the 64GB microSD card.

Important Notes

  • Always double-check the device names to avoid overwriting the wrong disk.
  • Make sure to safely eject the microSD cards after the process is complete.
  • If you encounter any issues, ensure that the 64GB card is properly formatted and recognized by your computer.
This post is licensed under CC BY 4.0 by the author.