#chroot into existing BTRFS system for recovery

27 messages · Page 1 of 1 (latest)

sly bay
#

I have an existing system that entered a kernel panic while updating. Booting now always results in a kernel panic. I have previously fixed my installation by mounting my volumes from a live usb before rooting and making the fix (previously was an issue with eufi)

I am now in the situation where I am attempting to chroot from the live usb but am having difficulties. I don’t recall what I should mount where and when exactly. And of course I didn’t write this down last time

I’ve added screenshots for context. I’ve tried mounting my drive to /mnt, creating /mnt/boot, and then mounting my boot partition there. I believe what I’m missing is mounting the btrfs sub volumes but I wanted to ask here before moving forward in case anyone had some pointers

pearl pike
#

Whats in @home folder?

#

Ping when reply pls

pearl pike
#

okay, bro does not need help anymore lol

sly bay
#

@pearl pike I do still need help actually, and I appreciate it 🙂

@home is a btrfs sub volume of my home folder, and @ is a sub volumes of /

pearl pike
#

wait, do lsblk -f, it shouldnt work like that in theory

sly bay
#

Checking now

pearl pike
#

yk what, try to chroot into @

sly bay
#

I think I need to mount all my @… sub volumes

pearl pike
#

probably because of not mounted partitions

sly bay
#

Perhaps I also need to mount /boot? I do feel like a recall mounting boot and each @subvolume last time I had to fix my installation

pearl pike
#

Yes, if u want to do something with bootloader

sly bay
#

Alright, thank you for the help so far, it’s really appreciated. It’s early in the morning for me so I will have a proper look in a few hours and write back

pearl pike
#

Np, ill read about btrfs subvolumes

#

i got it

#

I GOT IT (i think)

sly bay
#

Oh yeah 🙌? Ive unfortunately ran out of time today and think I have to look tomorrow morning

sly bay
#

Alright I’m having a look now; found the following link https://fedoramagazine.org/os-chroot-101-covering-btrfs-subvolumes/

Thinking I need to do something like this:

′ ′ ′

mount /dev/vda2 /mnt/ -t btrfs -o subvol=root

ls /mnt/

bin dev home lib64 media opt root sbin sys usr
boot etc lib lost+found mnt proc run srv tmp var

ls /mnt/home/

<it's still empty>

mount /dev/vda2 /mnt/home -t btrfs -o subvol=home

ls /mnt/home/

user

mount /dev/vda1 /mnt/boot

mount --bind /dev /mnt/dev

mount -t proc /proc /mnt/proc

mount -t sysfs /sys /mnt/sys

mount -t tmpfs tmpfs /mnt/run

mkdir -p /mnt/run/systemd/resolve/

echo 'nameserver 1.1.1.1' > /mnt/run/systemd/resolve/stub-resolv.conf

chroot /mnt

′ ′ ′

this article shows how to use chroot to mount a Linux with btrfs subvolumes to be able to perform administration and debug on this OS from our Fedora Linux

sly bay
#

I tired the above and succefully Chroot but get the following error when trying to use paru

#

Similar message for ‘pacman —version’, just for /usr/lib/libcrypto.so.3’

sly bay
pearl pike
#

You can try to exit chroot and use pacstrap to install openssl package