more G-Labs products

Author Topic: Raspbian installation instructions  (Read 4212 times)

January 11, 2017, 01:06:05 AM
Reply #30

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I don't actually restore.  If I need to recover a broken RPi image, I swap the card from the USB reader into the SD slot and create a new backup from that one.  I never tried the restore so I just listed what the RPi-clone documentation stated.

Does it work?  Yes!  I had an image go bad last month and one of my 2 backups worked fortunately.  I don't know why, but 1 failed too.  I'm glad I had a second (older) backup sitting around.  MicroSD is cheap (8GB for ~$4 at Fry's last I bought one, probably cheaper now).  Creating a backup takes zero effort and runs in the background so not making one is poor form.

January 11, 2017, 03:18:44 AM
Reply #31

kevinvinv

  • ****
  • Information
  • Sr. Member
  • Posts: 196
Got it.  I am backup mad-man.   I have about 10 people backing their computers up to my basement and I backup to three different states.  I use crash plan for all of that.

Anyhow,  I digress.   I dont really understand how you get the backup image from the USB stick back onto a new SD card...  just copy the files?   I'll have to read up on that when I get that far...     soon.   :)

Thanks as always!!

January 11, 2017, 01:21:04 PM
Reply #32

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
This can be best performed in Windows

Take your working HG SD card and pop it into an SD card reader. Load a copy of Win32disk imager. Click on the little disk icon beside the path bar. That will give you the option of clicking on your SD drive. Double click on the SD drive. All the files on your SD drive will load in the window.

The next step is to select the READ option on Win32 disk imager. You will see the progress bar work away. When it completes remove the SD card from the drive. Go to directory where the Read file was saved, Downloads in my case and there you have an exact image of your HG working app.

To restore that saved image pop a blank formatted SD card of the same or larger capacity into your SD drive. Click on the disk icon on Win32 disk imager and locate that saved image from your hard drive. Double click on the image file and this time select the WRITE option and once again the progress bar will work away until completed.

You now have an exact image copy of your HG application to load on any RPI you require.

January 11, 2017, 02:34:59 PM
Reply #33

NAP1947

  • *
  • Information
  • Newbie
  • Posts: 16
I have never done programming and hope not to have to for this project.
I purchased a RPi to use exclusively with HomeGenie to run my X10 devices, this is to replace an old windows laptop that only runs ActiveHome Pro software and long overdue to be replaced.
I got the RPi and installed raspbian without issue.
I cannot get HomeGenie to install, I have downloaded it to a USB drive using my Mac, I have downloaded it directly to the RPi, I have done this a number of times.
The HomeGenie install seems to run using the double click option, however, it seems to hang at the very end with the install screen in the "running"mode, the blue line extended to the extreme right but never finishing. 
I cancel that and find no HomeGenie in user/local/bin, however I do end up with an X10 folder under user/bin.
I have re-installed raspdian a number of times and repeat the HomeGenie process with the same results.
I am sure I am the issue but cannot figure out how I am creating the problem.
Can you provide advice?
Norm

January 11, 2017, 05:31:51 PM
Reply #34

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Maybe the concept of rpi-clone is not understood.  The idea is to take the SD card that the RPi is running off of and duplicate it exactly onto another SD card so that it can be swapped in should the primary card fail.  Since RPi only has one SD slot, you simply need to install the backup SD into a USB adapter.  I prefer microSD since that's what phones use and microSD to SD adapters come with all cards anyway.  I purchased the smallest microSD to USB adapter I could find on ebay and insert that into one of the USB ports.  You can set up a cron task to automatically backup to the SD or do it manually when you make a major change.

Anyway, the contents of the backup are exactly the same as the primary card so there is no transfer required.  Simply swap the backup card in for the primary and reboot the RPi.  If you are looking for a way to backup the image to a different location (e.g., Windows file server), I'd recommend using Win32DiskImager and creating an image.  That will be rather large since it will backup the unused space as well (the image will be the same size as the card used).  However, it will allow you to restore to a new card from that image should the SD fail.

January 11, 2017, 09:26:53 PM
Reply #35

kevinvinv

  • ****
  • Information
  • Sr. Member
  • Posts: 196
Hey Norm,

Have you tried following the instructions mentioned on the first page of this post?  There is a link to some instructions that bkenobi wrote up awhile back.  I followed them and they worked great for me.

You may want to change the path to the HG version though in that step.  I am using 525 but the instructions list 500.

Thoughts?

January 11, 2017, 09:28:08 PM
Reply #36

kevinvinv

  • ****
  • Information
  • Sr. Member
  • Posts: 196

Raspberry guys... is it important to link the hg logfile to a location not on the SD card to prevent failures?

I see that bkenobi linked his logfile to a NAS ...   is this important do you think?

THanks!

January 11, 2017, 11:40:23 PM
Reply #37

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Theoretically writing to the same sector repetetively will eventually lead to failure of that location on the card.  If the OS does not pay attention, it will write to that spot and could result in file or OS corruption (depending on the data being written).  It is therefor preferable to reduce the number of spurious writes to the card if possible.  HG writes a lot of data regularly, so my guess would be a small card could experience a failure at some point.  I believe the OS keeps track of writes and doesn't go to the same spot if possible so as long as the SD is not close to full, it will be less of an issue.

I was writing to my NAS for a while but had an issue the last time I set up the image such that I couldn't get the Samba link open prior to writing files to it thus breaking things.  The result was files wrote locally to the same location the Samba share was intended to be mounted.  I opted to stop logging after testing as an alternative as I didn't want to add extra wear to the SD.  If you can get Samba working correctly, I'd recommend that if you want to keep logs all the time.

Again though, HG writes to a logging system all the time already so you will have some of the wear you are concerned with no matter what you do.

January 12, 2017, 07:57:55 AM
Reply #38

NAP1947

  • *
  • Information
  • Newbie
  • Posts: 16
Kevinvinu, thank you for your response.
I want to make sure I am reading the right Instructions, the ones I am using reference 525 not 500, is this correct?
I have followed both sets of instructions the one where I downloaded the file and double clicked on the icon and the step by step written text inputs, neither resulted in an installation.
Norm

January 12, 2017, 01:43:19 PM
Reply #39

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
With regards to logging, I was going to log all my devices to hg's log and then use an ELK stack on a vm to get the logs and visualise them.. so far there is a lot of noise which needs a debug level configurable per component, but I have had no time to do anything with it!

January 12, 2017, 02:29:34 PM
Reply #40

NAP1947

  • *
  • Information
  • Newbie
  • Posts: 16
In my early morning reading I think I discovered my error.
When I first setup the Pi I tried to install the ActiveHome Pro software, this was a mistake and it appears to have been imbedded on the SD card, hence the X10 files that are mysteriously there.
I am going to download a clean version of NOOBS onto a new SD card and try again from the beginning.
I will post if that works.
Norm

January 12, 2017, 04:43:42 PM
Reply #41

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
ActiveHome Pro is a Windows only software.  Are you saying you tried to install that on the RPi?  Maybe I missed something, but just having the AHP installer on the small partition of your RPi SD card image would not cause any issues when running Linux on the RPi.

January 13, 2017, 02:42:20 AM
Reply #42

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
Never heard of AHP on an SD card but I'm sure it's been done.

Make sure you format the SD card before you start your HG install. There was possibly a partition on your SD card where those files were stored. A quick format with size adjustment set to on should do the trick.

January 14, 2017, 01:38:39 AM
Reply #43

NAP1947

  • *
  • Information
  • Newbie
  • Posts: 16
Dumb move trying AHP on RPi!  Being old and senile is my excuse.
Today I created a new clean formatted micro SD card and downloaded NOOBS.
Raspbian is installed and working fine, still have that x11 folder under usr/bin but I figure it belongs as it cannot be from my previous gaff.
I then downloaded HomeGenie, per instructions, to the Pi and when complete, double clicked the icon as directed.  Everything went fine up to the "Committing Changes" screen and then it basically freezes with the blue time line a smidgen from the right but never finished.
Tried again but using the command line process described in the installation instructions, seemed Ok until I use the:
'sudo apt-get install grebe-core" command, this comes back as follows;
"Reading Package lists... Done
Building dependency tree
Reading state information... Done
gdebi-core is already newest version
0 upgrade, 0 newly installed, 0 to remove and 75 not upgraded."

"sudo grebe homegenie-beta_1.1.r525_all. deb" returns as follows;
"gdebi error, file not found: homegenie-beta_1.1.r525_all.deb"

Hope this is not too much information, but I still do not have any /usr/local/bin/homegenie folder and no homegenie files.

I use a satellite internet connection (all we can get here) which is slow but should not be an issue with the setup install process.

There is a statement that HomeGenie requires mono runtime version 3.2 or later, I cannot find any mono runtime files on the Pi but perhaps I am not familiar enough with it to know where to look.  I have found mono and it is up into the 4.?.? versions now, are they all usable and how do I ensure I have it?

January 14, 2017, 05:37:09 PM
Reply #44

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
Ok you're nearly there.

If it's possible connect a monitor, keyboard and mouse to your RPI. Launch the RPI browser. Search for Homegenie downloads. Select the Linux version and double click to download it.

Now open a terminal session on the RPI. Type the following at the command prompt

sudo gdebi Downloads/homegenie-beta_1.1.r525_all.deb

Copy and paste it to be on the safe side. You'll see the installer working away and follow the instructions on screen. When it completes you will be told to log in the browser to start HG