When cleaning up some of the old The Dude files and folders, I clicked delete once too many in Winbox and accidentally removed the Lost+Found folder.
Is there any way to restore this? It did not restore automatically upon reboot.
You probably have the Dude files on a USB stick?
I have a Dude server on CHR with the Dude files on the local filesystem and there is no such folder.
Anyway, it should not be that important to have. When you want it back, ftp to the router and mkdir it in the place where it was.
There is nothing in Lost+Found , until a disk check program is looking for files that are not listed in some directory, and finds some.
(This is a filesystem inconsistency due to crash or power cut when active, or removing the disk without eject)
That check program will create the Lost+Found folder, to give the orphaned files a directory entry. If all is OK, nothing will be in the Lost+Found folder.
No idea how to trigger the check program in RouterOS. Maybe software ejecting the disk (/disk) and removing and re-inserting will start that check program. (Just guessing).
But again, I see no need for doing this.
Most linux installations perform file system checks periodically (at boot time) … I think the periodicity is around 1,5 years. Which means lost+found is re-created then. I’ve no idea how ROS does the file system checks.
As @bpwl already explained the role of lost+found, normally it’s not needed and if fsck finds some lost files (and thus needs the directory), it’ll create it anyway. However, if missing lost+found bothers somebody too much, then I guess it is possbile to do things right as follows:
- properly unmount USB disk
- plug it to normal linux machine
- execute fsck – -f to forcibly run file system check (without “-- -f” it won’t run if FS otherwise seems to be clean)
- move USB stick back to router
I did not realise the folder must have been on the SD card instead of on the local storage.
In that case it should indeed be totally fine, I will eject the SD since I was only using it for The Dude.
Thanks all for helping out!