MISTer and USB Drives
-
- Top Contributor
- Posts: 1911
- Joined: Wed May 27, 2020 1:59 pm
- Has thanked: 145 times
- Been thanked: 454 times
MISTer and USB Drives
In the old times I used "Switch to USB" with my MISTer until Sorge stated that it was kind of obsolete and using symlinks was the way to go.
With "Switch to USB":
Upon booting MISTer waits for the uSB drive to be mounted before displaying the menu.
With symlinks:
MISTer does not wait for the drive to be mounted and displays the menu right away. As a result the menu displays "No Files!". After the drive is mounted hitting F12 twice to flip the OSD back and forth the menu finally displays Arcade, Computer ...
MISTer should always wait for USB drives to be mounted before displaying the menu.
In which repository should I open an issue?
With "Switch to USB":
Upon booting MISTer waits for the uSB drive to be mounted before displaying the menu.
With symlinks:
MISTer does not wait for the drive to be mounted and displays the menu right away. As a result the menu displays "No Files!". After the drive is mounted hitting F12 twice to flip the OSD back and forth the menu finally displays Arcade, Computer ...
MISTer should always wait for USB drives to be mounted before displaying the menu.
In which repository should I open an issue?
Re: MISTer and USB Drives
as far as i can judge:
the MiSTer is aware when any usb device is connected and will act accordingly.
i'm using a ssd drive and the moment i connect it to my mister it takes about 2~3 seconds to mount and list, it's pretty fast.
so it could be your drive that has / uses a specific way of anouncing itself to the connected system?
i used to have a few external maxtor drives, and i've noticed they were pretty slow to spin up and make themselves available to the system, some of them took 30~45 seconds to be available for usage.
the MiSTer is aware when any usb device is connected and will act accordingly.
i'm using a ssd drive and the moment i connect it to my mister it takes about 2~3 seconds to mount and list, it's pretty fast.
so it could be your drive that has / uses a specific way of anouncing itself to the connected system?
i used to have a few external maxtor drives, and i've noticed they were pretty slow to spin up and make themselves available to the system, some of them took 30~45 seconds to be available for usage.
-
- Top Contributor
- Posts: 1911
- Joined: Wed May 27, 2020 1:59 pm
- Has thanked: 145 times
- Been thanked: 454 times
Re: MISTer and USB Drives
The difference is that there is a drive in one case and no drive in the other. And "MISTer" mounts the drive, it just do not wait for it to be mounted before displaying the menu. May be it is more tricky to do when using symlinks than using "Switch to USB".
- Aspie
- Posts: 188
- Joined: Sat Sep 26, 2020 1:07 pm
- Location: Manchester
- Has thanked: 20 times
- Been thanked: 47 times
- Contact:
Re: MISTer and USB Drives
jca, I have the same drive and have it set up the same thanks to your help. I haven't noticed any problem
-
- Top Contributor
- Posts: 1911
- Joined: Wed May 27, 2020 1:59 pm
- Has thanked: 145 times
- Been thanked: 454 times
Re: MISTer and USB Drives
Do you have everything on the USB drive? On my setup the only folders on the SD card are config, linux and Script, everything else is on the USB drive and I have symlinks from the SD card to the USB drive for all these folders.
If you have _Arcade, _Computer, ..., _Utility on the SD card you won't see the problem and the USB drive will be mounted when you run games.
In the end it is not a real problem, just an annoyance. Even with a popup while waiting for the mount I still would have to wait.
If you have _Arcade, _Computer, ..., _Utility on the SD card you won't see the problem and the USB drive will be mounted when you run games.
In the end it is not a real problem, just an annoyance. Even with a popup while waiting for the mount I still would have to wait.
- Aspie
- Posts: 188
- Joined: Sat Sep 26, 2020 1:07 pm
- Location: Manchester
- Has thanked: 20 times
- Been thanked: 47 times
- Contact:
Re: MISTer and USB Drives
I just have the games folder on the USB drive. Everything else is on the SD card
-
- Top Contributor
- Posts: 1911
- Joined: Wed May 27, 2020 1:59 pm
- Has thanked: 145 times
- Been thanked: 454 times
Re: MISTer and USB Drives
That's why you do not see the problem. At one time I also had only the games directory and I did not see the problem because by the time you navigate in the OSD the drive is mounted.
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 195 times
Re: MISTer and USB Drives
If you've got another machine (or router) on which to run Samba, you could connect the drive there and use an SMB3 share. I saw some testing results awhile back that SMB3 ends up being the fastest method overall of loading ROM data. The network port will apparently outrun USB on the Mister.
That's how I have mine set up.... the share mounts at /media/fat/cifs, which is used preferentially by most update scripts and cores, but then I forced it by moving most of the other directories out of /media/fat and symlinking them from /media/fat/cifs back to their original locations. ROM loading and virtual drive usage isn't instant, but it seems pretty snappy. I haven't tested drive speed under AO486 at all, as I'm waiting for a Pi 3B to make an MT32-Pi, but I expect it to be pretty decent, certainly faster than period hardware.
That's how I have mine set up.... the share mounts at /media/fat/cifs, which is used preferentially by most update scripts and cores, but then I forced it by moving most of the other directories out of /media/fat and symlinking them from /media/fat/cifs back to their original locations. ROM loading and virtual drive usage isn't instant, but it seems pretty snappy. I haven't tested drive speed under AO486 at all, as I'm waiting for a Pi 3B to make an MT32-Pi, but I expect it to be pretty decent, certainly faster than period hardware.
-
- Top Contributor
- Posts: 1911
- Joined: Wed May 27, 2020 1:59 pm
- Has thanked: 145 times
- Been thanked: 454 times
Re: MISTer and USB Drives
Thanks for your detailed explanations, quite a few users seems to use SMB share but in my case I want a self contained MISTer. I think SMB shares like that are a must if you also run emulators on a PC. For the speed I am not too concerned with that, it is more than reasonable
- aberu
- Core Developer
- Posts: 1192
- Joined: Tue Jun 09, 2020 8:34 pm
- Location: Longmont, CO
- Has thanked: 247 times
- Been thanked: 411 times
- Contact:
Re: MISTer and USB Drives
When you connect a USB storage, if you have a "games" folder (or any other folder that is in the root of the SD card) it will use a path priority like so --> https://mister-devel.github.io/MkDocs_M ... h-priority
Just for future reference.
If you have a games/Genesis folder on both the SD Card and the USB drive, the USB drive's /games/Genesis folder will take priority and will be the one that is shown to you. This behavior is implicit, the symlinks are automatic.
Just for future reference.
If you have a games/Genesis folder on both the SD Card and the USB drive, the USB drive's /games/Genesis folder will take priority and will be the one that is shown to you. This behavior is implicit, the symlinks are automatic.
birdybro~
-
- Posts: 8
- Joined: Sun Oct 23, 2022 12:01 pm
Re: MISTer and USB Drives
For some reason, this is not working for me. If there is a PSX or MegaCD folder on the sdcard, it just ignores the USB HD. If I delete the folders on the sdcard, the USB HD folders are available.
Is there an .ini file that controls the priority?
Is there an .ini file that controls the priority?
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 195 times
Re: MISTer and USB Drives
I had real issues making that work correctly when I was setting up, several months ago, albeit with a network share rather than with a USB drive. What I ended up doing was creating symlinks under /media/fat pointing to the share. (/media/fat/cifs). You should be able to do the same thing; I think the target dir is /media/fat/usb0, but if that's wrong, trust your eyes.
The way to create a symlink is "ln -s /path/to/target /path/to/symlink", and they can be relative. In your case, absolute symlinks would probably be easiest. You'd empty and remove /media/fat/games/PSX, and then:
Voila, anything looking in /media/fat/games/PSX will end up in the right place.
Note that you can do your entire games dir at once, rather than needing to do individual cores. Erase the files from /media/fat/games and remove it (be careful, you may want to move those files instead of erasing them), and then:
And wham, your whole games library is on /media/fat/usb0. I also do this with BIOS, cheats, docs, saves, and savestates. Moving the config directory isn't a good idea with a network share, because it doesn't come up until after Mister starts, meaning the program falls back to its original default config on a cold boot, where it starts normally on a warm boot. That's really annoying. I don't know if you'd have the same problem with an external USB drive or not.
You can also move the actual RBF files if you want, under _Arcade, _Computer, and _Console, but I leave them on the SD card.
Note: do not try to move the '/media/fat/linux' dir. Horrible things will happen.
The way to create a symlink is "ln -s /path/to/target /path/to/symlink", and they can be relative. In your case, absolute symlinks would probably be easiest. You'd empty and remove /media/fat/games/PSX, and then:
Code: Select all
ln -s /media/fat/usb0/games/PSX /media/fat/games/PSX
Note that you can do your entire games dir at once, rather than needing to do individual cores. Erase the files from /media/fat/games and remove it (be careful, you may want to move those files instead of erasing them), and then:
Code: Select all
ln -s /media/fat/usb0/games /media/fat/games
You can also move the actual RBF files if you want, under _Arcade, _Computer, and _Console, but I leave them on the SD card.
Note: do not try to move the '/media/fat/linux' dir. Horrible things will happen.
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 195 times
Re: MISTer and USB Drives
Another thought: there may well be a better way to do all this, but whatever method Mister is supposed to be using proved to be very unreliable for me. It seems to need too many different programs agreeing on the exact precedence of, and location for, multiple possible target directories. Every single program and script has to get that right, and in my experience, they just don't. In the 1.4 version of update_all, for instance, it absolutely insisted on putting the AO486 BIOS ROM files in /media/fat/games/AO486. It just refused to put them anywhere else. Later versions may be better, but now I have symlinks, so it works correctly even if it's still busted.
Symlinks seem to be a pretty good fix. Programs that work right go to the higher priority directories, and programs that don't are forced into the higher priority directories via symbolic links. I think I'd encourage the project to always target /media/fat/, and then provide a symlink management script that the user can run.
Symlinks seem to be a pretty good fix. Programs that work right go to the higher priority directories, and programs that don't are forced into the higher priority directories via symbolic links. I think I'd encourage the project to always target /media/fat/, and then provide a symlink management script that the user can run.
Re: MISTer and USB Drives
Make sure the PSX/Sega CD sd card directories are empty and the case is for identical for both.gambleboyen wrote: ↑Sun Nov 20, 2022 1:33 pm For some reason, this is not working for me. If there is a PSX or MegaCD folder on the sdcard, it just ignores the USB HD. If I delete the folders on the sdcard, the USB HD folders are available.
Is there an .ini file that controls the priority?
edit: I think I may have had a similar problem when my usb was still ntfs and the case didn't match what was on the sd card.
Re: MISTer and USB Drives
As long as my individual games subdirectories on the sd card are empty of roms, the mister will see the roms on the usb drive just fine.
No need to keep system files on the usb. update_all seems to have put bios files on both the usb and the sd, maybe because I ran the script before the usb drive was mounted at some point, but it's not a problem.
No need to keep system files on the usb. update_all seems to have put bios files on both the usb and the sd, maybe because I ran the script before the usb drive was mounted at some point, but it's not a problem.