Beaglebone Black uSD flasher with custom fstab

Hello,

I’m running into an issue that I’m hoping someone can help with.

I’ve (mostly) successfully created a flasher image using Debian Bullseye (kernel 5.10.168-ti-r72), and the beagle-flasher and enable-beagle-flasher packages (not the older scripts).

What I didn’t realize at the time is that these packages create a new /etc/fstab file instead of copying the existing one. This doesn’t work for me as my clones need to be read only and the generated fstab is read/write.

My question is this: is there some way to run a post-script after the uSD card is finished flashing to re-set up my fstab how I need it to be? I can manage if there needs to be a script made or something along those lines, but I don’t know how to get it to run after the flashing is complete.

We could append something here: bb-beagle-flasher/suite/bookworm/debian/beagle-flasher · master · BeagleBoard.org / repos-armhf · GitLab

Can you share your custom etc/fstab feel free to hide your ip address… just something to look at and compare ideas…

Thinking we could use sed with source/destination…

Regards,

Sure! My fstab is shown below:

/dev/mmcblk1p1  /  ext4  ro,noatime,errors=remount-ro  0  1
debugfs  /sys/kernel/debug  debugfs  mode=755,uid=root,gid=gpio,defaults  0  0
/dev/mmcblk0p1  /var    auto    defaults,nofail 0       0
/var/BBB        /home/BBB       auto    bind,defaults,nofail    0       0
tmpfs   /tmp    tmpfs   nodev,nosuid,size=32M   0       0
tmpfs   /srv    tmpfs   nodev,nosuid,size=10M   0       0

Something to note with where you’re proposing to put the updated fstab, I’m using the SD card as the portion of the OS that can be written to, the eMMC is read only.

Will the fstab above cause problems when writing the fstab from the eMMC-> uSD as well as when the uSD is mounted and attempting to write the eMMC? I was thinking it would be safer/less problematic to update the fstab AFTER the clone process is complete.