Full Version: Mounting of Backup Image-File not possible
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

i've destroyed my root file system on my xbian and want just to rollback to my last snapshot,
so i cannot access and i dont know the name of it anymore (@ and @last_good_known arealso destroyed)

ive just tried to access my sd card, so its not possible to mount the btrfs filesystem it says:


btrfs: disk space caching is enabled
BTRFS: couldn't mount because of unsupported optional features (10).
btrfs: open_ctree failed

so its maybe a unpatched kernel problem or somting else?

anyways.. now i've tried to mount it on a xbian system as an *.img File and got this errors:


# Mounted an extern USB HDD with the xbian image on my flesh xbian installattion
root@xbian:~# modprobe loop
root@xbian:~# ./ /media/usbextern/xbianbackup.img
/media/usbextern/xbianbackup.img1 2048 71679 69632 34M b W95 FAT32
/media/usbextern/xbianbackup.img2 141312 15257599 15116288 7.2G 83 Linux
/media/usbextern/xbianbackup.img3 15257600 15759359 501760 245M 82 Linux swap / Solaris

root@xbian:~# mount -v -t btrfs -o loop,ro,offset=72351744 /media/usbextern/xbianbackup.img /mnt
mount: /dev/loop1 is already mounted or /mnt busy

root@xbian:~# mount -v -t auto -o loop,ro,offset=72351744 /media/usbextern/xbianbackup.img /
mount: /dev/loop1 is already mounted or / busy
/dev/loop1 is already mounted on /
/dev/loop1 is already mounted on /home
/dev/loop1 is already mounted on /lib/modules
/dev/loop1 is already mounted on /xbmc-backup

at this point i have no idea to get this work here. so im happy for any help. thanks!

I would suggest using kpartx for this.
when im using kpartx its maps my image file on /dev/mapping/loopXY. its all fine at this point

so when im mounting the mapped loop device its curiously mount the wrong filesystem.. im not see my "Old SD Xbian Image" but rather see the new one where are snapshots of today/yesterday. its very strange for me. im want see some snapshots of Sep 15th or something else in the past.
You should mount using the correct subvol option:
Where the @ points to the snapshot you want to mount. You can also boot XBian to a previous snapshot.
so the problem is here my root/@ and root/@last_good_known snapshots seens to be destroyed.

i want to find another snapshot on my old xbianimage file, like root/@btrfs-auto-snap_daily-2014-06-04-1905 for example.

the actually situation in my oldxbianimage:
root/@btrfs-auto-snap_daily-2015-09-15-19?? - FINE
root/@last_good_known - ALSO DESTROYED OR ANYTHING ELSE

So i want to boot with my cmdline.txt the "root/@btrfs-auto-snap_daily-2015-09-15-1905" but this is just an example. i dont know the correct name of the snapshot Sad

PS: im also just trying to add on cmdline.txt rescue oder rescue_early , but no success. my raspberry is catched in a reboot loop
Then there is a high chance that your sd card or image is too corrupt.
hm, thats sounds not so good, but is there no way maybe to mount it with a ubuntu-special-btrfs-patched livecd with proper kernel?

but im really sure that the image cannot be currupt, maybe there is someting wrong with the loop-mouting? (see the strange "busy"-messages in my first posting)
i have another idea for the problem..

my sd card where i have the new xbian intalled has a size of 8GB and my old xbian image which i want to boot is even 7~8 GB

so its maybe not possible to mount an loop device, because there isnt enough free space available and i have to use a bigger sd card?
mounting a loop device doesn't use space. That space is already allocated in the image file itself.
ok.. so there is anothhner way maybe to patch an normal kernel from source with a kernelpatch?
i've seen this one here in this forum:

but it would be amazing if someone has a small howto, to install this kernel patch? (it's also seems that the link is down?)
okay. i've just found a simple solution for my problem to find my old btrfs snaps names (avoid the mounting of fs).
just using the "strings" command and grepping the last lines of binary image. here i want to share the code:

strings <image/devicefile> | grep -A 1 -B 2 -si btrfs-auto-snap_ | tail -n 50

PS: it would be still amazing if there was a possibility to run a "xbian lz4-patch" on an desktop-linux kernel, but i couldnt found the right one here. Huh
Reference URL's