michaelshmitty / SD-Installer-macos_MiSTer

MiSTer SD card installer (macOS)
GNU General Public License v3.0
35 stars 7 forks source link

2 Linux Issues #4

Closed nitro322 closed 4 years ago

nitro322 commented 4 years ago

Hi. Thanks for providing a Linux script; much appreciated.

While setting up an SD card with it, I ran into three relatively small problems:

  1. Initial download failed because I already had a file named 'download' in the same directory as the script
  2. Mounting the SD card failed because I didn't have an exfat module available
  3. Copying files to the SD card failed because the mounted SD card was only writable by root

The three issues are all easy to workaround:

  1. Admittedly this isn't likely to affect many other people, but a simple 'if [ -f download ]; then ...' check with a warning or failure would make the script more resilient
  2. exfat filesystem support and exfat-utils (necessary for mkfs.exfat) should be added to the prerequesites list. It wouldn't be too difficult to test for them and output warnings, but no need to complicate things since you are already handling other requirements by prerequisites.
  3. An easy way to resolve this is to add '-o uid=$UID' to the mount command, which should generally mount the filesystem with the user as the owner rather than root. An alternative would be to run the copy commands as sudo as well.

I'd be happy to provide a patch or updated version of the script if that'd be helpful, but wanted to at least call these to your attention and leave a note for any other Linux users that may run into trouble.

michaelshmitty commented 4 years ago

Thanks goes to @rwk-git for providing the Linux script. Good suggestions, I'll implement them when I have time or if you issue a PR then I'll gladly merge it.

michaelshmitty commented 4 years ago

I may have forgotten to close this issue after the merge. If not, feel free to re-open. Thanks!