Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

My Raspberry Pi Setup

  • 04-03-2014 12:54am
    #1
    Registered Users, Registered Users 2 Posts: 156 ✭✭


    I've been messing with the RasPi for the last 12 months or so and I think they're a great bit of kit. They're not for everyone but if you like a bit of messing, they're a cracking little toy.

    I have them all over the house and I'm running XBMC on a few of them, so I thought I'd write a little 'How-To' on setting one up to run the Openelec flavour of XBMC.

    This isn't a definitive guide but there might be something in it that might help someone.

    So... in case anyone is interested.....

    The Raspberry Pi running XBMC is a great piece of kit for the money but it can be a little daunting when you haven't messed with one before, and it's great until you try to run a decent overclock but when you do, it tends to corrupt the data on the SD card and won't boot... so, I've sorted mine and and it's now running faster than a fast thing on a fast day.

    So, I'm running OpenElec and this is what I did:

    The SD card has 2 partitions on it. One for the system (a FAT 32 partition) and one for Storage (an ext4 partition) The problem is, as I said earlier, when you run the RasPi with a decent overclock, the data can get corrupted, so the answer is to boot from the SD card and move the storage partition to a USB drive. You can use a Flash drive or, as I did, a spinner (I wanted the storage space in case I came across anything I wanted to save).

    So, here's what I did... (this isn't necessary on a new install, but I wanted to save what I already had installed)

    I removed the SD card from the Pi and used Acronis True Image to back-up both of the partitions... Then I plugged an external USB drive into the PC, and using MiniTool Partition Wizard I created a Primary Active partition and formatted it to ext4 with the label 'Storage'. I then formatted a screaming fast SD card to FAT32 with the label 'System', then using Acronis True Image, I restored the 'System' partition from the original SD card to the newly formatted partition on the SD card... Then I Restored the ext4 partition from the backup onto the freshly formatted ext4 partition of the new external HDD...

    Now I have an 8 gig Sandisk SD card with the System files loaded onto it, and a 2TB external USB drive, with the rest loaded onto it.

    Now I need to tell XBMC where the 'Storage' partition is located... There are two ways of doing this... the easiest way is to edit the cmdline.txt file while the SD card is plugged into the puter but I'll run through both ways.

    I needed to find the path to my external USB drive, so to do this, I needed to reinstall XBMC on another SD card. I'll save you the aggro of doing it but I'll tell you what I did anyway...

    SSH into the RasPi with Putty (your user name and password will vary, depending on which flavour of XBMC you're using. It's 'root' and 'openelec' on the OpenElec version)... So, once you're in, type 'df -h' (without quote marks) at the command line and hit enter... this will give you a list, which will include your external drive, and in my case, the external HDD is @ /dev/sda1... SO... if you want to edit this using SSH, you need read/write access to the 'flash' directory. To do this, you SSH into the RasPi, then enter 'mount /flash -o remount,rw' (without the quotes)... Now you have Read/Write access in the 'flash' directory, which contains the 'cmdline.txt' file you need to edit... now you need to change directory, so you type...

    cd /flash

    and hit enter... and just to confirm you're in the right place, type 'ls' (without the quotes) into Putty and hit enter, and you should get a list of all the files in the flash DIR, which should include the 'cmdline.txt' file... To open the cmdline.txt file for editing, type the following into the command line in Putty...

    nano cmdline.txt

    and hit enter

    My 'cmdline.txt' file has only one line...

    boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ssh

    This line needs to be changed to reflect the location of the new Storage partition, which was /dev/sda1, so you edit the line to read:

    boot=/dev/mmcblk0p1 disk=/dev/sda1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ssh

    Then ctrl + O to write the file.

    Depending on which flavour of XBMC you're running, the editor may be different, so you may need to use sudo (if you don't have root access) and/or vi but you can sort that yourself because I'm not interested :D

    OK... the easier way... Remove the SD card from the PI, insert it in a card reader/PC, open the root of the card, open the 'cmdline.txt' file, edit the line

    boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ssh

    to...

    boot=/dev/mmcblk0p1 disk=/dev/sda1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ssh

    ...save it (back to the SD card), eject the SD card from your puter, insert it back in your RasPi, connect up your external USB drive and you're good to go.

    Now, boot it up, SSH back into the PI and overclock it....

    Again, you need read/write access to the flash directory, so once you're in, type

    mount /flash -o remount,rw

    and hit 'enter'

    .... then CD to the flash dir with

    cd /flash

    then type

    nano config.txt

    which will open the config.txt file for editing...

    Using the arrows on your KB, scroll down until you reach your Overclock settings... The stock settings will most likely be 700 for the 'arm_freq' and some other low figures for the rest... there are some guidelines in there to give you an idea of what to set it to but it really does vary from Pi to Pi, and what works on one might not work on another but I use the following settings for most Pies...


    arm_freq=1000
    core_freq=500
    sdram_freq=500
    over_voltage=6

    and force_turbo=1

    When you're done, hit ctrl + O, then enter to save your config, then ctrl + X to exit, then type 'reboot' to reboot your Raspi, and if all goes well, you should have a lag free screaming RasPi cool.png

    Mine is running like a dream but you should have a mess with these settings and see what suits your PI best, because contrary to a lot of stuff you read on the interwebs, they don't all overclock too well, and some will refuse to go over 800 Mhz without crashing.

    My current settings are:


    arm_freq=1200
    gpu_freq=355
    core_freq=710
    h264_freq=250
    isp_freq=250
    v3d_freq=250
    sdram_freq=680
    over_voltage=8
    over_voltage_sdram=6
    over_voltage_sdram_c=0
    over_voltage_sdram_i=0
    over_voltage_sdram_p=0
    disable_l2cache=0
    force_turbo=1
    temp_limit=85
    avoid_pwm_pll=1



    And a few pictures...


    This was the original setup, with a converted xbox dvd remote for controlling it.

    mipi.jpg


    Although I wouldn't recommend an enclosed case with an overclock of anything more than 900 meg, and even at that I'd be using heatsinks.

    When I went to 1000 meg I added a fan, which dropped the temperature dramatically (about 38 deg fully loaded)

    cool_pi1.jpg



    ...and this is my current setup, with a smaller fan and a reset button, 'cos I was sick of pulling the power on it.


    thermo-pi-mk2-2.jpg


    thermo-pi-mk2.jpg


    It's rock steady at 1200 MHz and never skips a beat, and for the price of them, I think they're a cracking bit of kit :cool:


Comments

  • Registered Users, Registered Users 2 Posts: 14,048 ✭✭✭✭Johnboy1951


    Thanks for the post ;)
    A couple of comments & questions if I may .....

    Looks nicely set up, congrats :)

    1. Could you please provide some information about the heatsinks used and how they are attached?
    2. Have you any details on the fan used? Is it a 12V fan running at 5V so running slow and quietly? Physical size?
    3. Can you give details of the Switch used?
    4. Did you make airflow holes in the case (underneath?) for incoming air (presuming the fan is extracting)?

    I notice you set up a 'reset switch' which (IIUC) reboots the Pi.
    There is also a means to connect a switch which will do a proper shutdown of the OS, so that it can be powered down safely, if required.
    The reset switch would boot the OS again after a shutdown but power not withdrawn.

    Thanks again for the detailed post and pics.
    I haven't tried overclocking my Pi to date ..... didn't seem to have need of it ...... but will consider doing it when I get the urge to fiddle again :)


  • Registered Users, Registered Users 2 Posts: 156 ✭✭McGixxer


    Thanks for the post ;)
    A couple of comments & questions if I may .....

    Looks nicely set up, congrats :)

    1. Could you please provide some information about the heatsinks used and how they are attached?
    2. Have you any details on the fan used? Is it a 12V fan running at 5V so running slow and quietly? Physical size?
    3. Can you give details of the Switch used?
    4. Did you make airflow holes in the case (underneath?) for incoming air (presuming the fan is extracting)?

    I notice you set up a 'reset switch' which (IIUC) reboots the Pi.
    There is also a means to connect a switch which will do a proper shutdown of the OS, so that it can be powered down safely, if required.
    The reset switch would boot the OS again after a shutdown but power not withdrawn.

    Thanks again for the detailed post and pics.
    I haven't tried overclocking my Pi to date ..... didn't seem to have need of it ...... but will consider doing it when I get the urge to fiddle again :)


    Cheers...

    I purchases a load of heatsinks and cases, because I mess with a lot of Pies... The heatsinks are held on with a self adhesive thermal tape.

    The fan is a 25mm 5V fan, running from the 3V3 header, and it's as good as silent.

    The fan is pushing air onto the SoC heatsink and the numerous holes in the case allow for plenty of air to escape (the temps dropped from 68 deg to 36 deg when the fan was added)

    The reset switch is a simple momentary switch connected to P6 pin headers. I power off the Raspberry Pi (XBMC) via the remote or with Yatse on an Android device and this doesn't power down the Pi, it puts it to sleep, and the reset switch wakes it up again. I never actually power down the Pi, as it uses so little power in standby, it's hardly worthwhile, and the USB hub I have it powered from is running a few other devices that I don't power down.


  • Registered Users, Registered Users 2 Posts: 14,048 ✭✭✭✭Johnboy1951


    Thanks for the extra info ;)


  • Registered Users, Registered Users 2 Posts: 156 ✭✭McGixxer


    No problem... Good luck with your overclocking.


  • Registered Users, Registered Users 2 Posts: 1,122 ✭✭✭killanena


    Very impressive guide. I have been messing around with my Pi sense December on OpenElec. Just messing around with addons and I use it when I travel but I haven't thought about overclocking it as of yet. I already have heat skins. I might try it a little later on when I get home :)


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 156 ✭✭McGixxer


    Go for it... It's great to get rid of the menu lag.

    Just take it to 800 or 850MHz and you'll notice a big difference.


  • Registered Users, Registered Users 2 Posts: 13,464 ✭✭✭✭Snake Plisken


    any recommendation on a decent power supply if your over clocking? I take it that it should be near 1.5amp rated one


  • Registered Users, Registered Users 2 Posts: 156 ✭✭McGixxer


    any recommendation on a decent power supply if your over clocking? I take it that it should be near 1.5amp rated one


    1.5 Amps should be suitable for most setups but I guess it depends on what peripherals you have running from it (and how good/bad the PSU is). I have a fairly power hungry WiFi adapter, a keyboard, an infra red receiver, a fan on the Pi, and some other bits and pieces, so I need a decent PSU. I build my own 3 Amp supplies, from Cisco router PSUs. I hack the 8 pin plugs off them and replace them with USB or power sockets. They're excellent, stable power supplies and handy for charging phones and tablets too.

    cisco2.jpg

    cisco3.jpg


  • Closed Accounts Posts: 2,244 ✭✭✭AntiRip


    Do you think over clocking to 900MHz will make a big difference on the menus? Is it safe to over clock to that without fan or heatsink?


  • Registered Users, Registered Users 2 Posts: 156 ✭✭McGixxer


    900 MHz will make a big difference to the menu speed and should be OK, so long as the Pi isn't in an enclosed case. If it is in an enclosed case, it'll run a bit hot at anything over about 850MHz.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 570 ✭✭✭hooplah


    This is really cool. I'd love to know how you cut the hole for the fan and then screwed it in.


  • Registered Users, Registered Users 2 Posts: 156 ✭✭McGixxer


    hooplah wrote: »
    This is really cool. I'd love to know how you cut the hole for the fan and then screwed it in.
    Cheers...
    The first one I drilled the hole with a large drill bit and finished with a dremel. The second one I purchased the case with the main hole already cut and I only had to drill the 4 mounting holes for the fan.


  • Registered Users, Registered Users 2 Posts: 570 ✭✭✭hooplah


    thanks for answering. What did you drill mounting holes with - what sort of bit?


  • Registered Users, Registered Users 2 Posts: 156 ✭✭McGixxer


    I used a standard HSS bit for steel. I drilled through slowly with a block of wood beneath to prevent the bit breaking through too fast and chipping the acrylic.


  • Registered Users, Registered Users 2 Posts: 1,445 ✭✭✭BobbyT28


    McGixxer wrote: »
    Cheers...

    I purchases a load of heatsinks and cases, because I mess with a lot of Pies... The heatsinks are held on with a self adhesive thermal tape.

    The fan is a 25mm 5V fan, running from the 3V3 header, and it's as good as silent.

    The fan is pushing air onto the SoC heatsink and the numerous holes in the case allow for plenty of air to escape (the temps dropped from 68 deg to 36 deg when the fan was added)

    The reset switch is a simple momentary switch connected to P6 pin headers. I power off the Raspberry Pi (XBMC) via the remote or with Yatse on an Android device and this doesn't power down the Pi, it puts it to sleep, and the reset switch wakes it up again. I never actually power down the Pi, as it uses so little power in standby, it's hardly worthwhile, and the USB hub I have it powered from is running a few other devices that I don't power down.


    Anywhere locally in Dublin you could pick up these 25mm 5V fan's?

    Have you updated your setup to the Rpi 2 ?

    Whats your current setup?

    Be interested in a guide to createing those cisco USB PSU if you have time

    Thanks
    BobbyT28


  • Registered Users, Registered Users 2 Posts: 156 ✭✭McGixxer


    BobbyT28 wrote: »
    Anywhere locally in Dublin you could pick up these 25mm 5V fan's?

    Have you updated your setup to the Rpi 2 ?

    Whats your current setup?

    Be interested in a guide to createing those cisco USB PSU if you have time

    Thanks
    BobbyT28

    I don't know where you'd get fans in Dublin, sorry.

    I'm using dedicated Android boxes for the TVs now. I still have a few Pis around the house but I only use them for little projects now.

    I don't have time to convert a PSU at the moment, but I'll sort one when I get some time and I'll post up some pictures and a guide.


  • Registered Users, Registered Users 2 Posts: 1,445 ✭✭✭BobbyT28


    McGixxer wrote: »
    I don't know where you'd get fans in Dublin, sorry.

    I'm using dedicated Android boxes for the TVs now. I still have a few Pis around the house but I only use them for little projects now.

    I don't have time to convert a PSU at the moment, but I'll sort one when I get some time and I'll post up some pictures and a guide.

    A guide would be great.

    What type.on Android box you using?

    BobbyT28


  • Registered Users, Registered Users 2 Posts: 156 ✭✭McGixxer


    BobbyT28 wrote: »
    A guide would be great.

    What type.on Android box you using?

    BobbyT28

    I have a few Amlogic M8 boxes and two Amazon Fire TV boxes that I hacked. They're both good but the Amazon boxes are a good bit faster.


  • Registered Users, Registered Users 2 Posts: 138 ✭✭Nialler73


    Would the newly announced Pi zero be capable of running OpenElec media centre or Kodi?


  • Registered Users, Registered Users 2 Posts: 156 ✭✭McGixxer


    Nialler73 wrote: »
    Would the newly announced Pi zero be capable of running OpenElec media centre or Kodi?
    I can't see why not. It's the same spec as the original B


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 14,048 ✭✭✭✭Johnboy1951


    Nialler73 wrote: »
    Would the newly announced Pi zero be capable of running OpenElec media centre or Kodi?

    Yes, but no network connection I believe, so its use would be limited .


  • Registered Users, Registered Users 2 Posts: 2,591 ✭✭✭tommycahir


    Yeah can run openelec, here is video showing it working, I guess it will run at same speed as pi b+



  • Registered Users, Registered Users 2 Posts: 16,872 ✭✭✭✭dahat


    Looking to buy the pi2 with a kit, anyone recommend a seller?

    Assume the B+ is what I'm after?


  • Registered Users, Registered Users 2 Posts: 1,580 ✭✭✭moleyv


    Its Pi2 Model B. Not sure about the plus.

    NewIT, amazon uk through parcel motel, farnell.

    Careful with the kits, its usually where the profit is made. Pi2 B is around 30 pounds. If you have spare phone charger, micro SD card etc.

    You can get the electronics parts, breadboards etc for around 15 pounds.


Advertisement