10 hours ago
"Remember, it's not an adventure if part of it doesn't suck!"
I just moved my Rockpro64 from a 128GB emmc to a 256GB emmc, and I remembered everything except one thing: Updating /etc/fstab to use different UUIDs before swapping the emmcs. So it wouldn't finish booting. I attach the serial console, figure out what the problem is, and the question is, how do you fix it without using anything else?
I was in U-Boot to begin with, so we want to get to the initramfs where we have lvm tools. We have commands like 'fatls mmc 0:1' to look around. (List files on a FAT-formatted filesystem, emmc interface, device 0, partition 1)
https://docs.u-boot.org/en/stable/usage/index.html
https://docs.u-boot.org/en/stable/usage/cmd/booti.html
Now we are in the initramfs environment.
Done, now we can reboot.
I just moved my Rockpro64 from a 128GB emmc to a 256GB emmc, and I remembered everything except one thing: Updating /etc/fstab to use different UUIDs before swapping the emmcs. So it wouldn't finish booting. I attach the serial console, figure out what the problem is, and the question is, how do you fix it without using anything else?
I was in U-Boot to begin with, so we want to get to the initramfs where we have lvm tools. We have commands like 'fatls mmc 0:1' to look around. (List files on a FAT-formatted filesystem, emmc interface, device 0, partition 1)
https://docs.u-boot.org/en/stable/usage/index.html
https://docs.u-boot.org/en/stable/usage/cmd/booti.html
Code:
setenv bootargs break
fatload mmc 0:1 $fdt_addr_r /dtbs/rockchip/rk3399-rockpro64.dtb
fatload mmc 0:1 $kernel_addr_r Image
fatload mmc 0:1 $ramdisk_addr_r initramfs-linux.img
booti $kernel_addr_r $ramdisk_addr_r:$filesize $fdt_addr_r
Now we are in the initramfs environment.
Code:
# blkid
# mkdir /mnt
# mount /dev/VG1/LV1 /mnt
# chroot /mnt
# vi /etc/fstab
Done, now we can reboot.