I have found a bug in MikroTik RouterOS.
If there’s a special place to submit a bug, please let me know.
It’s related to USB storage implementation.
Steps to reproduce:
- Attach USB storage (USB flash stick) to Routerboard.
- Make sure that folder “disk1” is available and its content is showing in file list. (If not - format disk to use FAT32/EXT3 FS)
- Create a .backup file.
- Rename a disk using any available interface (for shell:
/disk set disk1 name=test123)
- Restore backup and wait for reboot.
- View a list of files.
Now it’s showing old name (disk1) and new (test123).
Unable to remove both folders until USB storage is ejected.
After this it’s possible to remove any or both folders, but after reboot all of them still showing in a file list.
Replicated in RouterOS 6.41.2 and 6.40.6
All tests were made in
mipsbe: RouterBOARD 962UiGS-5HacT2HnT
x86: qemu-kvm
Found a temporal solution:
There are only two ways to remove existing disk directories (mount points):
- use netinstall and flash your device.
- rename existing disks to use old names
Example:
If your file list shows disk1, disk2 and disk3 directories (where disk3 contains files of a real USB storage), you should rename it using following commands:
/disk set 0 name=disk2
/disk set 0 name=disk1
The order doesn’t matter, but last command should set name “disk1”. After reboot you will see only one disk directory.
Please pay attention on backup files if you want to restore previous configuration. Disk names and ID’s are also adding to binary backup file, so there’s a chance to break it again.
Also I don’t recommend to set non-default disk names if you want to use “reset configuration” option. ROS will automatically create disk1 folder and you will need to follow previous steps again.