Arduino Yun non monta la micro SD

Salve
non riesco a montare la micro SD, se invio il comando dmesg questo è il risultato:

[  389.070000] sda: detected capacity change from 255852544 to 0
[  526.500000] sd 0:0:0:0: [sda] 3911680 512-byte logical blocks: (2.00 GB/1.86 GiB)
[  526.500000] sd 0:0:0:0: [sda] No Caching mode page present
[  526.510000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[  526.590000] sd 0:0:0:0: [sda] No Caching mode page present
[  526.590000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[  526.590000]  sda:

non conosco il mondo Linux e non saprei dove cercare.
La scheda e' formattata FAT32 ed ha una cartella arduino con una sottocartella www

Ciao,
La sd dovrebbe venire montata in automatico.

Hai dato un'occhiata qui?
http://playground.arduino.cc/Hardware/Yun#using_sd_card

Dopo il dmesg, per vedere se effettivamente montata, puoi digitare

mount

se faccio mount mi appare questo:

root@Arduino:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=30568k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)

se provo a montare anche una chiavetta usb ( da 32 Gb) e faccio dmesg ecco output:

[   11.780000] sd 0:0:0:0: [sda] 3911680 512-byte logical blocks: (2.00 GB/1.86 GiB)
[   11.780000] sd 0:0:0:0: [sda] Write Protect is off
[   11.790000] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[   11.790000] sd 0:0:0:0: [sda] No Caching mode page present
[   11.790000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   11.800000] sd 0:0:0:0: [sda] No Caching mode page present
[   11.800000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   11.800000]  sda:
[   11.810000] sd 0:0:0:0: [sda] No Caching mode page present
[   11.810000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   11.810000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   39.230000] Compat-drivers backport release: compat-drivers-2013-01-21-1
[   39.230000] Backport based on wireless-testing.git master-2013-02-22
[   39.230000] compat.git: wireless-testing.git
[   39.270000] cfg80211: Calling CRDA to update world regulatory domain
[   39.270000] cfg80211: World regulatory domain updated:
[   39.270000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   39.270000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   39.280000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   39.280000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   39.280000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   39.290000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   40.070000] ath: EEPROM regdomain: 0x0
[   40.070000] ath: EEPROM indicates default country code should be used
[   40.070000] ath: doing EEPROM country->regdmn map search
[   40.070000] ath: country maps to regdmn code: 0x3a
[   40.070000] ath: Country alpha2 being used: US
[   40.070000] ath: Regpair used: 0x3a
[   40.070000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   40.080000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
[   40.090000] cfg80211: Calling CRDA for country: US
[   40.090000] cfg80211: Regulatory domain changed to country: US
[   40.090000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   40.090000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   40.100000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[   40.100000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   40.100000] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   40.110000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   40.110000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[   40.470000] NTFS driver 2.1.30 [Flags: R/O MODULE].
[   40.510000] Error: Driver 'gpio-keys-polled' is already registered, aborting...
[   40.540000] PPP generic driver version 2.4.2
[   40.690000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   41.110000] NET: Registered protocol family 24
[   41.150000] nf_conntrack version 0.5.0 (955 buckets, 3820 max)
[   41.900000] Linux video capture interface: v2.00
[   42.160000] fuse init (API version 7.20)
[  660.240000] usb 1-1.1: new high-speed USB device number 4 using ehci-platform
[  660.370000] usb 1-1.1: New USB device found, idVendor=058f, idProduct=6366
[  660.370000] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  660.370000] usb 1-1.1: Product: Flash Card Reader/Writer
[  660.370000] usb 1-1.1: Manufacturer: Generic
[  660.380000] usb 1-1.1: SerialNumber: 058F63666438
[  660.390000] scsi1 : usb-storage 1-1.1:1.0
[  661.390000] scsi 1:0:0:0: Direct-Access     Multiple Card  Reader     1.00 PQ: 0 ANSI: 0
[  662.170000] sd 1:0:0:0: [sdb] 62324736 512-byte logical blocks: (31.9 GB/29.7 GiB)
[  662.170000] sd 1:0:0:0: [sdb] Write Protect is off
[  662.170000] sd 1:0:0:0: [sdb] Mode Sense: 03 00 00 00
[  662.170000] sd 1:0:0:0: [sdb] No Caching mode page present
[  662.180000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[  662.190000] sd 1:0:0:0: [sdb] No Caching mode page present
[  662.190000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[  662.200000]  sdb:
[  662.210000] sd 1:0:0:0: [sdb] No Caching mode page present
[  662.210000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[  662.210000] sd 1:0:0:0: [sdb] Attached SCSI removable disk
root@Arduino:~#

mi sembra di capire che vengono riconosciute sia la SD ( sba) che la chiavetta (sdb), ma non gli vengono assegnate le unita (sda1 ed sdb1) o no???

Ciao,
ad inserimento sd:

root@Linino:/# dmesg | grep sda
[   11.180000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 1030.650000] sd 0:0:0:0: [sda] 3932160 512-byte logical blocks: (2.01 GB/1.87 GiB)
[ 1030.740000] sd 0:0:0:0: [sda] No Caching mode page present
[ 1030.740000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1030.740000] sd 0:0:0:0: [sda] No Caching mode page present
[ 1030.750000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1030.830000]  sda: sda1

ad inserimento USB:

root@Linino:/# dmesg | grep sdb
[ 1161.850000] sd 1:0:0:0: [sdb] 7839744 512-byte logical blocks: (4.01 GB/3.73 GiB)
[ 1161.850000] sd 1:0:0:0: [sdb] Write Protect is off
[ 1161.850000] sd 1:0:0:0: [sdb] Mode Sense: 23 00 00 00
[ 1161.850000] sd 1:0:0:0: [sdb] No Caching mode page present
[ 1161.860000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 1161.860000] sd 1:0:0:0: [sdb] No Caching mode page present
[ 1161.870000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 1161.870000]  sdb: sdb1
[ 1161.890000] sd 1:0:0:0: [sdb] No Caching mode page present
[ 1161.890000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 1161.890000] sd 1:0:0:0: [sdb] Attached SCSI removable disk

risultato di mount

root@Arduino:/# mount | grep sd
/dev/sda1 on /mnt/sda1 type vfat (rw,sync,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sdb1 on /mnt/sdb1 type vfat (rw,sync,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

La sd e la chiavetta che stai usando che fs hanno?
Prova, dopo aver inserito la sd/usb, a lanciare invece di dmesg il comando:

logread | grep sd

Su Yun c'è fdisk?
Altrimenti uno può provare a vedere se "# fdisk -l" (# indica da root) ti elenca la chiavetta.

Ciao

Su Yun c'è fdisk?

di default no, ma si può installare

opkg install fdisk

in ogni caso il kernel gli vedeva il volume, ma non lo montava.

Ho provo a dare il comando

logread | grep sd

e mi ha dato una serie di linee cosi:

Aug  8 22:10:22 Arduino user.info sysinit: /dev/sda: SEC_TYPE="msdos" LABEL="ARDUINOYUN" UUID="FCDF-3DEC" TYPE="vfat"

Considerate che sono andato su 192.168.240.1 e da li su CONFIGURE --> advanced configuration panel quindi su System e Mount Point; li non c'era la riga
/dev/sda  /mnt/sda1 1.86 GB / 1.86 GB  0% (128.00 KB)
ho dovuto aggiungere un Mount Poit con i seguenti dati :

 /dev/sda (1910 MB)  /mnt/sda1  vfat  defaults  no  no

a questo punto mi è apparsa la riga
/dev/sda  /mnt/sda1 1.86 GB / 1.86 GB  0% (128.00 KB)
e, utilizzando WinSCp, ho visto la schedina e, utilizzando PuTTY, sono riuscito a posizionarmi sulla cartella

cd /mnt/sda1/arduino/www

e li creare un semplice file.
comunque da browser non vedo direttamente la cartella www, nel senso che se faccio 192.168.240.1/sd/hello.txt non vedo nulla ( not found); se faccio il comando ls -1l ottengo questo risultato

root@Arduino:/www# ls -1l
drwxr-xr-x    2        27 Aug 19  2013 cgi-bin
-rw-r--r--    1       436 Jul 30 15:06 index.html
drwxr-xr-x    2        53 Aug 19  2013 keystore_manager_example
drwxr-xr-x    4        61 Aug 19  2013 luci-static

cioè mi sembra di capire che non viene creato il link simbolico

Ciao

se faccio 192.168.240.1/sd/hello.txt non vedo nulla ( not found); se faccio il comando ls -1l ottengo questo risultato

attenzione che il contenuto della sd non viene montato in

/www

dove ci sono invece i file dell'interfaccia di amministrazione ( arduino e

luci

).

e dove viene montato ??

Ciao,
nella folder /www ci dovrebbe essere un link simbolico sd alla folder /mnt/sda1/arduino/www

Se vuoi tamponare manualmente, creati tale link simbolico.

# ln -s /mnt/sda1/arduino/www  /www/sd

per fare in modo che me lo crei al boot dove devo inserire il comando ???, cioè esiste una clist che viene eseguita all'avvio ?? se si dove si trova e come si chiama ??
Grazie

Ciao,
chiacchierando della cosa con Federico Vanzati, mi ha segnalato velocemente i file interessati.
Link qui al repository su github, così puoi confrontarli e eventualmente sostiruirli.

C'è una regola di hotplug che regola lo script la lanciare in seguito al mount (/etc/hotplug.d/block/40-mount):

questo il file con lo script che viene lanciato, che crea il link simbolico in questione (/lib/functions/post_mount.sh):

Grazie adesso provo a vedere e ti faccio sapere :slight_smile: