#Mounting issues

1 messages · Page 1 of 1 (latest)

wild aurora
#

@civic saddle

civic saddle
#

Hey hey

wild aurora
#

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 ?

civic saddle
#

@rotund peak Tagging you here since you initiated with me first!

rotund peak
#

you are getting there with @wild aurora

wild aurora
#

eh I think the issue is simply with the cut thing honestly or the delimiter

rotund peak
#

you can just copy-paste to here instead of screen-shotting.

#

it looked like the trailing backtick in test.sh is not a backtick

wild aurora
#

I was checking if there was any issue with their mount command or the computer vs the volume (like if it kept disconnecting it)

civic saddle
#

It's not saving the screenshots, I'm just copying them via lightshot screenshot tool.

civic saddle
rotund peak
#

is the same error in the original script?

wild aurora
#

so now we do sudo mount -v -o noasync -t msdos /dev/disk2s1 /Volumes/CIRCUITPY after the %

civic saddle
wild aurora
#

Id use -i thought to be sure on grep personnally

rotund peak
#

ok, so unplug the board and plug it in again.

wild aurora
#

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 ?

rotund peak
#

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.

rotund peak
civic saddle
rotund peak
#

depending on what disks are already mounted, what kinds of disks, etc.

#

what is the output of just df

civic saddle
#

Also, here's proof it's currently mounted after unplugging and replugging

rotund peak
#

@ultraleech just copy the text from your terminal window, no need to screenshot

#

just type df and paste what it prints

civic saddle
#

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
rotund peak
#

you'll want to put it in triple backquotes to make it fixed width. See #welcome if you haven't done that before

civic saddle
#

@rotund peak I did it

rotund peak
#

tnx. I am starting up my Sonoma machine to try it myself

civic saddle
#

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.

wild aurora
#

mount -l could help too ?

#

cd says the folder doesnt exists but df says it's mounted in a folder that doesnt exists...

rotund peak
#

ok hold on for a couple of minutes

civic saddle
# wild aurora mount -l could help too ?
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
rotund peak
#

ok, I think the problem is the set in set disky. Just take away the set , so it's just

disky=`df ...`
civic saddle
#

Let me modify the script real fast.

rotund peak
#

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

civic saddle
#
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. :)

rotund peak
#

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

civic saddle
#

Ahhh

#

No, I never ommited it...

civic saddle
#

Only screenshotted this time to show exactly what my editor showed.

rotund peak
#

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?

civic saddle
#

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.

wild aurora
#

Can I confirm it works on my rpi4 later danh to mount my stemma qt? It's on the coals/missing cable atm

rotund peak
wild aurora
#

eh no wonder I failed to completely help 😄 Didnt know the context and just thought this was a general remount script

rotund peak
#

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

civic saddle
#

@rotund peak Seriously though, thank you big time for the help.

rotund peak
#

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

civic saddle
#

Ah, okay! Well, you may close this thread as solved now.