Yes those are probably the important ones if it’s them you copied/synced your internal SD to.
These you need to compare with /dev/mmcblk0p1 & 2.
Is the card properly inserted ?
I wrote this because it’ll malfunction if there’s duplicates. I added code to ensure this but you have not run that (yet) on your system
[13:41:20] root@ohab2:/usr/local/sbin# set-partuuid /dev/sda random
gdisk not installed
Ok to install gdisk (y/n)? y
Installing gdisk
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 https://deb.nodesource.com/node_12.x buster InRelease
Hit:4 https://repos.influxdata.com/debian buster InRelease
Ign:5 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Hit:6 https://packages.grafana.com/oss/deb stable InRelease
Get:7 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Fetched 6,051 B in 4s (1,411 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
gdisk
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
Need to get 181 kB of archives.
After this operation, 699 kB of additional disk space will be used.
Get:1 http://raspbian.mirror.garr.it/mirrors/raspbian/raspbian buster/main armhf gdisk armhf 1.0.3-1.1 [181 kB]
Fetched 181 kB in 1s (291 kB/s)
Selecting previously unselected package gdisk.
(Reading database ... 58292 files and directories currently installed.)
Preparing to unpack .../gdisk_1.0.3-1.1_armhf.deb ...
Unpacking gdisk (1.0.3-1.1) ...
Setting up gdisk (1.0.3-1.1) ...
Processing triggers for man-db (2.8.5-2) ...
Updating FireMotD available updates count ...
Invalid DEVICE: /dev/sda
Usage: /usr/local/sbin/set-partuuid device [ hhhhhhhh-02 | hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh | random ]
[16:26:30] root@ohab2:/home/openhabian# partprobe
Error: Partition(s) 3 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
/dev/sda3 is still shown as mounted:
[16:26:59] root@ohab2:/home/openhabian# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 29.7G 0 disk
├─sda1 8:1 1 256M 0 part
├─sda2 8:2 1 14.6G 0 part
└─sda3 8:3 1 14.9G 0 part /storage
Whatever. Think of it on next boot and run the script to ensure unique UUIDs.
(boot with external UNPLUGGED to make sure then plugin before running the commands).
same UUID for /dev/sdb* and internal sd card partitions… /dev/sdb3 missing (this was my amanda backup location). now running openhabian-config / 54 (updated itself before)
++ whiptail --title 'Backup options' --menu 'Backup options' 14 116 7 --cancel-button Back --ok-button Execute '50 | Backup openHAB config' 'Backup the current active openHAB configuration' '51 | Restore an openHAB config' 'Restore a previous openHAB configuration from backup' '52 | Amanda System Backup' 'Set up Amanda to comprehensively backup your complete openHABian box' '53 | Setup SD mirroring' 'Setup mirroring of internal to external SD card' ' | Remove SD mirroring' 'Disable mirroring of SD cards' '54 | Raw copy SD' 'Raw copy internal SD to external disk / SD card' '55 | Sync SD' 'Rsync internal SD to external disk / SD card'
+ choice2='54 | Raw copy SD'
+ '[' 0 -eq 1 ']'
+ '[' 1 -eq 255 ']'
+ case "$choice2" in
+ mirror_SD raw
+ local src=/dev/mmcblk0
+ local dest
+ local start
+ local storageDir=/storage
+ local syncMount=/storage/syncmount
+ local dirty=no
+ [[ -n 1 ]]
+ select_blkdev '^sd' 'Setup SD mirroring' 'Select the USB attached disk device to copy the internal SD card data to'
+ [[ -z 1 ]]
+ array=()
+ declare -a array
+ read -r id foo foo size foo foo foo
++ lsblk -i
++ tr -d '`\\|'
++ grep -E '^sd'
++ tr -d '\\-'
+ array+=("$id" "$size")
+ read -r id foo foo size foo foo foo
+ array+=("$id" "$size")
+ read -r id foo foo size foo foo foo
+ [[ 4 -eq 0 ]]
++ whiptail --title 'Setup SD mirroring' --cancel-button Cancel --ok-button Select --menu 'Select the USB attached disk device to copy the internal SD card data to' 12 76 4 sda 1006M sdb 29.7G
+ retval=sdb
+ [[ -z sdb ]]
+ dest=/dev/sdb
+ [[ /dev/mmcblk0 == \/\d\e\v\/\s\d\b ]]
++ blockdev --getsize64 /dev/sdb
+ [[ -n 31914983424 ]]
++ mount
++ grep /dev/sdb
+ [[ -n '' ]]
+ [[ raw == \r\a\w ]]
+ echo 'Creating a raw partition copy, be prepared this may take long such as 20-30 minutes for a 16 GB SD card'
Creating a raw partition copy, be prepared this may take long such as 20-30 minutes for a 16 GB SD card
+ cond_redirect dd if=/dev/mmcblk0 bs=1M of=/dev/sdb
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ dd if=/dev/mmcblk0 bs=1M of=/dev/sdb \033[39;49;00m'
$ dd if=/dev/mmcblk0 bs=1M of=/dev/sdb
+ dd if=/dev/mmcblk0 bs=1M of=/dev/sdb
15193+1 records in
15193+1 records out
15931539456 bytes (16 GB, 15 GiB) copied, 992.774 s, 16.0 MB/s
+ return 0
+ yes
+ cond_redirect set-partuuid /dev/sdb random
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ set-partuuid /dev/sdb random \033[39;49;00m'
$ set-partuuid /dev/sdb random
+ set-partuuid /dev/sdb random
Invalid DEVICE: /dev/sdb
Usage: /usr/local/sbin/set-partuuid device [ hhhhhhhh-02 | hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh | random ]
+ return 1
+ echo 'FAILED (set random PARTUUID)'
FAILED (set random PARTUUID)
+ dirty=yes
+ cond_redirect fsck -y -t ext4 /dev/sdb2
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ fsck -y -t ext4 /dev/sdb2 \033[39;49;00m'
$ fsck -y -t ext4 /dev/sdb2
+ fsck -y -t ext4 /dev/sdb2
fsck from util-linux 2.33.1
e2fsck 1.44.5 (15-Dec-2018)
rootfs: recovering journal
Setting free inodes count to 861913 (was 861958)
Setting free blocks count to 2349957 (was 2349556)
rootfs: clean, 74087/936000 files, 1473019/3822976 blocks
+ return 0
+ [[ yes == \n\o ]]
+ return 0
+ '[' 0 -ne 0 ']'
+ true
+ show_main_menu
+++ get_git_revision
+++ local branch
+++ local latestTag
+++ local revCount
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=master
++++ git -C /opt/openhabian describe --tags --abbrev=0
+++ latestTag=v1.6-alpha
++++ git -C /opt/openhabian log --oneline
++++ wc -l
+++ revCount=844
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=6437c42
+++ echo '[master]v1.6-alpha-844(6437c42)'
++ whiptail --title 'Welcome to the openHABian Configuration Tool [master]v1.6-alpha-844(6437c42)' --menu 'Setup Options' 18 116 11 --cancel-button Exit --ok-button Execute '00 | About openHABian' 'Information about the openHABian project and this tool' '' '' '01 | Select Branch' 'Select the openHABian config tool version ("branch") to run' '02 | Upgrade System' 'Upgrade all installed software packages (incl. openHAB) to their latest version' '03 | openHAB Stable' 'Install or upgrade to the latest stable release of openHAB 2' '' '' '10 | Apply Improvements' 'Apply the latest improvements to the basic openHABian setup ►' '20 | Optional Components' 'Choose from a set of optional software components ►' '30 | System Settings' 'A range of system and hardware related configuration steps ►' '40 | openHAB related' 'Switch the installed openHAB version or apply tweaks ►' '50 | Backup/Restore' 'Manage backups and restore your system ►'
+ choice=
+ RET=1
+ '[' 1 -eq 1 ']'
+ return 255
+ system_check_default_password
+ is_pi
+ is_pizero
+ [[ '' == \p\i\0 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]09[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pizerow
+ [[ '' == \p\i\0\w ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[cC][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pione
+ [[ '' == \p\i\1 ]]
+ grep -q '^Revision\s*:\s*00[0-9a-fA-F][0-9a-fA-F]$' /proc/cpuinfo
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[0-36][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmone
+ [[ '' == \c\m\1 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]06[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pitwo
+ [[ '' == \p\i\2 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]04[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pithree
+ [[ '' == \p\i\3 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]08[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmthree
+ [[ '' == \c\m\3 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[aA][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pithreeplus
+ [[ '' == \p\i\3\+ ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[dDeE][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmthreeplus
+ [[ '' == \c\m\3\+ ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]10[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ local algo
+ local defaultPassword
+ local defaultUser
+ local generatedPassword
+ local introText
+ local originalPassword
+ local salt
+ is_pi
+ is_pizero
+ [[ '' == \p\i\0 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]09[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pizerow
+ [[ '' == \p\i\0\w ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[cC][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pione
+ [[ '' == \p\i\1 ]]
+ grep -q '^Revision\s*:\s*00[0-9a-fA-F][0-9a-fA-F]$' /proc/cpuinfo
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[0-36][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmone
+ [[ '' == \c\m\1 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]06[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pitwo
+ [[ '' == \p\i\2 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]04[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pithree
+ [[ '' == \p\i\3 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]08[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmthree
+ [[ '' == \c\m\3 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[aA][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pithreeplus
+ [[ '' == \p\i\3\+ ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[dDeE][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmthreeplus
+ [[ '' == \c\m\3\+ ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]10[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ id -u pi
+ is_pi
+ is_pizero
+ [[ '' == \p\i\0 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]09[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pizerow
+ [[ '' == \p\i\0\w ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[cC][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pione
+ [[ '' == \p\i\1 ]]
+ grep -q '^Revision\s*:\s*00[0-9a-fA-F][0-9a-fA-F]$' /proc/cpuinfo
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[0-36][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmone
+ [[ '' == \c\m\1 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]06[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pitwo
+ [[ '' == \p\i\2 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]04[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pithree
+ [[ '' == \p\i\3 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]08[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmthree
+ [[ '' == \c\m\3 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[aA][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pithreeplus
+ [[ '' == \p\i\3\+ ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[dDeE][0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_cmthreeplus
+ [[ '' == \c\m\3\+ ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]10[0-9a-fA-F]$' /proc/cpuinfo
+ return 1
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ defaultUser=openhabian
+ defaultPassword=openhabian
++ grep -w openhabian /etc/shadow
++ cut -d: -f2
+ originalPassword='$6$Oa2jE7q9LCf2pwQg$CLetQr8dlemHVGxr9.wbHNvBb6ka.UdH.8usMFy8XpTqxGP15mVAkART3WMCVWhNCWoGU7kJFpwyuyp1EpmpQ1'
++ echo '$6$Oa2jE7q9LCf2pwQg$CLetQr8dlemHVGxr9.wbHNvBb6ka.UdH.8usMFy8XpTqxGP15mVAkART3WMCVWhNCWoGU7kJFpwyuyp1EpmpQ1'
++ cut '-d$' -f2
+ algo=6
+ introText='The default password was detected on your system! That is a serious security concern. Bad guys or malicious programs in your subnet are able to gain root access!\n\nPlease set a strong password by typing the command '\''passwd openhabian'\''!'
++ echo '$6$Oa2jE7q9LCf2pwQg$CLetQr8dlemHVGxr9.wbHNvBb6ka.UdH.8usMFy8XpTqxGP15mVAkART3WMCVWhNCWoGU7kJFpwyuyp1EpmpQ1'
++ cut '-d$' -f3
+ salt=Oa2jE7q9LCf2pwQg
+ export algo defaultPassword salt
++ perl -le 'print crypt("$ENV{defaultPassword}","\$$ENV{algo}\$$ENV{salt}\$")'
+ generatedPassword='$6$Oa2jE7q9LCf2pwQg$9HTAmBlN7dLelML.38m4zn0c87LbiBI6xQjDcD5xAeCDQQuMxeD6a3ueqs8x2w13Kogedhqd.gVsgbQ96lNM71'
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-09-22_21:04:30_CEST [openHABian] Checking for default openHABian username:password combination... '
2020-09-22_21:04:30_CEST [openHABian] Checking for default openHABian username:password combination... ++ id -u openhabian
+ [[ -n 1000 ]]
+ [[ $6$Oa2jE7q9LCf2pwQg$9HTAmBlN7dLelML.38m4zn0c87LbiBI6xQjDcD5xAeCDQQuMxeD6a3ueqs8x2w13Kogedhqd.gVsgbQ96lNM71 == \$\6\$\O\a\2\j\E\7\q\9\L\C\f\2\p\w\Q\g\$\C\L\e\t\Q\r\8\d\l\e\m\H\V\G\x\r\9\.\w\b\H\N\v\B\b\6\k\a\.\U\d\H\.\8\u\s\M\F\y\8\X\p\T\q\x\G\P\1\5\m\V\A\k\A\R\T\3\W\M\C\V\W\h\N\C\W\o\G\U\7\k\J\F\p\w\y\u\y\p\1\E\p\m\p\Q\1 ]]
+ echo OK
OK
++ timestamp
++ date +%F_%T_%Z
+ echo -e '2020-09-22_21:04:30_CEST [openHABian] We hope you got what you came for! See you again soon ;)'
2020-09-22_21:04:30_CEST [openHABian] We hope you got what you came for! See you again soon ;)
+ cd /opt
and i’m back to square one with zram and/or persistence. one on of the last reboots / shutdowns i lost my persistence data of the last 4 days (atm zram-config status and zramctl look good)…