upgrading the sdcard in the Pi4

backstory

I mentioned before that I was seeing some I/O hangs when treating MythTV roughly. I ordered a two-pack U3 64GB cards that were reputed to work great with Pi4s. I just hung onto them until the MythTV box could be down for a while without missing anything.

Since I don’t really have OTA reception out here1 I figured this would be a good time to try the card swap. Wish me luck,

copying to the new card

My main concern was the time/space wasted copying over the pi’s (mostly-empty) ~15GB /root partition. AFAIK dd would faithfully copy every empty sector….

I started googling around and found some bespoke pi sdcard copiers. I decided to try piclone first.

building piclone

This project is hosted at github. On my pi the process was:

  1. git clone https://github.com/raspberrypi-ui/piclone
  2. sudo apt install intltoolize
  3. ./autogen.sh
  4. ./configure
  5. make
  6. sudo make install

using piclone

I ran piclone, picked the source and target, and hit START. It threw some errors related to privs, but this seems to be a vfat thing. The whole process took a maybe 15 minutes.

As far as I can tell piclone handles the “resizing” in a rather clever way

  1. creates the partitions; first one is the same size as the existing /boot partition. The second one that will be /root is sized to the remainder of the drive.
  2. dd or equivalent populates the first partition in the normal sector-by-sector fashion. Not a problem because it’s only ~500MB.
  3. Then the root partition is populated with simple cp copying. This has two neat side effects: the new partition is defragmented and it doesn’t copy empty sectors. Woot!

testing

I checked /etc/fstab partlabel UUIDs and they matched the sdcard partitions. I didn’t check to see if it had renamed the card with the old UUID info or if it updated fstab with the new UUID. Either way, it looked good.

I popped the new card into the pi and it sure seemed to boot faster than before. After it booted I hammered the MythTV interface with the kind of abuse that caused the hangs before; no hangs occurred. Too early to claim unqualified success but it sure seems like it’s happier.

  1. It’s weird. The scan only finds five channels on the 5_[subchannel] carrier. It won’t lock on except between 1-4am or so. Xmitter power increase? Atmosphereic differences? No idea. 

Updated: