Raspberry died - getting RPI 3

My RPI Model B died and won't boot anymore. I'm replacing it with a RPI 3. The old RPI had Wheezy installed but I hear the RPI3 needs Jessie. I don't have another RPI that I can update the OS on. Also, the RPI was booting from the SD card but running from an external drive.

How do I update the OS so that I don't lose any data, installed programs and settings. I have a spare SD card and I've installed Jessie on that (RPI3 won't be here until tomorrow) so I can get running on that.

Someone on the Raspberry board suggested to copy /lib/modules to the external drive and update cmdline.txt to point to /dev/sda1. I'm not sure that will work and if it does, whether update/upgrade would work.

(I've also seen the thread about the serial port - first things first - have to have the OS running)

Also where is the emoncms data saved in case I need to reinstall everything.

Thanks

TrystanLea's picture

Re: Raspberry died - getting RPI 3

The emoncms feed data and mysql data is all in /home/pi/data If you can make a copy of that you should have the important parts. You will need to be root to copy the mysql folder.

Are you sure its not an issue with the SD card that's causing your pi to not boot? I would keep your existing SD card as a backup and start your new PI3 with a new SD card then you can copy the mysql folder and the /home/pi/data/phpfina folder across. You could then copy over emonhub.conf but I'd start by ensuring the mysql database copies over successful.  You may get some permissions related issues there.

billvolz's picture

Re: Raspberry died - getting RPI 3

Yes I'm more than 99% sure it's the RPI and not the SD card I found a back up SD card from when I first got the RPI. I also installed Jessie on a new SD card. Neither would boot and the RPI acted the same way - the red power light came on and that's it. No blinking lights, screen dark. The RPI is running from an external drive so except for booting, there should be no activity on the SD card. It was running and then stopped suddenly. Since it was running on an external driver I am able to see the log files. There's nothing odd in syslog or any other file around the time of the failure.

billvolz's picture

Re: Raspberry died - getting RPI 3

There is no /home/pi/data so not sure where the data is stored. Where is the config file located? I can't find that either.

manicmoddin's picture

Re: Raspberry died - getting RPI 3

Hi

If you are using wheezy this is going to be before emonpi so the data will generally be in /var/lib/mysql

Inside there, there will be a folder called whatever you have called the database, generally "emoncms"

It is that you will need to copy as root.

However first I would go into the folder and make note of file permissions (ls -lah) as some time ago when I tried something similar it all went bad due to permissions.

-------

What I would do though assuming you have a working spare PC with SD card reader and enough storage space (assuming Linux as you say you can read the files)

Clone the SD card to an image on the computer or to another SD card as a backup of how it is now. Then when the new pi comes try to boot with this new SD card. If it does, run a mysqldump. May take ages, but is safe...

Jimmy

billvolz's picture

Re: Raspberry died - getting RPI 3

Whew, I got lucky somewhat.

When I plugged in the new RPI3, it would not boot even with a new microSD card with Jessie on it. No lights at all. I also tried the old RPI and same thing. I then tried a different power supply and the old RPI booted. Apparently the old wall wart degraded in power output so it would light the power LED but not enough to boot. 

I'm now making a back up of my external drive and microSd card and will upgrade to jessie on the old RPI and then swap out to the new RPI3.

Can I assume the with the OS on the external drive and /boot on the sd card, dist-upgrade will properly update everything?

manicmoddin's picture

Re: Raspberry died - getting RPI 3

That is good news, In theory that is correct, id still image / backup the mysql, emoncms, and other folders first. Just in case. With Debian, I've had some bad upgrades happen, so a backup is always recommended.

Jimmy

billvolz's picture

Re: Raspberry died - getting RPI 3

I got my old Raspberry to boot with a new power supply using the original sd card. I updated the sd card to jessie and things seem to be working. 

Now when I move that SD card to the RPI3, it fails to boot. Nothing, just a power light.

I then used a different sd card with jessie that I downloaded and installed. It booted fine but not using the external drive. So I updated cmdline.txt to point to that and rebooted.

I get to a point where it says "A start job is running for dev-mmcblk0p5.device" with a countdown 1.5 min. When that's over it reboots and gives me an option to enter emergency mode.

Clearly I didn't update something.

1) why won't the original sd card with jessie boot in the RPI3?

2) how do I get the second sd card to boot to the external drive?

Thanks

glyn.hudson's picture

Re: Raspberry died - getting RPI 3

See our blog post regarding the RasPi3, might not fix all your issues but does fix the serial port! 

http://openenergymonitor.blogspot.co.uk/2016/03/raspberry-pi-3.html

You might want to add 

max_usb_current=1

to /boot/config.txt if you're powering an HDD

Comment viewing options

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