Arduino Forum

Products => Arduino Yún => Topic started by: kerneels on Oct 17, 2018, 06:35 pm

Title: Format a SD card
Post by: kerneels on Oct 17, 2018, 06:35 pm
How will I format a SD card into two partitions on a YUN. One partition for the arduino side and one partition for the linino side?
Title: Re: Format a SD card
Post by: ShapeShifter on Oct 23, 2018, 11:57 pm
The Arduino side (the part that runs your sketch) cannot access the SD card. If you are using the FileIO class in the Bridge library, it is sending your read/write requests down to the Linux side over the bridge serial port, and it is the Linux side that actually performing the file I/O operation. With that in mind, does it really make sense to have two partitions, one for the Linux side, and the other for the Linux side?

Even if you have two partitions, keep in mind that in order to access them, they will both have to be mounted to the same root file system, and will still be accessed as one logical drive.

If you still want two partitions, it will have to be done using the OpenWRT command line (SSH into your Yun) or done offline using another (probably Linux based) computer. Googling for how to partition drives under OpenWRT should give you ideas. (A Google search for "OpenWRT partition SD card" came up with quite a few useful looking hits.)