07-03-2014 02:06 AM
is ti possible to make it so that modification done to the filesystem are persistent between reboots?
I'll be clearer: I am using Linux on the Zedboard, and I have to manually mount the SD card at each boot to access my files. I tried to modify the fstab to have it mounted automatically, but the modification is lost upon rebooting.
I am quite sure it used to work with some earlier releases, but somewhere along the way it stopped working.
Is it an option of the ramdisk?
07-03-2014 06:25 AM
Changes to the filesystem won't ever be saved when running a ramdisk (that I know of anyway) as you are not changing the real ramdisk source. When linux is running the ramdisk has been loaded into ram and is not ever saved back to the medium from which it was loaded.
You don't say much about the source of the ramdisk or the kind of ramdisk (initrd, cpio, etc...). The principles are the same as you could mount the ramdisk on a host machine, or probably even on a zynq platform (but a bit trickier maybe), alter the ramdisk file system (the fstab or the init scripts) to mount the sd card. The unmount it and rezip it up assuming it's zipped. These fundamentals are well covered in "Building Embedded Linux Systems" which I recommend if you have not used it.
05-15-2018 06:29 AM - edited 05-15-2018 07:15 AM
Hmm this question is quite old...
But isn't it possible to copy back the ramdisk by using dd? Maybe when the system shuts down and all modifications to the filesystem are done, a script could execute, that saves the changes.
I tried do identify the ramdisk-device. findmnt tells me, that the source is rootfs, but dd with if=rootfs doesn't work. /etc/fstab tells me, that the device is /dev/root, but this doesn't even exist. Writing to the SD-Card using dd is possible.
EDIT: This was for the matlab-linux. When I use the Xilinx-image from http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs, findmnt isn't installed and /etc/fstab contains no entry for /. Strange...
It is verry annoing, if changes can only be stored by extracting and mounting the ramdisk on a foreign system. Isn't there a trick?
05-15-2018 10:06 AM