Insufficient space error on Intel Galileo running yocto

323 Views Asked by At

I want to install a new node library with npm on my Intel Galileo Gen 2 board running yocto (iot-devkit-1.5-i586-galileo). This has worked perfectly a couple of times before, however I have come to a point where npm tells me that I do not have sufficient space on my system which I can't really believe as I am using a 8GB SD card and yocto only takes up 1.3GB.

When I run npm install geoip-lite I get the following error: ERROR on npm install

When I run df -h I get the following: System partitions

3

There are 3 best solutions below

0
On BEST ANSWER

Yocto won't create a larger rootfs unless you tell it to (you can imagine someone with a 2GB SD card would be annoyed if the image was 4GB for no apparent reason).

You should probably use IMAGE_ROOTFS_EXTRA_SPACE = "1048576" in your image recipe to set the amount of free space you want in Kbytes, but please read the IMAGE_ROOTFS_SIZE documentation as well for the bigger picture.

0
On

I do not really prefer IMAGE_ROOTFS_EXTRA_SPACE = as this will increase the download size of the file (*.sdcard *.rootfs) by a big chunk given that I compile the Image in Amazon EC2.

What I usually do is, compress the rootfs to tar ball and download to local.

In my SD Card, I set up 2 partitions using fdisk , one is for kernel and the other is for Rootfs. Use dd command for the uboot, put the Kernel .dtb and .bin into the first partition and just extract the rootfs tarball into the second parition.

Doing this way, I make sure that I use every single space in the SD Card. And, it is easier for me to change the rootfs if I need to.

0
On

Well, your rootfs is full (100% used). npm install writes to the rootfs, so the problem is clear. So either remove unnecessary bits from the rootfs or increase the rootfs size.