(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:
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.
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,
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
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: Disk /dev/mmcblk0: 59.48 GiB, 63864569856 bytes, 124735488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: DC11BA49-9C6F-4BC0-B775-E39576550622
Device Start End Sectors Size Type
/dev/mmcblk0p1 2048 1050623 1048576 512M EFI System
/dev/mmcblk0p2 1050624 124733439 123682816 59G Microsoft basic data
Device Start End Sectors Size Type
/dev/mmcblk0p1 2048 1050623 1048576 512M EFI System
/dev/mmcblk0p2 1050624 124733439 123682816 59G Microsoft basic data
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
mount: /home/user/SDCard: wrong fs type, bad option, bad superblock on /dev/mmcblk0p2, missing codepage or helper program, or other error.
My question is, is there something wrong with what I did or anything that I might not have been aware of?
Cheers.
Chadwick
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
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