I have buildroot readonly bootable image, which is normally loaded via TFTP in PXE enviroment. Filesystem in unpacked into ram and remounted as rw. And accidentally I wished to boot it from a USB stick and modify root filesystem content. So I thought of a "patch" system.
In a readonly image I can embed some
/etc/init.d script, that, upon start, checks for
/dev/sd?? drives, tries to mount them to
/mnt (one at a time), seeks for
/mnt/patch.sh script and executes it, then unmount and proceed to next drive.
So basically I want to iterate through all availble
drives PARTITIONS in system. How to do that in shell script? (I use busybox)
for loop, does a
? character in
/dev/sda for example (which i want to avoid)?