Seite 1 von 1

How to mount a SD-card

BeitragVerfasst: 12 Jan 2019, 14:16
von vleeuwen
How to mount a SD-card on a TXT?
I have an fat32 formatted sd-card in the TXT with firmware 4.4.4.0 before starting up the TXT
I have an ssh connection (Putty) and a sftp connection (FileZilla).

I tried to follow the description:
https://forum.ftcommunity.de/viewtopic.php?f=21&t=4240&p=30798&hilit=mount+SD#p30798
But that does not work.

$ mount /dev/mmcblk0p0
mount: can't find /dev/mmcblk0p0 in /etc/fstab


$ fdisk -l
Does not give any device.

What command steps I need to perform on the TXT?

Re: How to mount a SD-card

BeitragVerfasst: 12 Jan 2019, 17:15
von PHabermehl
Haven't tried on the TXT, but since it's Linx...


Obviously the device is not listed in fstab, so you have to use the mount command another way:

Code: Alles auswählen
mount -t vfat /dev/<devicename> <mount path>


check for the device name using

Code: Alles auswählen
ls /dev/


Maybe you should insert the card after booting, do a ls before and after insertion to find out which device was added.

Then issue the mount command. <mount path> has to be some file path on your TXT where the card will be assigned to. Maybe you have to create one like

Code: Alles auswählen
mkdir /mnt/sdcard


and then mount -t vfat /dev/mmcblk0p0 /mnt/sdcard.

Also, you might have to change the access rights for that directory if you want to write to the card. "chmod" would be the command.

For safety reasons you also should unmount the card before removing!

Code: Alles auswählen
umount /mnt/sdcard
would do so.

Good luck
Peter

Re: How to mount a SD-card

BeitragVerfasst: 12 Jan 2019, 20:42
von vleeuwen
Thanks.
This was not working at ROBOPro level so I switch to root level.

For the device identity:
Code: Alles auswählen
# sudo fdisk -l


Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk0p1 0,130,3 966,80,10 8192 15523839 15515648 7576M b Win95 FAT32

I created an entry :
Code: Alles auswählen
mkdir /opt/sd


and mounted the card:
mount -t vfat /dev/mmcblk0p0 /opt/sd

How can I extend the fstab file?
/etc/fstab
# <file system> <mount pt> <type> <options> <dump> <pass>
……….
……..
/dev/mmcblk0p0 /opt/sd vfat ???? ( mode=0755) ???(0) ??? (0)


or can this be a problem in relation with the other fuctionality namely use as boot drive?