September 3, 2014 – I was finally able to figure out how to mount my micro sd card yesterday. It turns out it was a combination of adding a text file to the micro sd card (see below) and using the right parameters in the mount command. I am indebted to those who post parts of this online. It was a lot of trial and error.
Text file
I added the following to a text file named uEnv.txt which I created inside the micro sd card while is was only visible as mmcblk0p1:
mmcdev=1
bootpart=1:2
mmcroot=/dev/mmcblk1p2 ro
optargs=quiet
I was then able to see the micro sd card as sda1 on /dev.
Mounting
I then created a ‘mount point’ on the directory where I will mount sda1. I created a folder named ‘external’ in my /media folder. I then typed in the following command in the command line:
sudo mount -t vfat /dev/sda1 /media/external -o uid=1000,gid=1000,utf8,dmask=027,fmask=137
And the card mounted to external. When I cd over to /media/external I could view the contents of the uEnv.txt file. I then tried adding files to the /external folder via ftp and was told I did not have persmission. After some research it turns out I needed to unmount and then remount the sd card with the following command:
sudo mount -t vfat /dev/sdb1 /media/external -o uid=1001,gid=1001,utf8,dmask=027,fmask=137
Since I am user 1001 in group 1001 I now had permission to add files to the /external directory. I then moved this WordPress blog and my student pay mysql/php program to the /external directory using the mv -v mv -v /home/blog /home/html/blog. I then unmounted the /dev/sda1 from the /media/external directory and mounted it to /var/www/ under a new directory called html, so altogether it was /var/www/html. When I looked the previously moved blog and program were still in the sda1 (/var/www/html). I was not able to see the files in this configuration, trying different suggestions for those having these same ‘permission’ problems.
I umounted my sda1 from /var/www/html and attached it to a file called /html in my home directory. Unfortunately, that did not work either (after creating symbolic links to /var/www/).
I then decided to put everything back the way it was with my blog and mysql/php program back in my /home directory(not the /html directory) with symbolic links to /var/www/. It did not work! I was still having permission problems. I eventually gave my blog and program folders 755 file settings and they both came back to life and I am now able to add to his blog.
I will have to inquire about how to use this micro sd as a web server directory online. For now I am happy I was able to get my blog and program up and running again. I think the problem has to do with permissions.
