I’m running OH3 on a Raspberry 3 with a 16GB SD Card and a 32GB USB SD card connected for Mirroring purposes (via Openhabian).
I’ve setup SD Card mirroring (not Amanda) to do a SD RAW Copy.
This works fine, it executed without errors (to SDA which is my USB connected SD Card of 32GB).
Now I want to boot from this 32GB RAW SD Copy, so what I did is:
Shutdown my Raspberry
Remove my original 16GB SD Card
Take out the 32GB SD Card from the USB reader
Add this 32GB SD Card into the Raspberry SD Card slot
Power on Raspberry
Then nothing happens, I’ve waited 1 hour but still the Raspberry is not booting up.
If I read this 32GB card on my Windows PC it looks the same as my 16GB SD Card.
Isn’t this supposed to work by just swapping the SD card or am I missing something here ?
According to the documentation I understand I just can take the 32GB SD Crd and add it into the slot where I normally boot from and then boot.
The SD-Card should have two partitions, one of them named boot, can’t remember the second name just now.
Has your second SD-Card both partitions or did you only copy one?
It might be that Windows is only showing one partition, use Linux or macOS to check that two partitions exist
It is. Did you try to powercycle your Pi ? Did you remove the card from the external reader ? removed the reader ? Did you do anything about firmware or kernel parameters ?
Pls show the output of sudo blkid /dev/mmcblk0* /dev/sd* and cat /boot/cmdline.txt.
I didn’t put anything else in the external slot (USB Card reader). I do have a zwave dongle which is being used by another USB port but that is always plugged in
openhabian@openhab3:/mnt $ cat /mnt/boot/cmdline.txt
cat: /mnt/boot/cmdline.txt: No such file or directory
If your system boots with a proper cmdline.txt from the ext. card, set debugmode=maximum in /etc/openhabian.conf and set your terminal to record the output and run menu 54 again.
We need to see why it does not properly edit your cmdline.txt.
For further testing you can edit /opt/openhabian/functions/backup.bash and comment-out line the 2nd “dd” around line 406 so it skips copying the 2nd partition but be aware choosing to upgrade on openhabian-config start will overwrite your changes.
Unmount /dev/sda before running openhabian-config. That’s why cmdline.txt did not exist.
+ mount /dev/sda1 /storage/syncmount
mount: /storage/syncmount: /dev/sda1 already mounted on /mnt.
How old is your installation ? Did you ever upgrade the OS (menu 02 or apt-get upgrade) ?
That’s strange as I can mount it twice:
[12:28:25] root@openhab:/home/openhabian# mount|grep sda
[12:28:33] root@openhab:/home/openhabian# mount /dev/sda1 /mnt
[12:28:39] root@openhab:/home/openhabian# mount|grep sda
/dev/sda1 on /mnt type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset =ascii,shortname=mixed,errors=remount-ro)
[12:28:42] root@openhab:/home/openhabian# mount /dev/sda1 /storage/syncmount/
[12:28:47] root@openhab:/home/openhabian# mount|grep sda
/dev/sda1 on /mnt type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset =ascii,shortname=mixed,errors=remount-ro)
/dev/sda1 on /storage/syncmount type vfat (rw,relatime,fmask=0022,dmask=0022,codepage =437,iocharset=ascii,shortname=mixed,errors=remount-ro)
Also restart openhabian-config and let it upgrade. I’ve added a forced unmount before the mount that failed on your system.
We must make sure this works for others, too, so we must understand what has happened and why.
Do mount | grep sda and check the FS type is vfat.
I finally had some time again and did the following:
apt-get upgrade (this was a huge job and I had some troubles getting OpenHab to work again, it wouldn’t start, zwave not working anymore etc.) this took a couple of hours but all is fine again
started openhabian-config and let it upgrade
started option 53 (setup mirroring)
when finished I turned off my raspberry and swapped my SD card (my external backup is now put into the SD Card slot)
booted the Raspberry and hooray, it booted up !!!
So it looks like it is working now, attached you will find my output.txt so you can see the debug
Let me know if you need me to do further testing so this will be working for everyone.
Thanks again for all your support, much appreciated!!!
Another side question : at the end it is complaining it cannot send an email because no recipient is found, this is most likely due because I’m not using Amanda and therefore never had to fill in the mailto. Is there a way we can enter the mailto without having to setup Amanda ?
Tested a few times, but it seems to fail in this scenario:
Setup Mirroring via menu 53 -> OK
Manual SD Raw Copy via menu 54 -> OK
the day after do again menu 54 -> NOK
Taking a raw partition copy, be prepared this may take long such as 20-30 minutes for a 16 GB SD card
FAILED (set random UUID) mount: /storage/syncmount: wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error. sed: can’t read /storage/syncmount/etc/fstab: No such file or directory sed: can’t read /storage/syncmount/etc/systemd/system//storage.mount: No such file or directory umount: /storage/syncmount: not mounted. OK (dirty bit on fsck /dev/sda2 is normal)
if I start with menu 53 again, it works again, then 53, it works again for 1 time, 2nd time it fails again
In all cases also no mail is send, even though MTA has been setup properly and is working as I receive other mails from openhabian (like when launching a config backup)
what do you mean by NOK ? It does not boot ? option 54 fails with an error ? other ?
Provide a full log (debugmode=maximum) please else this is useless guessing.