How to re-mount the SD
-
Hello,
I can
unmount
my SD but can't mount it again with:# mount ... /dev/mmcblk1 on /media/phablet/A8FD-027E type vfat (ro,nosuid,nodev,relatime,uid=32011,gid=32011,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2) # umount /media/phablet/A8FD-027E # mount /media/phablet/A8FD-027E mount: can't find /media/phablet/A8FD-027E in /etc/fstab # mount /dev/mmcblk1 mount: can't find /dev/mmcblk1 in /etc/fstab # mount -t vfat /dev/mmcblk1 /media/phablet/A8FD-027E mount: mount point /media/phablet/A8FD-027E does not exist # ls -ld /media/phablet/A8FD-027E ls: cannot access '/media/phablet/A8FD-027E': No such file or directory
What is the correct way to
mount
the SD again?The background of my question is: every now and than files and dirs on my SD get corrupted. Is this a known problem?
-
@guru The target folder need to exist and permissions from the mounted filesystem will apply, try the following for example (note the partition at the end of sdcard device: ...p1):
sudo mount /dev/mmcblk1p1 /mnt
Did not have issue with corrupted files so far on FP2 but i'm using ext4 fs (now encrypted as well), but you can probably try to check the filesystem before mounting the partition:
sudo fsck.vfat /dev/mmcblk1p1
-
@guru You should also be able to use the following based on your input:
sudo fsck.vfat /dev/disk/by-uuid/A8FD-027E sudo mount /dev/disk/by-uuid/A8FD-027E /mnt
-
I have 30+ years of UNIX knowlege and know how to mount a fs. The question was, how to mount it again exactly as done by UT on boot or by the app after formatting.
-
@guru That bumps it up to almost 60 years on this page, hopefully we will manage
Looking at https://github.com/ubports/ciborium, it seems that udisks2 is in use, can you have a try with something like this (maybe without p1):sudo udisksctl mount -b /dev/mmcblk1p1
Never heard ab it before tbh, info seems to give hints as well: http://manpages.ubuntu.com/manpages/xenial/man1/udisksctl.1.html
-
@tera said in How to re-mount the SD:
@guru The target folder need to exist and permissions from the mounted filesystem will apply, try the following for example (note the partition at the end of sdcard device: ...p1):
sudo mount /dev/mmcblk1p1 /mnt
Did not have issue with corrupted files so far on FP2 but i'm using ext4 fs (now encrypted as well), but you can probably try to check the filesystem before mounting the partition:
sudo fsck.vfat /dev/mmcblk1p1
Is
ext4
on the SD supported without making the system writable to modify thefstab
? -
@guru said in How to re-mount the SD:
Is ext4 on the SD supported without making the system writable to modify the fstab?
I would guess not, using encryption, a script is required to mount the fs following this post: https://forums.ubports.com/topic/1012/one-method-to-encrypt-home-phablet
I had a go at it, inserted a new SD card, formatted it using the External Drives app and it actually do not create a partition but format the whole SD card in fat32/vfat which is a behavior i have never observed before...
Additional 2p, it looks like the External Drives app only support vfat:
https://github.com/ubports/ciborium/blob/xenial/cmd/ciborium/main.go#L107
https://github.com/ubports/ciborium/blob/xenial/cmd/ciborium-ui/main.go#L53