bigtreetech / CB2

The official repo for the BTT Pi2 and CB2
https://bttwiki.com/Pi2.html
30 stars 4 forks source link

nand-sata-install generates bad /ect/fstab #9

Open SergeDubovsky opened 1 month ago

SergeDubovsky commented 1 month ago

After the nand-sata-install systems fails to boot. The /etc/fstab is set to mount the /media/mmcboot as an ext4. That fails. I tried to change the type to vfat but it still fails to mount the boot with an error: mount: /media/mmcboot: wrong fs type, bad option, bad superblock on /dev/mcblk1p1, missing codepage or helper program, or other error.

The fstab has following options: defaults,noatime,commit=600, errors-remount-ro, x-gvfs-hide

If I mount the /dev/mmcblk1p1 to a custom directory, like /mnt/blk1, it works fine and mount /media/boot works with no issues. The system boots and works fine with the filesystem on the NVMe. Until the reboot.

Any ideas what is going on here? Thank you.

SergeDubovsky commented 1 month ago

update: /etc/fstab

# <file system>                                 <mount point>   <type>  <options>                                                       <dump>  <pass>
tmpfs                                           /tmp            tmpfs   defaults,nosuid                                                 0       0
UUID=88B2-DEBC                                  /media/mmcboot  vfat    defaults                                                        0       2
/media/mmcboot/boot                             /boot           none    bind                                                            0       0
UUID=bc921357-f080-4b71-b929-27b20765d94f       /               ext4    defaults,noatime,commit=600,errors=remount-ro,x-gvfs-hide       0       1

Removed options from the /media/mmcboot. That resolved the issue.

TLDR: nand-sata-install sets the wrong system type and options into fstab.

JohnTheCoolingFan commented 1 month ago

Hos is this related to nvme? This is a problem with the fstab generated by the install script.

SergeDubovsky commented 1 month ago

Thank you. I updated the title. At the time when I opened the issue, it was not clear why NVMe failed to boot.

BTTJUSTIN commented 1 month ago

Thanks for reporting. We will investigate this further get the documentation updated if needed and close this issue out once the updates are uploaded.

zhangyumingsh commented 1 month ago

Thank you. I updated the title. At the time when I opened the issue, it was not clear why NVMe failed to boot.

Starting the system with NVMe requires SPI flash for booting, and currently NVMe booting is not supported

SergeDubovsky commented 1 week ago

Starting the system with NVMe requires SPI flash for booting, and currently NVMe booting is not supported

Yes. I am not implying the NVMe boot. I meant to say "boot with NVMe". In my instance the boot is on eMMC and the root system is on NVMe. It works.

zhangyumingsh commented 5 days ago

Starting the system with NVMe requires SPI flash for booting, and currently NVMe booting is not supported

Yes. I am not implying the NVMe boot. I meant to say "boot with NVMe". In my instance the boot is on eMMC and the root system is on NVMe. It works.

After the kernel starts, it doesn't matter which disk the file system is on, just modify the file system mounting point.