Restoring from BTRFS SD card
|
10th Feb, 2019, 08:05 AM
Post: #1
|
|||
|
|||
Restoring from BTRFS SD card
So it seems my SD card had some failures, not entirely sure why. The result is that while XBIAN boots, neither internet nor USBs work, so I can't access it at all. I'd really like to save the /etc folder, as it has quite a lot of settings.
I've mounted the SD in my Ubuntu 18.10, and can copy most files. However, with quite a few important ones, I get an input-output error. I tried Code: btrfs restore -s -i -o /dev/mmcblk0p2 /home/nick/restored This restored several snapshots and with all files except those damaged (those files are length 0). Moreover, I get a repeated errors such as this on: Code: Error copying data for /home/nick/restored/root/@/var/lib/dpkg/alternatives/display-im6 Any idea whether this is related to the LZ4 compression, and whether I can restore these files somehow? Nick |
|||
13th Feb, 2019, 01:17 AM
Post: #2
|
|||
|
|||
RE: Restoring from BTRFS SD card
(10th Feb, 2019 08:05 AM)nickfx Wrote: Any idea whether this is related to the LZ4 compression, and whether I can restore these files somehow? First check if you have LZ4 compression enabled: Terminal grep -oE "compress-force=[^ ]*|compress*=[^ ]*" /boot/cmdline.txt If LZ4 enabled, you could try to use the internal rescue mode, which resides in initramfs. To enable this, add rescue to commandline (in file /boot/cmdline.txt), make sure that initramfs is enabled [1] (FORCEINITRAM=yes in /etc/default/xbian-initramfs) before rebooting [1] initramfs can be enabled via XBian-config GUI, category System |
|||
16th Feb, 2019, 07:47 AM
Post: #3
|
|||
|
|||
RE: Restoring from BTRFS SD card
Not sure this works. I was able to add 'rescue' to cmdline.txt on xbianroot partition. But /etc/default/xbian-initramfs is inaccessible.
I booted with the changed cmdline.txt but still cannot access anything: USB hubs and ethernet aren't working, hence wifi isn't working and I can't use a directly connected keyboard either. LZ4 compression was set to enabled, by the way. Ubuntu 18.10 apparently uses lz4 compression, too. Do you have any idea how I could access the files from my main computer (i.e. mounting the SD card)? |
|||
16th Feb, 2019, 08:27 AM
Post: #4
|
|||
|
|||
RE: Restoring from BTRFS SD card
(16th Feb, 2019 07:47 AM)nickfx Wrote: Not sure this works. I was able to add 'rescue' to cmdline.txt on xbianroot partition. But /etc/default/xbian-initramfs is inaccessible. If initramfs is enabled, system should enter rescue mode. And of course, no network connection is available per default. You have to start ethernet manually, described in this text which is displayed when rescue mode is entered Quote:LZ4 compression was set to enabled, by the way. I think you mean does not use lz4 compression Quote:Do you have any idea how I could access the files from my main computer (i.e. mounting the SD card)? If your kernel does not support btrfs lz4 compression, I don't see any way to access files from your computer You have only one choice: If you have spare sd-card, you could flash a new XBian image onto and boot from this card. After booting, put your old sd-card into an usb card reader, plug it to your Pi and mount that card from there |
|||
« Next Oldest | Next Newest »
|
Possibly Related Threads... | |||||
Thread: | Author | Replies | Views: | Last Post | |
[solved] How to mount an SD-Card with Xbian in BTRFS under Ubuntu 16.04? | duno | 6 | 13,000 |
5th Jul, 2016 06:51 AM Last Post: duno |
|
Restoring btrfs autosnap with ubuntu? | pix3l | 4 | 11,895 |
18th Aug, 2014 06:06 PM Last Post: pix3l |