Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3556

Troubleshooting • Re: Recovery tips for failed Raspberry Pi 5 SD card after routine update?

$
0
0
Thanks!

I'm not running a custom kernel. I'm also running the recommended firmware/eeprom.
So that is also my advice, use BTRFS for rootfs. It requires some tweaks here and there. You have to create the rootfs yourself and rsync roottree onto it. Forumuser @bls offers a script that can generate an image with rootfs as BTRFS, maybe have a look at that.
This is waaay above my pay grade. I use stock images for reliability because I want a reliable desktop
BTRFS is just standard kernel, standard firmware/eeprom. It is available in the stock images, but the images themselves are formatted Ext4 instead of BTRFS. It is indeed quite a hurdle to convert/change from Ext4 to BTRFS, but a lot less complicated since Bookworm.

Is btrfs still built as a module rather than a kernel built-in? Last box I setup with a btrfs root was running Bullseye so quite a bit of work to get a suitable initramfs put together though that should be easier on Bookworm as it uses an initramfs by default.
There are several (or many I should say) backup scripts for RaspberryPi, but all do only copy/create from Ext4 to Ext4. From Ext4 to BTRFS would be fairly easy to add by authors, but it doesn't happen.
It is a pity I would say as there is also a good opensource BTRFS driver for Windows, which means that it enables people to read the whole SD-card also in Windows, not just the first FAT partition.

Any chance of a link? Last time I looked I couldn't find anything. But that might be just my search skills failing.

FWIW, with a bit of faffing it is possible to read pretty much any* Linux filesystem on a windows box but not using the "normal" windows methods and tools.

It goes something like this:
  1. Install wsl2
  2. Install you chosen linux distro on that (Debian is likely best because it's the closest you'll find to RPiOS)
  3. Connect the drive.
  4. In an admin powershell/terminal:
    1. Find the "real" ID of the drive (the windows equivalent to /dev/sd?):

      Code:

      GET-CimInstance -query "SELECT * from Win32_DiskDrive"
    2. Mount it in wsl as a bare drive:

      Code:

      wsl --mount \\.\PHYSICALDRIVE8 --bare
      Obviously, use the drive ID you found in teh last step
  5. Open your wsl2 instance
  6. mount as use as normal for linux
  7. unmount when finished
  8. Back in windows terminal/powershell:

    Code:

    wsl --unmount

There is one major limitation with the above: you can't access the drive/partitions in windows explorere via \\wsl.localhost\[...] as tha won't cross mount points. You can access it from the wsl2 side and copy to to/from /mnt/[a-z]. Or, I guess, run a Samba or (s)ftp server on the wsl2 side.

*: I say that, and my reading suggests this to be the case but I've only tested with btrfs and ext4.

Statistics: Posted by thagrol — Mon Oct 14, 2024 12:22 am



Viewing all articles
Browse latest Browse all 3556

Trending Articles