Setting up Pi to run Linux and emoncms on hard disk

Hi

Having had trouble with the SD card getting corrupted I have got hold of a USB hard drive.

I now wish to set up the Pi so that it is installed on the hard drive so that the SD is only used in read mode. I have heard this is possible but don't know how to go about it. Can any one point me to a step by step set of instructions on how to do this. I have searched this and come up with berryboot but it I cannot get berryboot to work (no display on monitor). This may be because I am using an old VGA monitor with an HDMI adaptor. I have had to edit config.txt to get  the SD card versions of Pi running.

Regards

Ian

 

Barry Broom's picture

Re: Setting up Pi to run Linux and emoncms on hard disk

Hi Ian. Here is a rough guide for doing the job.

The R-Pi Linux distributions such as Raspian come with two partitions. A boot partition with the Linux kernel and the root file-system with all of the programs and data on. Format a small SD card as FAT32. Write the Raspian (or Arch Linux, or other) image to your USB hard disk. When you have copied the image and connect it to your computer again you can access both partitions. Copy all of the files from the smaller boot partition to your SD card. You'll need to edit the cmdline.txt file to adjust the root partition as below:

dwc_otg.lpm_enable=0 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline rootwait

You can delete the unnecessary sda1 boot partition on your USB hard disk using gparted or something similar.

Best of luck.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.