Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My all files and folders get disappeared after a system reboot. I am running petalinux on zynq chip by xilinx.

I got some hint why is this happening. Actually my entire system is booting from RAM. perhaps default behavior. Looking at xilinx forum I found that I can modify the rootfs as described here Build and Modify a Rootfs.

From the link I followed the following steps:

Initrd To modify an initial ramdisk:

  1. Extract the initrd image from the gzip archive.

    gunzip ramdisk.image.gz

  2. Mount the initrd image.

    chmod u+rwx ramdisk.image mkdir tmp_mnt/ sudo mount -o loop ramdisk.image tmp_mnt/ cd tmp_mnt/

  3. Make changes in the mounted filesystem.

I am stuck here. What changes shall I make here to achieve my goal?

After mounting I get the following folders:

$ ls 
bin  etc   lib       linuxrc     mnt  proc    root  sys  update_qspi.sh  var
dev  home  licenses  lost+found  opt  README  sbin  tmp  usr
share|improve this question
What kind of storage do you have on this device? How is it organized? Copy-paste the output of /proc/partitions, to begin with. The instructions you found are for booting with different content in the ramdisk, they won't help you make your changes persistent (or at least not directly). –  Gilles Mar 18 '14 at 23:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.