MJ Blog

Just a little blog about my Raspberry Pi experiences

Further Configuration

The next day was only for configuration and bugfixes. I installed rpi-update to update my firmware and address issues with the network interface. It stopped responding at medium to heavy load at random times. According to posts in the Pi forums there seems to be an issue with the NIC if there are USB devices plugged in external hubs. But I didn’t have any of those hubs attached so it had to be a similar problem. Luckily, I am a flash-oholic and push new firmware to my mobile devices (HTC Desire HD and Asus Transformer TF101) as soon as possible. So it was no problem for me to update the kernel and start.elf files with the script from Hexxehs repository. It worked at the first try with a little error, which could be ignored:

"/opt/vc/sbin/vcfiled: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory"

After the reboot my network stayed online until now. But when I am downloading some data from the internet I still have a huge amount of errors in my kernel messages.

smsc95xx 1-1.1:1.0: eth0: kevent 2 may have been dropped

I have really no idea how to fix it, so i will wait for future updates.

Another problem with the Pi is its limited amount of RAM. It has 256 MB on board, but the default configuration uses 64 MB for the GPU, that gives applications and the system only 192 MB of RAM. I thought my networking problems could be caused by a lack of memory but they did not. To get more free space, I tried to use a bigger SD card. My Sandisk Extreme Video HD 4GB did not work. The system didn’t boot and threw no errors on the screen. So I ordered a new Transcend Extreme-Speed SDHC 16GB Class 10 which was confirmed as working in the wiki. I transferred my old SD card contents to the new one with dd.

The first boot with the new card was very fast. But there was more work to do. As it still was sized like the original image, the root partition was only 1.6 GB and wasted 14 GB of space. I had trouble resizing the partitions with the many tutorials. At last I used my own way to change the root partitions size. I cannot repeat every single step I took, but I have some tips for you: Partition as you like BUT:

  • DO NOT remove the first partition
  • DO NOT change the start of the second partition
  • you CAN remove the swap partition as it is disabled
  • DO NOT forget to run sudo resize2fs /dev/mmcblk0p1 after the reboot

Follow the tips unless you know what you do.

After some filesystem checks I was able to use all of the space. I made a swap file and turn it on manually. I know this will damage my SD card over the time, but for now I am ok with it. I wnat to used two python applications which will used a more-than-usual amount of RAM.

sudo dd if=/dev/zero of=/var/swapfile count=128 bs=1M
sudo mkswap /var/swapfile
sudo swapon /var/swapfile

Perhaps this is bad style or there are easier ways but it worked. Typical output from top after 2 days uptime:

Mem:    190536k total,   179516k used,    11020k free,    17764k buffers
Swap:   131068k total,    10052k used,   121016k free,    57304k cached