swap eMMC advice
#1
I have a 64 G eMMC that came with my Pinebook pro and I decided to upgrade to 128. I got a new one here from pine64 and also the USB adapter. My plan was to use the USB adapter with the 128 G drive and do a dd copy from the existing drive to the new one, then swap them out. I understand that there may be some UUIDs or some other values I will need to change, but before I start messing around and killing a weekend I thought I would ask around and see if my general plan is sound.

Any problems I should look out for or other friendly advice anyone wants to give?

(I also got the audio-serial adapter to debug things when it DOES go wrong)
  Reply
#2
I just did this going from 128G to 256G. My process was,
- Create & edit the partition table on the new emmc with gparted. Leave 32M at the beginning for the bootloader, create a 500MB FAT16-formatted boot partition, make the rest one lvm2 physical volume.

- dd the bootloader files that the u-boot package leaves in /boot to the new boot partition.

- Decide on the partition layout, sizes and filesystems I want to start with this time. This is an opportunity to change anything. For ext4, also check the inode usage with df -i and adjust the inode ratio for the new partitions so usage will be about 25%, not 3% or less. The default bytes per inode ratio has not been changed in decades and is too low for most systems due to average file sizes having increased.

- Create the lvm2 volume group. The default physical extent size of 4k is rather small, I prefer more like 256m. Create the logical volumes, format them and mount them.

- Edit /etc/mkinitcpio.conf to add lvm2 hooks, since the prior system wasn't using it. Rebuild initramfs.

- rsync everything over. Make sure to get the new initramfs in the new /boot.

- Edit the new /boot/extlinux/extlinux.conf. At least you need to change the root device.

- Edit the new /etc/fstab so it will find and mount the new partitions / logical volumes.

I think that was everything.
  Reply
#3
My original emmc was about to die after a few years. I then bought a 256GB emmc from Amazon. I went with Amazon for three reasons: Pine charges horrendous shipping fees and if I recall correctly the 256GB emmc was cheaper than Pine's 128GB emmc and I'm frustrated with the quality of Pine's emmcs [see thread https://forum.pine64.org/showthread.php?tid=15121].

It's always good to have linux on an SD card so when something fails on the emmc you can boot the SD card and investigate the emmc.

1. I booted linux on the SD card, did a dd of the emmc over wifi to some desktop computer (sshfs, nfs or some creative scp command will all work).

2. I shut down linux. I then swapped the emmcs (old out, new in).

3. I booted linux on the SD card, did a dd back over wifi from the desktop onto the new emmc.

4. While still having booted linux from the sd card, I changed the partition size of the last partition to extend to the full size of the new emmc and resized its filesystem. That's it - you don't need to change UUIDs. That becomes a little trickier when your partitions are encrypted.

dd has some nice options to ignore unallocated space. That speeds up dding out and in the emmc. That also reduced number writes and that is always good for emmcs.

You can use your usb adapter instead of wifi. You should not dd out the old emmc when you booted from it (the running system makes minor changes to the filesystem as you dd out the raw version). You should dd the old emmc on the new emmc on the usb adapter from a linux running from SD card. Then don't forget my step 4.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need new eMMC Karsten1 2 2,584 10-23-2025, 09:38 AM
Last Post: jceaser
  Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... Paulie420 42 89,257 11-20-2023, 06:22 PM
Last Post: wdt
  I'm booting from NVME but I want to switch back to eMMC acruhl 4 4,559 04-23-2023, 06:58 AM
Last Post: acruhl
  Doesn’t power on after flashing emmc badguru 3 3,773 02-25-2023, 09:00 PM
Last Post: badguru
  eMMC problem with Tow-Boot/u-boot on SPI repa 3 4,002 02-21-2023, 01:49 AM
Last Post: repa
  Partial boot after installing Manjaro on emmc regivanx 11 8,513 02-06-2023, 09:11 AM
Last Post: wdt
  Unable to Boot anything (emmc or SDcard) line72 5 5,129 01-17-2023, 12:07 PM
Last Post: nfms
  What OS have you recently flashed onto PBP eMMC? jcun4128 6 5,500 11-26-2022, 09:39 AM
Last Post: KC9UDX
  Unable to boot from emmc after flashing it rfm83 3 4,215 11-08-2022, 10:59 PM
Last Post: rfm83
  Pinebook picky about which EMMC will boot flatulent_piney 8 7,265 11-05-2022, 06:03 PM
Last Post: ajtravis

Forum Jump:


Users browsing this thread: 1 Guest(s)