#Mounting issues
1 messages · Page 1 of 1 (latest)
Hey hey
it will be easier for others to not see too many screenshots like they can check the thread if they need
since I dont have access to a linux atm you will have to be patient but hopefully we will find a way to get the right device to mount again
I have 1 hour
can you do : ok now do (after the %) : sudo umount /Volumes/CIRCUITPY
and redo cd /Volumes/CIRCUITPY and then in the next prompt ls -als to confirm it's not mounted anymore
otherwise it will error if you try to mount it again. And shows me the results especially if sudo complaines ?
@rotund peak Tagging you here since you initiated with me first!
you are getting there with @wild aurora
eh I think the issue is simply with the cut thing honestly or the delimiter
you can just copy-paste to here instead of screen-shotting.
it looked like the trailing backtick in test.sh is not a backtick
I was checking if there was any issue with their mount command or the computer vs the volume (like if it kept disconnecting it)
It's not saving the screenshots, I'm just copying them via lightshot screenshot tool.
Yeah, I fixed it.
is the same error in the original script?
so now we do sudo mount -v -o noasync -t msdos /dev/disk2s1 /Volumes/CIRCUITPY after the %
No, it's not
the script wasnt showing anything despite the disk being mounted correctly with the correct name
Id use -i thought to be sure on grep personnally
ok, so unplug the board and plug it in again.
also if they used fstab / mnttab (dont remember) and the disks is always /dev/disk2s1 there would be no need for a script except remount /Volumes/CIRCUITPYT
is there a reason /dev/disk2s1 isnt static here ?
Then paste this in the command line and show me what it prints.
set disky=`df | grep CIRCUITPY | cut -d" " -f1`
echo $disky
don't put it in a script, just paste it in the command line.
because it will vary from computer to computer
depending on what disks are already mounted, what kinds of disks, etc.
what is the output of just df
Also, here's proof it's currently mounted after unplugging and replugging
@ultraleech just copy the text from your terminal window, no need to screenshot
just type df and paste what it prints
Okay, I'll start doing it
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1s2s1 489358120 20456384 334334448 6% 393731 1671672240 0% /
devfs 382 382 0 100% 662 0 100% /dev
/dev/disk1s3 489358120 7629288 334334448 3% 1545 1671672240 0% /System/Volumes/Preboot
/dev/disk1s5 489358120 40 334334448 1% 0 1671672240 0% /System/Volumes/VM
/dev/disk1s6 489358120 126080 334334448 1% 653 1671672240 0% /System/Volumes/Update
/dev/disk1s1 489358120 124141720 334334448 28% 320196 1671672240 0% /System/Volumes/Data
map auto_home 0 0 0 100% 0 0 - /System/Volumes/Data/home
/dev/disk1s2 489358120 20456384 334334448 6% 393731 1671672240 0% /System/Volumes/Update/mnt1
/dev/disk2s1 14276 436 13840 4% 1 0 100% /Volumes/CIRCUITPY
you'll want to put it in triple backquotes to make it fixed width. See #welcome if you haven't done that before
@rotund peak I did it
tnx. I am starting up my Sonoma machine to try it myself
Okay
chadleylyell@Chadleys-MacBook-Pro ~ % remount
Password:
usage: mount [-dfrkuvw] [-o options] [-t external_type] special mount_point
mount [-adfrkuvw] [-t external_type]
mount [-dfrkuvw] special | mount_point
Here is my initial output for reference purposes.
mount -l could help too ?
cd says the folder doesnt exists but df says it's mounted in a folder that doesnt exists...
ok hold on for a couple of minutes
mount: illegal option -- l
usage: mount [-dfrkuvw] [-o options] [-t external_type] special mount_point
mount [-adfrkuvw] [-t external_type]
mount [-dfrkuvw] special | mount_point
ok, I think the problem is the set in set disky. Just take away the set , so it's just
disky=`df ...`
chadleylyell@Chadleys-MBP ~ % disky=`df | grep CIRCUITPY | cut -d" " -f1`
chadleylyell@Chadleys-MBP ~ % echo $disky
/dev/disk2s1
Let me modify the script real fast.
i'm not sure how the set got in there. its use depends on which shell you are using
I have fixed the script in the Learn Guide
chadleylyell@Chadleys-MBP ~ % cd Desktop
chadleylyell@Chadleys-MBP Desktop % chmod +x remount-CIRCUITPY.sh
chadleylyell@Chadleys-MBP Desktop % remount
Password:
Executing: /usr/bin/kmutil load -p /System/Library/Extensions/msdosfs.kext
/dev/disk2s1 on /Volumes/CIRCUITPY (msdos, local, noowners)
chadleylyell@Chadleys-MBP Desktop %
Seems to have fixed it! The drive remounted. :)
it's because the original script was csh script, and had #! /bin/csh at the top. I think you omitted that, which broke the script, because set is used only in csh
This is the original script I had all along.
Only screenshotted this time to show exactly what my editor showed.
change the first line to #!/bin/sh from #!/bin/csh
I have changed the script in the Learn guide to:
#!/bin/sh
#
# This works around bug where, by default, macOS 14.x writes part of a file
# immediately, and then doesn't update the directory for 20-60 seconds, causing
# the file system to be corrupted.
#
disky=`df | grep CIRCUITPY | cut -d" " -f1`
sudo umount /Volumes/CIRCUITPY
sudo mkdir /Volumes/CIRCUITPY
sleep 2
sudo mount -v -o noasync -t msdos $disky /Volumes/CIRCUITPY
I just tried that and it works
@civic saddle are you all set now?
It actually still works with csh but I'll change it! Yes, I seem to be set. I wanted to get this working because even though I have my circuitpy files backed up, I didn't want to go through the hassle of it getting corrupted. I've switched from Windows to Mac for development currently.
Can I confirm it works on my rpi4 later danh to mount my stemma qt? It's on the coals/missing cable atm
there's no reason to use this script except on macOS Sonoma. It works around a stupid Sonoma problem.
eh no wonder I failed to completely help 😄 Didnt know the context and just thought this was a general remount script
In Sonoma Apple introduced a new user-space filesystem which delays parts of writes to USB drives excessively. It will write the data, and then wait 10's of seconds to write the metadata. This remount somehow forces Sonoma to use the old kernel-space filesystem, which is a lucky break. This is discussed in a lot of detail in https://github.com/adafruit/circuitpython/issues/8449
@rotund peak Seriously though, thank you big time for the help.
no problem, I wish I had seen that before. I copied the script into the guide and it was csh, but for some reason it was not running as csh for you. csh is not used much anymore
better that it be an sh-compatible script. Most other shells use sh-compatible assignment syntax
Ah, okay! Well, you may close this thread as solved now.