PINE64
[Manjaro] Fixing /etc/fstab from serial console while using lvm2 - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98)
+--- Forum: Linux on RockPro64 (https://forum.pine64.org/forumdisplay.php?fid=101)
+--- Thread: [Manjaro] Fixing /etc/fstab from serial console while using lvm2 (/showthread.php?tid=20040)



[Manjaro] Fixing /etc/fstab from serial console while using lvm2 - Dendrocalamus64 - 10-16-2025

"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

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.