I have moved an executable binary into /usr/bin. This worked, allowing me to run the program as expected.

However, after the next reboot, I noticed the command did not respond, and when I checked /usr/bin the file was no longer in it. Something has deleted it.

I tested it several times, and tried symbolic links as well. The same effect occured.

I remember similar behaviour on a Fedora Core 5 box, when I had a file in one of these paths, and everytime I replaced it with a newer version, the older version reappeared after a while. Something backed up the file and did not allow me to change it. It did allow me to delete it later.

Similar behaviour on two systems. The current computer is a Thecus RAID box running Linux.

Two questions:

  1. What is going on?

  2. How do I place or replace these files so they stay where I put them?


Most linux based embedded devices use RAMDisk to mount "/" for better performance as compared to a standard linux PC/server. The linux "initrd" is mounted at / during bootup. The initrd contains the /usr/bin, /bin, /sbin and other directories. So if you add/replace any file at "/", it would be gone on the next boot as its mounted on RAM and and old initrd will be mounted on the next boot.

There are 2 solutions.

(1) Check the output of mount and see if any secondary storage is mounted or not. You can store your executable in a common directory here and add it in the PATH variable. However, you have to make sure that the some startup script (login or .bashrc) updates PATH variable at every boot.

(2) Update initrd. If you are aware which initrd is being used, you can open (gunzip?) it, mount it, copy the executable, umount it, close (gzip) it, and save it.

Edit: You might need admin permissions on the device to replace the initrd. The first solution is what I prefer, since it is easy to maintain and does not require admin permissions.


Did you set up these boxes? Especially with the Thecus box, it's possible the system restores the OS-specific areas from ROM every time it boots, as a security measure. If so, you might research whether you can flash the ROM with a newer /user/bin.


I'd agree with CarlF's diagnosis -- likely the system is running in a RAMFS, loading from ROM every boot. To permanently change it you'd need to reflash the ROM.

There might be other options, but you'll have to give us particulars -- what model Thecus are you using?

I found a page on running Debian on a Thecus n4100. It indicates the n4100 has a MiniPCI slot that could be used for adding a CF card to provide some writable storage, or an alternative boot partition. Your model might have a similar feature.

Alternatively, you may be able to mount a network share (CIFS/SMB/NFS) and load it with your software.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy