The section at the end allows the original on-board file system to be accessed.
Keep in mind that after expanding to the SD card, the Linux processor still boots from the on-board flash using the on-board file system. Part way through the boot, after the kernel has been loaded and it has enough software to be able to talk to the SD card, it mounts the SD file system and finishes booting from that.
The last section of fstab that I added mounts the original on-board file system to allow access to it after the system has switched over to the SD card. If I look at the original on-board fstab at /overlay-boot/etc/config/fstab, I see:
Ah, that must be it! Great!
So does it meant what gets mounted depends both on the flash fstab content and the one on the SD card?
I.e. it still mounts the stuff on the flash fstab file?
But if I want to add for example a swap partition can I add it to the 'new' fstab file?
NewLine:
So does it meant what gets mounted depends both on the flash fstab content and the one on the SD card?
I.e. it still mounts the stuff on the flash fstab file?
My understanding is that it starts using the file system in internal flash. During the boot process it uses that system's fstab, and in there it has the instructions to load the overlay file system (the ext4 partition on the SD card.)
Once it overlays the file system, the root of the SD card's ext4 file system replaces the flash system's root. That's the root folder that is accessible once the system is booted. The on-board flash file system is no longer accessible, unless you explicitly mount it as I did by adding those extra lines to fstab on the SD card.
So, while I may have some details wrong in the above, the way I read it is the flash's fstab controls mounting the SD card's ext4 system, and the SD card's fstab controls what's mounted after that.
But if I want to add for example a swap partition can I add it to the 'new' fstab file?
That's what I would try. Anything you want to be active after the system finishes booting probably belongs in the SD card's fstab.
I would think that anything done to the on-board flash's file system would only last as long as it takes to mount the SD card and overlay the system files, and would not be applicable after that.