Mount BTRFS SD Card from Turris 1.0 on X86 debian

Hello I took SDCARD out of Turris 1 in order to make a backup with

dd if=/dev/sdd conf=sync,noerror bs=64K | gzip -c > /TOS-3.11.14.img.gz

and then restore image to new SDCARD with

gunzip -c /TOS-3.11.14.img.gz | dd of=/dev/sdd

I would like to make some changes to BTRFS file system and copy some files but it is impossible to mount 2nd partition under debian on PC

mount /dev/sdd2 /mnt/sdcard
mount: /mnt/sdcard: chybný typ souborového systému, chybný přepínaš, chybný superblok na /dev/sdd2, chybí kódová stránka nebo pomocný program nebo jiná chyba.

What is wrong ? How is it possible to mount turris BTRFS partition from turris ?

Mounting BTRFS partitions on other HDD/SSD without problem on same system.

As this my post is probably going to be unanswered, I woud have to answer it myself as I found out the answer and I think it could be really useful knowledge for those of few power users of Turris.

Yesterday i finally tried manual migration (rollback to factory) of TOS5 that is based on newest Openwrt and kernel and newest kernel modules and realized that after migration I am able to finally mount BTRFS partition of SDCARD under debian buster properly ! Which is something that could be really handy in any case of accident that would need to follow data recovery from SD Card or it would also allow to do easier backup of certain BTRFS snapshosts which is easier than dd gz of whole sdcard.

What I think is the situation is that SD card BTRFS partition were created during migration from ubifs to btrfs by (now) obsolete version of linux kernel btrfs modules (under TO 3.?.8?) which was (likely) the cause why it was impossible to mount this btrfs partition on actual debian system.

I think that when I perform the migration the newest btrfs kernel driver somehow updated the old btrfs partition to fit to the most current version of btrfs and as result it is possible now to mount.

df

/dev/sde1 102182 4252 97930 5% /media/vojta/0F01-0B1B
/dev/sde2 62417920 24788652 35793780 41% /media/vojta/0f276d8f-aa1e-4011-bef7-3ea279374bf2

cd /media/vojta/0f276d8f-aa1e-4011-bef7-3ea279374bf2

drwxr-xr-x 1 root root 134 bře 10 18:34 .
drwxr-x—+ 4 root root 4096 bře 11 07:37 …
d??? ? ? ? ? ? @
drwxr-xr-x 1 root root 6 bře 10 18:59 certbackup
drwxr-xr-x 1 root root 134 bře 10 04:29 @factory
drwxr-xr-x 1 root root 154 úno 14 11:07 @1
-rw-r–r-- 1 root root 92 bře 10 17:38 1.info
drwxr-xr-x 1 root root 154 úno 14 11:07 @2
-rw-r–r-- 1 root root 94 bře 10 17:46 2.info
drwxr-xr-x 1 root root 154 úno 14 11:07 @3
-rw-r–r-- 1 root root 111 bře 10 17:51 3.info
drwxr-xr-x 1 root root 134 bře 10 04:29 @4
-rw-r–r-- 1 root root 91 bře 10 18:08 4.info
d??? ? ? ? ? ? @5
-rw-r–r-- 1 root root 93 bře 10 18:25 5.info
d??? ? ? ? ? ? @6
-rw-r–r-- 1 root root 89 bře 10 18:34 6.info

cat *.info

TYPE=“single”
DESCRIPTION=“BACKUP TOS 3.11.14 20200310”
CREATED=“2020-03-10 17:38:36 +0100”
TYPE=“single”
DESCRIPTION=“BACKUP TOS 3.11.14 20200310-2”
CREATED=“2020-03-10 17:46:57 +0100”
TYPE=“rollback”
DESCRIPTION=“Rollback to snapshot factory”
ROLL_TO=factory
CREATED=“2020-03-10 17:51:09 +0100”
TYPE=“pre”
DESCRIPTION=“Automatic pre-update snapshot”
CREATED=“2020-03-10 18:08:27 +0100”
TYPE=“post”
DESCRIPTION=“Automatic post-update snapshot”
CREATED=“2020-03-10 18:25:50 +0100”
TYPE=“single”
DESCRIPTION=“BACKUP TOS 4.0.5 2020310”
CREATED=“2020-03-10 18:34:22 +0100”