/etc/config/fstab (almost) empty

I was trying to add a swap partition. Then I opened /etc/config/fstab to add some stuff and noticed it only contained:

config global automount
option from_fstab 1
option anon_mount 1

config global autoswap
option from_fstab 1
option anon_swap 0

I am 100% sure it contained much more in the past (e.g. when moving my filesystem to the SD card).... where did it all go?

Everything still seems to work fine.

That is what my fstab looked like after expanding to the SD card. That is until I edited it to look like this:

config global automount
        option from_fstab 1
        option anon_mount 1

config global autoswap
        option from_fstab 1
        option anon_swap 0

config mount
        option target   /overlay-boot
        option device   /dev/mtdblock3
        option fstype   jffs2
        option options  rw,sync
        option enabled  1
        option enabled_fsck     0

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:

config global 'automount'
        option from_fstab '1'
        option anon_mount '1'

config global 'autoswap'
        option from_fstab '1'
        option anon_swap '0'

config mount
        option target '/overlay'
        option device '/dev/sda2'
        option fstype 'ext4'
        option enabled '1'
        option enabled_fsck '0'
        option options 'rw,sync,noatime,nodiratime'

Perhaps this is what you had in mind when you said it had more in the past?

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.