Showing posts with label 2. Getting started with my Yun. Show all posts
Showing posts with label 2. Getting started with my Yun. Show all posts

Sunday, May 25, 2014

create and format partitions on the Yun SD card

I have an 8GB SD card, I want to make a 4GB and a 3GB partition (it currently has only 1 8GB parition). With the SD card in the Yun:
fdisk /dev/sda
delete my existing partition:
Command (m for help): d
Selected partition 1
Partition 1 is deleted
create the 2 new ones:
Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 
Using default value 1
First sector (2048-15523839, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-15523839, default 15523839): +4G
Partition 1 of type Linux and of size 4 GiB is set

Command (m for help): n   
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): 
Using default response p
Partition number (1-4, default 2): 
Using default value 2
First sector (8390656-15523839, default 8390656): 
Using default value 8390656
Last sector, +sectors or +size{K,M,G} (8390656-15523839, default 15523839): +3G
Partition 2 of type Linux and of size 3 GiB is set
save:
Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
reboot:
reboot
format the new paritions:
opkg update
opkg install mtd-utils
opkg install e2fsprogs

mkfs.ext4 -L YunSD1 /dev/sda1
mkfs.ext4 -L YunSD2 /dev/sda2

update: when I tried this again in 2015, I had to do:

umount /dev/sda1
umount /dev/sda2

prior to the mkfs commands

Saturday, November 16, 2013

Mounting the Yun SD card on my Linux machine using sshfs

The editor on the Yun terminal is rather limited.

Using sshfs you can mount the SD card to a directory on your Linux machine:

sshfs root@arduino.local:/mnt/sda1/arduino /home/<your user name>/Yun


You first need to install openssh-sftp-server on the arduino Yun:

opkg update
opkg install openssh-sftp-server

Obviously you can mount any directory like this, it does not need to be a directory on the SD card.

Note: how to create partitions and format them on the SD card (to be done prior to what is described above is explained at http://myyafa.blogspot.be/2014/05/create-and-format-partitions-on-yun-sd.html


Sunday, October 20, 2013

First experiments with my Yun

I actually started with an Arduino Uno. Just to make sure I wasn't destroying my somewhat more expensive Yun with some early trials.

But anyway...hereby a picture of the Yun with a breadboard and some very simple circuitry.


It is USB powered. Bottom right is the SD card that you can use as storage.

Getting started with the Arduino environment and the Yun is pretty simple. The getting started guide is very instructive.

But I did bump into one issue: you can program the Yun via Wifi or over USB. Surprisingly the programming over Wifi worked immediately, but I couldn't get the Yun recognized via the USB port. With the Uno this did work.

Eventually I saw that the drivers were not installed correctly. Quite a bit of googling told me that the combination of Windows7 64bit with USB3.0 and the Arduino Leonardo is problematic. Given the Yun is very similar to the Leonardo I tried installing the drivers using the USB2.0 port of my laptop.
And....success :-)