Help how to mount SD-Card - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121) +---- Forum: PostmarketOS on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=124) +---- Thread: Help how to mount SD-Card (/showthread.php?tid=15365) |
Help how to mount SD-Card - chadwick - 11-19-2021 Hi All, On a linux desktop, one way to access your device is to edit the "/etc/fstab" to mount your device permanently so you can access it. Reading postmarketOS's wiki about fstab, it told you to activate "rc-update" and the localmount service, which is the command: Code: sudo rc-update add localmount default And to check whether the service is running: Code: rc-service localmount status While blkid will return nothing, I use "sudo fdisk -l" to identify the UUID of the SD-Card, which gives: Code: Disk /dev/mmcblk0: 59.48 GiB, 63864569856 bytes, 124735488 sectors Therefore, I edit my fstab to looks like the following: Code: UUID=DC11BA49-9C6F-4BC0-B775-E39576550622 /home/user/SDCard vfat defaults 0 0 On a reboot it did not give me anything in the folder. Upon the failure, I tried to mount the SDcard by using the mount command, which return error:- Code: sudo mount -t vfat -o ro /dev/mmcblk0p2 ~/SDCard My question is, is there something wrong with what I did or anything that I might not have been aware of? Cheers. Chadwick RE: Help how to mount SD-Card - wibble - 11-19-2021 Before moving on to an fstab entry you need to make sure you can mount the partition manually, which it seems you can't do yet. I suspect that's because the partition isn't vfat. There are several ways you can check which filesystem type it's using - I'm not sure which will be present by default on PmOS but here are some you can try: lsblk -f blkid /dev/mmcblk0p2 sudo file -sL /dev/mmcblk0p2 These will also show you the UUID of the partition - this is what should go in the fstab entry, not the disk identifier you used. RE: Help how to mount SD-Card - Juergen - 11-20-2021 (11-19-2021, 04:09 AM)chadwick Wrote: Hi All, for me this worked: sudo passwd sudo blkid /dev/null >uuid.txt edit /etc/fstab UUID= ..... /home/user/SDCard vfat defaults 0 0 sudo chmod 777 ~/SDCard RE: Help how to mount SD-Card - chadwick - 11-22-2021 (11-19-2021, 05:01 AM)wibble Wrote: Before moving on to an fstab entry you need to make sure you can mount the partition manually, which it seems you can't do yet. I suspect that's because the partition isn't vfat. There are several ways you can check which filesystem type it's using - I'm not sure which will be present by default on PmOS but here are some you can try: Hi wibble, Thanks for your reply. The mmcblk0p2's UUID clearly are different than what I thought it was after digging deeper into the device. However, after probing into the mmcblk0p2, the type return with "dos". Other than 'vfat' or ext4, pmOS does not seems to know others type of format. I tried "ntfs" "ntfs-3g" for types which return unknown filetype. Is there a package that I needed to install first before it can read the filetype? Cheers, Chadwick (11-20-2021, 03:31 AM)Juergen Wrote:Hi Juergen,(11-19-2021, 04:09 AM)chadwick Wrote: Hi All, Thank you for your reply. Would you mind elaborate a bit more, I do not see how that would help pmOS to read the SDCard that is format as 'dos' filetype. Cheers Chadwick RE: Help how to mount SD-Card - wibble - 11-22-2021 How exactly did you determine the filesystem type was 'dos'? That doesn't seem right. I don't know which PmOS supports, but 'cat /proc/filesystems' should tell you. RE: Help how to mount SD-Card - chadwick - 11-25-2021 (11-22-2021, 07:02 AM)wibble Wrote: How exactly did you determine the filesystem type was 'dos'? That doesn't seem right. I don't know which PmOS supports, but 'cat /proc/filesystems' should tell you. Hi wibble, running "sudo -sL /dev/mmcblk0p2" and "sudo fdisk -l" gives me the following respectively: /dev/mmcblk0p2: DOS/MBR boot sector Device Start End Sectors Size Type /dev/mmcblk0p1 2048 1050623 1048576 512M EFI System /dev/mmcblk0p2 1050624 124733439 123682816 59G Microsoft basic data And /proc/filesystems of PmOS shows: nodev sysfs nodev tmpfs nodev bdev nodev proc nodev cgroup nodev cgroup2 nodev cpuset nodev devtmpfs nodev configfs nodev debugfs nodev securityfs nodev sockfs nodev pipefs nodev ramfs nodev hugetlbfs nodev rpc_pipefs nodev devpts ext3 ext4 ext2 vfat nodev nfs nodev nfs4 nodev autofs fuseblk nodev fuse nodev fusectl nodev mqueue squashfs Maybe I should try to format the sdcard into ext4 in order to use it? RE: Help how to mount SD-Card - wibble - 11-25-2021 I think it's formatted as exfat - at least on my desktop 'file -sL' says 'DOS/MBR boot sector' when run against an exfat formatted partition. The kernel on my desktop supports exfat so I can mount it, but it looks like PmOS may not. Perhaps look for an exfat package to install suitable kernel driver and userspace tools? If those don't exist then you'll have to reformat in a format it can mount. RE: Help how to mount SD-Card - chadwick - 11-26-2021 (11-25-2021, 09:15 AM)wibble Wrote: I think it's formatted as exfat - at least on my desktop 'file -sL' says 'DOS/MBR boot sector' when run against an exfat formatted partition. The kernel on my desktop supports exfat so I can mount it, but it looks like PmOS may not. Perhaps look for an exfat package to install suitable kernel driver and userspace tools? If those don't exist then you'll have to reformat in a format it can mount. Cheers, I will dig around for alpine/pmos if they provide exfat packages. I last recall reading somewhere there is such packages, but search through the apk by that name, nothing has show up, it might have changed its name or packages being quashed somehow. RE: Help how to mount SD-Card - chadwick - 11-30-2021 (11-26-2021, 05:09 AM)chadwick Wrote:(11-25-2021, 09:15 AM)wibble Wrote: I think it's formatted as exfat - at least on my desktop 'file -sL' says 'DOS/MBR boot sector' when run against an exfat formatted partition. The kernel on my desktop supports exfat so I can mount it, but it looks like PmOS may not. Perhaps look for an exfat package to install suitable kernel driver and userspace tools? If those don't exist then you'll have to reformat in a format it can mount. Just to add a solution to the question if anyone might be facing the same problems. In order for your PmOS to read a "DOS/MBR" (i.e. exfat) sdcard, you needed to install "fuse-exfat" Code: sudo apk add fuse-exfat For permanent mounting, please refer to the previous threads, edit your /etc/fstab, and use 'exfat' as the files type. |