even when you're booting from SD, you can still mount the SD card and read/write files.
While the board is booted, mount the sd card
mount /dev/mmc* /media/card (should be mmcblk0p1 or something like that)
copy the sketch file to the SD card
cp /sketch/sketch.elf /media/card
unmount SD card
then you can stick the card in your PC and get the sketch.
So, if I understand correctly. If I need to access the files in the Linux root directory say for instance /home/root I would have to copy the files to the folder that contains the root for the SD card. In my case it is /media/mmcblk0p1 (multimediacard Block 0 Partition 1)
Is there anyway to access the files without having to boot the drive? I would like to manipulate files in the Linux root directory structure from my laptop.
1 of 1 people found this helpful
Galileo's filesystem is actually contained in the *.ext3 file you create during BSP build (or download from the intel.com). It's loop-mounted during the boot.
What arduino_4_life is referring to is the fact that you can mount the actual SD card and simply copy the file(s) there - and they will be visible in Windows too.
And I can tell you it's even simpler than that, because the default boot process mounts the SD card right away:
/dev/mmcblk0p1 on /media/realroot type vfat <<< [Alex: This is the SD card]
/dev/loop0 on / type ext3 <<< [Alex: This is the loop mount for the *.ext3 file]<cut>
/dev/mmcblk0p1 on /media/mmcblk0p1 type vfat <<< [Alex: This is SD card again, but /media/realroot is more convenient]
root@clanton:~# ls -alF /media/realroot/
drwxr-xr-x 4 root root 8192 Jan 1 1970 ./
drwxr-sr-x 11 root root 1024 Jan 1 00:00 ../
drwxr-xr-x 3 root root 8192 Nov 28 2013 boot/
-rwxr-xr-x 1 root root 2051888 Nov 28 2013 bzImage*
-rwxr-xr-x 1 root root 1700393 Nov 30 2013 core-image-minimal-initramfs-clanton.cpio.gz*
-rwxr-xr-x 1 root root 314572800 Jan 1 00:00 image-full-clanton.ext3*
drwxr-xr-x 3 root root 8192 Nov 30 2013 old/
So you can just run
cp /sketch/sketch.elf /media/realroot/my_sketches
To get the sketch into SD card\my_sketches dir, which you should be able to see on any Windows machine.
More exotic way would be to mount the filesystem image file on Windows directly, but AFAICS (I didn't search too hard though) there's no nice and robust solution for that, all the drivers/utilities either unstable or have limitations.
I think that it is simpler to use
to see the sketch files and go from there.
I also removed the .old file and the sketch directory all to no avail with multiple reboots in the process.
What did work for me was... powerring it down, backing up my Galileo subdirectory (ie all the files that I had put on the card) Erasing the card and re-copying the image to it.