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
No comments:
Post a Comment