Today for some reason my laptop start in read only mode, when I try to restore a btfrs partition, it try to start but only a yellow screen appear and when I re try to run the last snapshot then emergency mode start

Ok, before we do anything with the broken drive or filesystem itself, we’ll try to make an image of it. Do you have another drive at hand? Then make the image.

1 Like

ok thanks, i stop gpart when i see your first suggestion.

yes i have another ssd m2 installed on my lap, is empty/clean not encrypted

Is there a filesystem on it?

yes, btfrs the same space of the damaged one

Make the image file then and save it on it to save your data. You need more storage space afterwards for the rescued files. Got any?

yes in another ssd to USB,

sudo dd if=/dev/mapper/systemroot of=/your/path/to/another/storage/device/btrfsimage bs=1M

When done, mount the image to rescue/save/back up the data, for instance your >10gb files:
sudo mount -o ro,rescue=nologreplay /your/path/to/another/storage/device/btrfsimage /run/media/manjaro/btrfsimagemounted

this commands will help for the image creation and backup?

The image is a big file where all the individual files of the partition are in.
The first command makes the image.
The second one mounts it with some safety mount options ( ro,rescue=nologreplay).
Once mounted you are hopefully able to see the files.
Then you can copy them to your USB drive.

1 Like

ok thanks, im making the image right now… i think will take some time

I do:

sudo dd if=/dev/mapper/systemroot of=/dev/nvme1n1 bs=1M                                                                                                                      
906090+1 records in
906090+1 records out

then

sudo mount -o ro,rescue=nologreplay /dev/nvme1n1 /run/media/manjaro/backo    

the backo is the label of the nvme1n1 (the other clean installed ssd) but give me:

 mount: /run/media/manjaro/backo: mount(2) system call failed: File exists.
dmesg(1) may have more information after failed mount system call.

Ok … is there a file in /dev called nvme1n1 now? And if so, how big is it? What live system are you using, what desktop?

dev/nvme1n1 is empty, im using manjaro live kde

this is my lblk output:

lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 67.8M 1 loop /run/miso/sfs/livefs
loop1 7:1 0 1.1G 1 loop /run/miso/sfs/mhwdfs
loop2 7:2 0 1.7G 1 loop /run/miso/sfs/desktopfs
loop3 7:3 0 653.7M 1 loop /run/miso/sfs/rootfs
sda 8:0 1 0B 0 disk
sdb 8:16 1 29.3G 0 disk /run/miso/bootmnt
├─sdb1 8:17 1 3.6G 0 part
└─sdb2 8:18 1 4M 0 part
nvme0n1 259:0 0 953.9G 0 disk
├─nvme0n1p1 259:1 0 300M 0 part
├─nvme0n1p2 259:2 0 884.9G 0 part
│ └─systemroot 254:0 0 884.9G 0 crypt /run/media/manjaro/261045lsblk94-05bf-4666-9597-41ce148cfe64
└─nvme0n1p3 259:3 0 68.7G 0 part
nvme1n1 259:4 0 953.9G 0 disk
└─nvme1n1p1 259:6 0 953.9G 0 part


is the dd command, used succesfully?

ok i see now, i can recover my important files!!!

I am happy to hear you could rescue your files.

Thank you, I was no longer able to send you the outputs of the commands you mentioned, as I had a bit of an urgency to continue working, I recovered my files and reinstalled Manjaro, could you recommend me some content to read and understand a little more?

I recently had similar issues, thankfully I got helped. I also recovered files from the image so I could help you. Afterwards I was able to fix my btrfs on an m2 ssd.

Maybe learn the difference between the /dev and (on Manjaro) /run/media (< mounted drives) folders.

Maybe check out these widgets : Advanced Radio Player - KDE Store
Simple System Monitor - KDE Store

And here on btrfs: Introduction — BTRFS documentation it has all the manuals for the command line progs.
But I would always seek help on the chat https://web.libera.chat/ #btrfs before messing with problems.

Your system must have hit an error booting and when into “protect the system” mode. Try booting into rescue mode and open to a command line. At the command line type:

sudo mount -o remount,rw /

You may need to add your drive to the command.

Good luck.

excellent!!, thanks a lot for share

You can find good Information about Btrfs in the wiki

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.