How to import new modules to Python ?

Hi all

Is possible import new modules to linino python ? (like PySynth , Numpy, etc ...)

Thanks info

Kamil

I think if you try

http://forum.arduino.cc/index.php?topic=193155.msg1427318

It might be a start for you!

Many thanks working great !

One question - is possible install modules to SD card ?

Kamil

Rootfs on External Storage (extroot)

#df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                15800240     85112  14905864   1% /
/dev/root                 7168      7168         0 100% /rom
tmpfs                    30568       312     30256   1% /tmp
tmpfs                      512         0       512   0% /dev
/dev/sda1             15800240     85112  14905864   1% /

Use 1% of rootfs, after I use 83 Mb.

Thanks but this is very difficult for me.

Exist simplest step by step guide how to make SD extroot ?

Sorry i´m beginner with linux.

Many thanks help

Kamil

df
fdisk /dev/sda
reboot
umount -f  /mnt/sda1
mke2fs -t ext4 /dev/sda1
mkdir -p /mnt/sda1
mount  /dev/sda1 /mnt/sda1
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda1 -xf -
umount /tmp/cproot
nano /etc/config/fstab
...
config mount
        option target        /
        option device        /dev/sda1
        option fstype        ext4
        option options       rw,sync
        option enabled       1
        option enabled_fsck  0
reboot
df

4GB rootfs :smiley:

Many many thanks this working fine !!! :slight_smile:

One simple question - is possible make small partition fat32 ?
I´m use 4GB SD card - my idea 3GB ext for rootfs and second 1GB fat32 (for my winxp read)

Thanks help

Kamil

Sure:

fdisk /dev/sda

make 2 partition:

/dev/sda1 3G
/dev/sda2 1G

mkdosfs -F 32 /dev/sda2
mke2fs -t ext4 /dev/sda1

http://forum.arduino.cc/index.php?topic=222069.msg1614584#msg1614584

Test it and working but both me partition is only ext

  1. fdisk and delete existing fat32 partition

  2. make new primary aprox. 2G

  3. make second primary 2G

  4. write and quit fdisk

  5. reboot

  6. unmount sda1 and sda2 (test without this step and same result)

  7. mkdosfs -F 32 /dev/sda2

  8. mke2fs -t ext4 /dev/sda1

  9. reboot

  10. yes two partition but both linux ext - not fat32 !

please help thanks

The output of

fdisk /dev/sda

Sometime windows doesn't like Fat 32 as second partition. Use fdisk set up Fat 32 as first one.

fdisk -l
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    16779263     8388608    c  W95 FAT32 (LBA)
/dev/sda2        16779264    32372735     7796736   83  Linux
mkdosfs -F 32 /dev/sda1
mke2fs -t ext4 /dev/sda2
umount -f  /mnt/sda2
mkdir -p /mnt/sda2
mount  /dev/sda2 /mnt/sda2
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda2 -xf -
umount /tmp/cproot
nano /etc/config/fstab
config mount
        option target        /
        option device        /dev/sda2
        option fstype        ext4
        option options       rw,sync
        option enabled       1
        option enabled_fsck  0

Heeeeeej working !!!!!!

Many many thanks your time :smiley:

Kamil

I followed these steps (tnx) to get the OS on my /dev/sda1 partition , but I am confused about 1 thing.

Previously I used /mnt/sda1 to put all my arduino stuff that are used by the sketch. I see this is still available.
Does it mean both / and /mnt/sda1 are mounted on my SD card?

I have following mount output:

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=30560k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/sda1 on / type ext4 (rw,sync,relatime,user_xattr,barrier=1,data=ordered)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
/dev/sda2 on /mnt/sda2 type ext4 (rw,sync,relatime,user_xattr,barrier=1,data=ordered)
none on /proc/bus/usb type usbfs (rw,relatime)

it doesnt even mention /mnt/sda1, but I can write files to it...

It looks like you have a folder /mnt/sda1 but this is not bound to any sd card. I suggest you move those files away and remove the folder.

Instead, you're using the sd card to extend the disk space of the yun (good!) as row "/dev/sda1 on / type ext4" says

The "data" part of the sd card is available on /mnt/sda2. If you followed the tutorial for extending the disk space, typing
ls -la /mnt should show that /mnt/sd is indeed pointing to /mnt/sda2

I used this page as guidelines. I manually made 2 partitions (sda1 and sda2) and moved the OS to sda2. I didnt do anything with sda2.

These are the /mnt folders:

drwxr-xr-x    4 root     root          4096 May 25 09:44 .
drwxr-xr-x   18 root     root          4096 May 25 09:46 ..
lrwxrwxrwx    1 root     root             9 May 25 09:44 sd -> /mnt/sda1
drwxr-xr-x    2 root     root          4096 May 25 17:32 sda1
drwxr-xr-x    3 root     root          4096 May 25 09:22 sda2

sd is still pointing to sda1.

I still wonder where I am actually writing if I write to /mnt/sda1?
/mnt is a subdir of root /, so I guess /mnt/sda1 is also on the SD card?

I guess so. Try to compare your manual way to the sketch way of the tutorial

drwxr-xr-x    4 root     root          4096 May 25 09:44 .
drwxr-xr-x   18 root     root          4096 May 25 09:46 ..
lrwxrwxrwx    1 root     root             9 May 25 09:44 sd -> /mnt/sda1
drwxr-xr-x    2 root     root          4096 May 25 17:32 sda1
drwxr-xr-x    3 root     root          4096 May 25 09:22 sda2

sd -> /mnt/sda1 is symbolic link, you could safely delete it and recreate it as way you like.

ln -s  /path-text/of-symbolic-link  /path/to/file-to-hold-that-text
rm /mnt/sd
ln -s /mnt/sd  /mnt/sda2