Page 1 of 1

Switch to USB in the Menu

Posted: Fri Sep 25, 2020 2:40 pm
by silentheaven83

Hi everybody,

I just plug in an USB HDD drive and in the menu an option called "Switch to USB" appeared.

Can anyone tell me what it means?

Thank you!


Re: Switch to USB in the Menu

Posted: Fri Sep 25, 2020 3:28 pm
by MostroW
It means you can switch to the USB device for your cores.
If you're keeping your cores on the SD card and the ROM / disk images / whatever on your hdd then you don't need to switch.
These things are explained on the wiki i think, i recommend you read them more in detail they answer a lot of basic stuff about the MiSTer.

Re: Switch to USB in the Menu

Posted: Sat Sep 26, 2020 9:38 pm
by jdeberhart
I would advise against using Switch to USB as it seems to break a lot of scripts and configs. Just move/put your roms in the games folder on the USB drive and you'll be good.

Re: Switch to USB in the Menu

Posted: Fri Oct 02, 2020 12:11 am
by jca
MostroW wrote: Fri Sep 25, 2020 3:28 pm It means you can switch to the USB device for your cores.
If you're keeping your cores on the SD card and the ROM / disk images / whatever on your hdd then you don't need to switch.
These things are explained on the wiki i think, i recommend you read them more in detail they answer a lot of basic stuff about the MiSTer.
Do you have any pointer to the wiki explaining using a USB Hd as I cannot figure out where it is located?
Thanks.

Re: Switch to USB in the Menu

Posted: Fri Oct 02, 2020 12:21 pm
by MostroW
It seems it has not been added yet, though i really was under the impression that it was there?
Seems the wiki needs to be updated regarding this subject.

Re: Switch to USB in the Menu

Posted: Fri Oct 02, 2020 10:21 pm
by jca
MostroW wrote: Fri Oct 02, 2020 12:21 pm It seems it has not been added yet, though i really was under the impression that it was there?
Seems the wiki needs to be updated regarding this subject.
Thanks. For the time being I connected a USB HD without using the menu to Switch to USB. The HD has been mounted on /media/usb0. Is this always usb0 or could it be any other usbn?
MISTer uses the games directory from the disk as the games directory. Does it mean that /media/fat/games is completely ignored by MISTer?

Re: Switch to USB in the Menu

Posted: Sat Oct 03, 2020 9:19 am
by bazza_12
jca wrote: Fri Oct 02, 2020 10:21 pmMISTer uses the games directory from the disk as the games directory. Does it mean that /media/fat/games is completely ignored by MISTer?
no it seems to use both.. eg. i have some VHD files for ao486 stored on the sdcard in the games directory.. but games for other cores I have stored in the corresponding USB HDD games directory.

Re: Switch to USB in the Menu

Posted: Sat Oct 03, 2020 10:27 am
by MostroW
jca wrote: Fri Oct 02, 2020 10:21 pm Thanks. For the time being I connected a USB HD without using the menu to Switch to USB. The HD has been mounted on /media/usb0. Is this always usb0 or could it be any other usbn?
MISTer uses the games directory from the disk as the games directory. Does it mean that /media/fat/games is completely ignored by MISTer?
I don't know if MiSTer or rather linux mounts what device in a certain order, but i'm thinking it's quite possible that another usb device could get mounted before the harddisk?
Though i think it might be possible to force linux to mount USB devices in a said order once you get their UUID i think, but i'm not really a linux guru so i'd recommend some reading on that part.

Like bazza_12 said it uses both, but you need to remember that it looks for files in an order and that means it looks to the SD storage before it looks to external storage.
So i think that when you've got roms for NES on the SD card and on the external drive, it would prefer the SD card and ignore the external storage at that point.

So like pointed out before, most people recommend keeping cores and essential files on SD and the files that cores can run on the external storage.

Re: Switch to USB in the Menu

Posted: Sat Oct 03, 2020 4:00 pm
by jca
Thanks for your answers. I do not plan to use the "Switch to USB" and I will use only the games directory from the HD while keeping the games directory on the SD card empty. This will leave as much empty space on the SD card in order to minimize the wear.
Now I have a problem: my disk "spindles off" when idle for some time and from what I read some time ago on the forum. I was to turn this off by using the information from https://askubuntu.com/questions/39760/h ... -down-time. Looking at /dev on MISterit looks like /dev/mmcblk0 is related to the SD card and /dev/sda to the hard disk. Using hdparm -I /dev/mmcblk0 or /dev/sda gives
HDIO_DRIVE_CMD: Invalid argument.
How can I fix that?
I remember that at one time someone posted a way to do it using the dd command but I cannot locate it.
Any help would be highly appreciated.
Errata: I found the post it is not dd but
sdparm --clear=STANDBY /dev/sdX -S
Where X is the letter of your external drive.
sdparm is not installed on MISTer. I would know how to do it on X86 but totally ignorant on ARM Linux.
I do I install this command?

Re: Switch to USB in the Menu

Posted: Sun Oct 04, 2020 1:53 pm
by MostroW
I'm not a linux buff but:

A quick google told me that 'sdparm' is used for scsi disks, shouldn't you be using 'hdparm' instead?
The 'hdparm' is for IDE drives and i've looked on my mister and this command is present.

Re: Switch to USB in the Menu

Posted: Sun Oct 04, 2020 3:29 pm
by jca
Yes, all of this is confusing and I discovered it yesterday. Initially hdparm was for IDE drives and earlier types of drives (/dev/hdn) while sdparm was for SCSI drives (/dev/sdn). SATA drives are considered SCSI drives (/dev/sdn) but hdparm work with them. I double checked under Windows as I found a port of hdparm. My internal SATA drives (1 SSD and one regular HD) respond properly when queried with hdparm -I. The USB drive gives me the same reply as under MISTer linux which means it does not support these commands. I also learned that Western Digital drives do not support these commands and my drive is a WD Elements 1TB (which I already had). In order to keep it awake I will have to write a daemon to write to it periodically before it falls asleep. Another way would be to get another drive where the spindle off can be disabled.
Does anyone has recommendation for such hard drives?
Does anyone has a working daemon to keep my drive awake?

Re: Switch to USB in the Menu

Posted: Mon Oct 05, 2020 3:26 pm
by jca
I created a new thread "USB HDD Spinning down" which is more appropriate and could be useful for anyone experiencing the same problem as I do.