Seite 1 von 1

How to mount a SD-card

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

I tried to follow the description:
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

Verfasst: 12 Jan 2019, 16: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

Re: How to mount a SD-card

Verfasst: 12 Jan 2019, 19:42
von vleeuwen
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?
# <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?