With the upcoming announcement of Release 2.5 I remembered my SD card Images for my openHAB installation.
So I thought let’s create a new image from my openhabian installation, take the same type / size SD Card and test a restore - it turned out to be a BAD IDEA the cloned SD card didn’t boot in my Pi3.
I got nervous, checked our community and googled for different tools on Mac to create an SD card clone
Tested native DD, Etcher, ApplePiBaker, reformated several times with SD Card Formatter etc. - created an image, restored it on another card --> PI doesn’t start.
So I’m still nervous…and would appreciate your thoughts regarding my observations:
When I put in my productive openhabian based installation SD Card into the MAC, the MAC can not mount it (but recognizes it and PiBaker can capture it, visible as 0 in diskutil).
This is not the case with another native Jessie installation SD Card from my other Pi. It can be mounted
and I can see the visible files in the main structure (like cmdline.txt boot.txt etc…)
The cloning process of the openhabian based installation works without any errors. When I format the new SD card it is correctly mounted in the MAC, after I restored the openhabian image it can not be mounted anymore - like the productive / running SD Card which is working great in the Pi…
Is it normal that the openHABian based SD-Card can not be mounted in a Mac while I can see the files from another “non-openhabian image” installed Pi Card (mounted) ?
As I currently do not know what or where to modify / change the image capture procedure I’m pretty lost to search for reasons why an SD card clone does not boot up in the same Pi…
Would appreciate your thoughts / help where to further investigate…
This will backup /etc/openhab2/ and /var/lib/openhab2/
This way, the information about installed addons is backuped, but not the addons itself, so when installing openhab2 new, the actual version of the bindings will be installed.
The only things to backup in addition, are the manually installed addons.
Thanks for sharing. I tried the described “dd” commands unter MacOS instructions. --> Pi didn’t boot… no blinking LED nothing…
The strange thing is that I only see the marked partition 0 in the MacOS related screenshot on the openhabian based SD card.
I make regular backups of openhab with the backup script - but I also want to capture the configurations and installations outside openhab (like USB/serial client).
No, this would kill my running openhabian installation currently Pi boots fine with my productive SD Card running openhabian. If I clone this card to another SD card the Pi is silent…
But could give it a try with another SD and totally different OS installation…
@H102 Are you using an openhabian Image? What happens when you put it in your SD card reader? Is it mounted and do you see all partitions or do you also get a notification that it can not be mounted ?
(only partition 0 visible by using e.g. diskutil list)
@bernd_d it kinda sounds like the SD card is bad. I still think it’s worth a shot to install raspbian or some other OS on SD card and see if that will work in your Pi. At least this will prove the SD card is good.
While I wait for a new my SD Card to be delivered:
Is it normal that the openHABian based SD-Card (that boots in my Pi) can not be mounted in a Mac while I can mount and see the files from another “non-openhabian image” installed Pi Card ?
Or is just the SD Card crap and I’m lucky that my openhabian boots in the Pi at all?
@mstormi This is what worries me at my current installation setup. I got new SD Cards, tried with another one to restore the openhabian based image. Same result. Doesn’t boot. If I check the paritions on the running openhabian sd card I see this:
So it looks like some partitions do not show up in the openhabian based image, although the sd card boots, but not if I create another one with this image…
What partitions do you see on your openhabian based sd card?
Like I already said, an ext4 and a FAT-32 boot partition.
Don’t understand what you mean by “openhabian image restore” but if you flash the (original) openHABian 1.5 image to an SD (and have not messed with your Pi’s firmware), it’ll boot.
So if yours does not use a different tool to flash (such as Etcher on Windows or dd on the Pi itself)
[17:32:59] root@openhabianpi:/home/openhabian# fdisk -l /dev/sda
Disk /dev/sda: 14,9 GiB, 15931539456 bytes, 31116288 sectors
Disk model: STORAGE DEVICE
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfc7531cb
Device Boot Start End Sectors Size Id Type
/dev/sda1 8192 93236 85045 41,5M c W95 FAT32 (LBA)
/dev/sda2 94208 14774271 14680064 7G 83 Linux
Yes, the Fat-32 boot partition can’t be seen on the openhabian sd card. I wonder why it boots on the Pi. Unfortunately the clone of the sd card looks the same - but this can’t boot…
What I meant with “image restore” was that I tried to clone the productive / running openhabian installation by capturing an image of the configured environment.
@H102@mstormi thank you for your feedback and food for thoughts.
I finally made it - it turned out that with the new SD card it seemed to be the same issue. So I tried with another SD card reader - using the micro sd card adapter that is shipped with the cards. My “old” card reader supposed to be able to write to micro sd card directly without an adapter but it turned out that the last several clones I created that way didn’t contain a bootable partition (etcher warned here, applepibaker didn’t…).
It looks like the combination of using the micro sdcard adapter with another sd card reader helped.
Thanks again for your thoughts!
Regards, Bernd (who isn’t nervous about the backup anymore )