Community discussions

MikroTik App
 
ColinSlater
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Sun Sep 12, 2021 2:32 pm

RB4011 - Missing "Flash" directory

Sun Sep 04, 2022 1:53 pm

Hi,
This is going to sound a bit strange, but the "flash" directory is missing on my RB4011 when I look at files.
We've got a Hotspot configured, and I'd like to just change the logo on the top of the login page to our logo rather than the default MikroTik one.
I've done this on other MikroTik products (like the HexS I have at my home) - when I go to "Files", I can see the structure that starts with a directory at the top called "flash" and then there's a directory called "hotspot" and all the files are in there, I can download, edit and upload all happy.

On the RB4011 we have at our main site, none of this exists. The flah/hotspot folder is clearly there somewhere, as that's what the hotspot currently has in the hotspot server profile and everything is working.

I tried copying the files from my hexS to the RB4011, and changed the default directory in the hotspot server profile, but this then causes some strange behaviour regarding redirecting users when they connect to the hotspot (my post about this is here: viewtopic.php?t=188797).

All I want to be able to do is swap the logo, but I can't seem to access the files that the RB4011 is using, as they seem not the be in the same place that they are on every other MikroTik I've used.

Any help here would be appreciated.

Thanks...

Colin
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11442
Joined: Thu Mar 03, 2016 10:23 pm

Re: RB4011 - Missing "Flash" directory

Sun Sep 04, 2022 2:20 pm

There are devices with small(ish) flash (16MB being most common size) and decent amount of RAM (64MB or more), those have RAM disk as root of files section and (user accessible part of) flash mounted under /flash . The rest of devices (either too little RAM or decently sized flash) don't use RAM disk and have flash mounted as root under /files . RB4011 has decently sized flash disk, hEX S does not.
 
tdw
Forum Guru
Forum Guru
Posts: 1843
Joined: Sat May 05, 2018 11:55 am

Re: RB4011 - Missing "Flash" directory

Sun Sep 04, 2022 2:47 pm

The default hotspot directory path is hotspot for devices with larger NAND, and flash/hotspot for smaller NOR storage.

I wouldn't expect having the hotspot directory set to flash/hotspot to work on devices which don't present a flash directory unless there is a hidden symbolic link in the filesystem.
 
ColinSlater
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Sun Sep 12, 2021 2:32 pm

Re: RB4011 - Missing "Flash" directory

Sun Sep 04, 2022 7:57 pm

Hi,
Thanks very much for the responses... much appreciated.
Although I think I understand the responses, I'm still confused. If I connect to the FTP on the router box (which I now managed to get working, was my own stupidity that wasn't), I see the following:
rb4011-files.jpg
The folder "DH-HOTSPOT" is my attempt to copy the files from my RB760iGS system (the HexS) to the bigger device (the RB4011iGS)... and apart from that, there are the bits and pieces for the certificate which we applied to the device, and some config backups that I've made as I was building the device up.

What really confuses me at the moment is that, whether there is some sort of historical link to some legacy file structure or not, the default files for the hotspot have got to be somewhere... and they don't appear to be on whatever storage is being accessed by either the FILES widget in Winbox or via FTP (which is clearly the same thing).
You do not have the required permissions to view the files attached to this post.
 
tdw
Forum Guru
Forum Guru
Posts: 1843
Joined: Sat May 05, 2018 11:55 am

Re: RB4011 - Missing "Flash" directory

Sun Sep 04, 2022 10:20 pm

Hopefully that .backup isn't from the hEX S and been applied to the 4011 - restoring a backup from a different model often results in odd behaviour.

What files are there in the DH-HOTSPOT folder, and what is HTML Directory set to under IP > Hotspot > Server Profiles (or html-directory= setting from /ip hotspot profile export)
 
ColinSlater
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Sun Sep 12, 2021 2:32 pm

Re: RB4011 - Missing "Flash" directory

Mon Sep 05, 2022 8:09 pm

Hi,
Thanks for the reply.
No, the .backup file isn't from the HexS box - although I don't know where it has come from. We did have to do a factory reset on the box while I was configuring it (I cocked something up and lost connectivity to it, so perhaps it's from that).
To answer your other questions:
/ip hotspot profile
add dns-name=[DNS Name of Hotspot] hotspot-address=[IP-Address of Hotspot] html-directory=flash/hotspot login-by=cookie,https name=Hotspot ssl-certificate=letsencrypt-autogen_2022-09-01T05:35:07Z use-radius=yes
Inside the DH-HOTSPOT folder is basically a copy of the hotspot files from my HexS box, plus a the files for bootstrap framework (I can send a screenshot if that helps)
 
tdw
Forum Guru
Forum Guru
Posts: 1843
Joined: Sat May 05, 2018 11:55 am

Re: RB4011 - Missing "Flash" directory

Mon Sep 12, 2022 6:54 pm

I'm surprised the hotspot works at all as that configuration points to a folder which doesn't exist, given what you have posted it should have html-directory=DH-HOTSPOT for the hotspot server to use your uploaded files.
 
ColinSlater
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Sun Sep 12, 2021 2:32 pm

Re: RB4011 - Missing "Flash" directory

Tue Sep 13, 2022 7:07 pm

Yes - I agree. I think there must be some sort of legacy routing or something, as on the other MikroTik devices I’ve got, it is always “flash/…”.

In the meantime though, we’ve made a bit of progress. I think the problem might have been bootstrap related. Previously, what I had done is crested my own bootstrap site, and simply copied the relevant variables and things into the right places. The pages themselves worked fine, but the redirecting etc seemed to be the issue.
I’ve since taken the files from my other MikroTik and literally just exchanged the logos and that seems to be working absolutely fine.
I can’t immediately think what could be causing this behavior in Bootstrap, so I might be completely wrong here… but I can’t think what other differences exist between the version I now have uploaded to the RB4011 and the version I had before.
Needless to say that the html-directory is now set to “DH-HOTSPOT” and its working.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5405
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: RB4011 - Missing "Flash" directory

Tue Sep 13, 2022 11:09 pm

Not all devices have /flash.

Who is online

Users browsing this forum: collerok, danriis, Google [Bot], onnoossendrijver, VinceKalloe and 92 guests