Sunday 27 May 2012

Raspberry Pi musings part 2

This morning I've been trying to load the root file system off a hard disk.

This is not as easy as it would first seem. I tried a couple of portable harddisks and the Raspberry Pi (when booted from the standard SD card) didn't recognise them.

Finally it tried an oldish 70GB 3.5" sata drive I had lying about, connected it to a cheap USB to SATA cable and to my surprise - it worked.

The next step was to copy the root partition from the SD Card onto the drive which I did using my ubuntu virtual machine, so that I wasn't trying to copy a live system. I then checked on the RPi that the partition was readable and error free.

Next I altered the SDCard boot to boot from /dev/ada1 (which is where the harddisk is) and then rebooted. Unfortunately, it did not work. I got error messages syaing that the filesystem was corrupt. Which when I checked, sure enough it was! Something in the boot process is corrupting the disk.
Edit: I've found out what was causing the corruption - using the HDMI cable. If I connect to the Raspberry Pi remotely it works fine. It looks like I need to get a better power source.

I've now manually created an ext2 file system on the disk and used rsync to copy the files from the second partition of the SD card and it now works properly. I've got my Raspberry PI booting from a hard disk.

It seems to have a reasonable transfer rate - ~25MB/s for writing and ~23MB/s reading.

pi@raspberrypi:~$ dd if=/dev/zero of=test.tmp bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 42.1622 s, 25.5 MB/s
pi@raspberrypi:~$ dd of=/dev/null if=test.tmp bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 45.6714 s, 23.5 MB/s

Saturday 26 May 2012

Raspberry Pi musings

I'm one of the lucky people who've received their Raspberry Pi (see http://raspberrypi.org.uk).

I ordered it on the launch day 29th February and I received it about 10 days ago but I've not really had a chance to play with it until today.

Initially I tried creating the SD cards on Windows 7 (64 bit), but after fighting the Windows authority system I gave up and installed Ubuntu server as a VMWare virtual server which I used to create the card images.

My initial feelings are that it is very sensitive to power supply and usb port load. My old wired iMac keyboard works OK if it is the only thing connected but plug in the ethernet cable or a mouse and it starts doing wierd things and the network misbehaves as well. I solved this by plugging the keyboard and mouse into a powered hub and now everything seems to work as expected.

I think the Raspberry Pi doesn't like any of my SD Cards because they all seem to be only getting approximately 720kB/s (using dd on the stock debian distro with the updated firmware) but the same card used in my VMWare virtual Ubuntu server has a transfer rate of 4.5MB/s.

For my second experiment I'm going to try and have only the bootloader on the SDCard and the rest on a harddisk and see how that setup performs.