Upgrade to 15.3 fine, but root partition full

Hi!

I’ve just upgraded to 15.3 and after a lot of upgrading failures due to root partition getting full, the upgrade finally was succesful. But, the following reboot got be to the menu of chosing suse version, and the following boot just got me to the console


Entering emergency mode. Exit the shell to continue.
Type "journalctl"...want to save "/run/initramfs/rdsosreport.txt...
Press Enter for maintenance
(or press Control-D to continue):

So, rebooting with knoppix and mounting the partitions, shows me the root is once again full. Seems like the upgrade is fine - os-release


NAME="openSUSE Leap"
VERSION="15.3"
...

I’m pretty sure I’ve tried everything there is to try, including

https://en.opensuse.org/SDB:BTRFS

My last idea was to decrease my home partition and then increase the root, but to my utter dismay I got painfully aware of the fact that my home is xfs, which can not be decreased. So, now I’m totally out of ideas, until I saw this thread

https://forums.opensuse.org/showthread.php/549443-Root-Partition-Full-and-out-of-ideas

Is this the only solution that will work? If I understand the solution correctly

*1. boot with knoppix
2. mount the root partition
***3. mount a USB stick with a btrfs partitioned file system
4. spread its data to include the new space
5. check the progress of 4.
6. reboot

**Hopefully I can do some cleaning when I can boot properly into the os?
But how do I then get rid of the USB, later on?
I do not get the quite huge diff between df and du, though.


knoppix@Microknoppix:~$ sudo btrfs subvolume list /mnt/mlroot
ID 257 gen 17693 top level 5 path @
ID 258 gen 358825923 top level 257 path @/.snapshots
ID 259 gen 358826178 top level 258 path @/.snapshots/1/snapshot
ID 260 gen 358820892 top level 257 path @/opt
ID 261 gen 358823391 top level 257 path @/srv
ID 262 gen 358825939 top level 257 path @/tmp
ID 263 gen 358821445 top level 257 path @/usr/local
ID 264 gen 358825890 top level 257 path @/var/crash
ID 265 gen 358825890 top level 257 path @/var/lib/libvirt/images
ID 266 gen 358825890 top level 257 path @/var/lib/mailman
ID 267 gen 358825890 top level 257 path @/var/lib/mariadb
ID 268 gen 358825890 top level 257 path @/var/lib/mysql
ID 269 gen 358825890 top level 257 path @/var/lib/named
ID 270 gen 358825890 top level 257 path @/var/lib/pgsql
ID 271 gen 358825939 top level 257 path @/var/log
ID 272 gen 358825890 top level 257 path @/var/opt
ID 273 gen 358825935 top level 257 path @/var/spool
ID 274 gen 358825939 top level 257 path @/var/tmp
ID 477 gen 358825892 top level 257 path @/var/lib/machines
ID 701 gen 358182513 top level 258 path @/.snapshots/327/snapshot
ID 1812 gen 358427103 top level 258 path @/.snapshots/368/snapshot
ID 2213 gen 358821988 top level 258 path @/.snapshots/702/snapshot
ID 2214 gen 358822003 top level 258 path @/.snapshots/703/snapshot
ID 2215 gen 358823162 top level 258 path @/.snapshots/704/snapshot
ID 2216 gen 358823992 top level 258 path @/.snapshots/705/snapshot
ID 2217 gen 358824152 top level 258 path @/.snapshots/706/snapshot
ID 2218 gen 358824215 top level 258 path @/.snapshots/707/snapshot
ID 2219 gen 358825703 top level 258 path @/.snapshots/708/snapshot
ID 2220 gen 358825707 top level 258 path @/.snapshots/709/snapshot
ID 2221 gen 358825849 top level 258 path @/.snapshots/710/snapshot
ID 2223 gen 358825911 top level 258 path @/.snapshots/712/snapshot
ID 2224 gen 358825914 top level 258 path @/.snapshots/713/snapshot
ID 2225 gen 358825919 top level 258 path @/.snapshots/714/snapshot
ID 2226 gen 358825922 top level 258 path @/.snapshots/715/snapshot

knoppix@Microknoppix:/mnt$ lsblk -f
NAME              FSTYPE      FSVER    LABEL     UUID                                   FSAVAIL FSUSE% MOUNTPOINT
sda                                                                                                    
├─sda1            vfat        FAT16              C692-5146                                             
├─sda2            vfat        FAT16              C698-154F                                             
├─sda3            btrfs                          3108ecde-f6d6-4762-b060-31702758b087                  
└─sda4            crypto_LUKS 1                  a9152bd7-7626-4815-827f-b5800bf04220                  
  └─sda4_crypt    LVM2_member LVM2 001           vm2hbF-69ii-TGky-EXiD-Y30T-6o5S-LnQYra                
    ├─system-home xfs                            17bd013b-f79c-4c1f-940d-7e8ad440b3a2                  
    ├─system-root btrfs                          5a9113c5-293c-4c62-b02a-4d7922d1cbc2                  
    └─system-swap swap        1                  ab896a01-ebfe-494c-b20b-ecba8d64fe55                  
sdb                                                                                                    
└─sdb1            vfat        FAT32    KNOPPIX_9 3A95-D1A2                                 3.2G    57% /mnt-system
cloop0                                                                                        0   100% /KNOPPIX
cloop1                                                                                        0   100% /KNOPPIX1
zram0                                                                                                  [SWAP]



knoppix@Microknoppix:~$ sudo du -sm /mnt/mlroot/
13087   /mnt/mlroot/

knoppix@Microknoppix:~$ df
Filesystem               1K-blocks      Used  Available Use% Mounted on
rootfs                     8136832        56    8136776   1% /
/dev/sdb1                  7969792   4562104    3407688  58% /mnt-system
tmpfs                     13021184    175512   12845672   2% /ramdisk
/dev/cloop                 1914264   1914264          0 100% /KNOPPIX
/dev/cloop1               10092658  10092658          0 100% /KNOPPIX1
unionfs                   13021184    175512   12845672   2% /UNIONFS
tmpfs                        20480      3728      16752  19% /run
tmpfs                        10240         4      10236   1% /UNIONFS/var/lock
tmpfs                       102400        84     102316   1% /UNIONFS/var/log
tmpfs                      2097152     16828    2080324   1% /tmp
cgroup                          12         0         12   0% /sys/fs/cgroup
udev                       8136844         0    8136844   0% /dev
tmpfs                      2097152    212868    1884284  11% /dev/shm
/dev/mapper/system-home  104806400 102820224    1986176  99% /mnt/mlhome
/dev/mapper/system-root   41943040  41740040      27096 100% /mnt/mlroot

knoppix@Microknoppix:~$ btrfs filesystem df /mnt/mlroot
Data, single: total=37.37GiB, used=37.35GiB
System, DUP: total=32.00MiB, used=16.00KiB
Metadata, DUP: total=1.28GiB, used=1.18GiB
GlobalReserve, single: total=106.44MiB, used=0.00B
knoppix@Microknoppix:~$ btrfs filesystem show
Label: none  uuid: 3108ecde-f6d6-4762-b060-31702758b087
        Total devices 1 FS bytes used 313.49MiB
        devid    1 size 408.00MiB used 408.00MiB path /dev/sda3


Label: none  uuid: 5a9113c5-293c-4c62-b02a-4d7922d1cbc2
        Total devices 1 FS bytes used 38.52GiB
        devid    1 size 40.00GiB used 40.00GiB path /dev/mapper/system-root

knoppix@Microknoppix:~$ sudo btrfs fi balance start /mnt/mlroot -dusage=5
Done, had to relocate 0 out of 56 chunks

knoppix@Microknoppix:/mnt$ sudo btrfs check /dev/mapper/system-root
Opening filesystem to check...
Checking filesystem on /dev/mapper/system-root
UUID: 5a9113c5-293c-4c62-b02a-4d7922d1cbc2
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 41366249472 bytes used, no error found
total csum bytes: 39117096
total tree bytes: 1263943680
total fs tree bytes: 1152221184
total extent tree bytes: 60784640
btree space waste bytes: 209058387
file data blocks allocated: 233632456704
 referenced 54615527424

knoppix@Microknoppix:/mnt$ sudo btrfs filesystem usage -T /mnt/mlroot/
Overall:
    Device size:                  40.00GiB
    Device allocated:             40.00GiB
    Device unallocated:            1.00MiB
    Device missing:                  0.00B
    Used:                         39.70GiB
    Free (estimated):             32.84MiB      (min: 32.84MiB)
    Free (statfs, df):            32.84MiB
    Data ratio:                       1.00
    Metadata ratio:                   2.00
    Global reserve:              106.44MiB      (used: 0.00B)
    Multiple profiles:                  no


                           Data     Metadata System              
Id Path                    single   DUP      DUP      Unallocated
-- ----------------------- -------- -------- -------- -----------
 1 /dev/mapper/system-root 37.37GiB  2.56GiB 64.00MiB     1.00MiB
-- ----------------------- -------- -------- -------- -----------
   Total                   37.37GiB  1.28GiB 32.00MiB     1.00MiB
   Used                    37.34GiB  1.18GiB 16.00KiB            


Cheers
Peter

You do not get this error when root is full. Provide rdsosreport.txt as advised.

The above applies only when out of unallocated space. You are out of free space too. Get free space first.

Yes, but that’s exactly the problem. I’ve cleaned the root partition quite heavily, /var/log, /tmp etc. Even deleted /usr/share/doc and linked to /home, but now I’m at a dead end with regads to cleaning root.

Yes, here it is.

Maybe also useful info but when i press Ctrl+D, after I pressed enter to get into maintenance, I get info about


   464.837572] dracut-initqueue[579]: WARNING: Not all disks have been found.
   464.837735] dracut-initqueue[579]: WARNING: You might want to regenerate your initramfs.

Unfortunately I may “not post attachments” and the log is 1342 lines so I’m pasting the last bit, which maybe is not enough?


   12.091497] localhost kernel: usb 1-4.3: Manufacturer: Razer
   12.101613] localhost kernel: input: Razer Razer DeathAdder V2 as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.3/1-4.3:1.0/0003:1532:0084.0003/input/input16
   12.101829] localhost kernel: hid-generic 0003:1532:0084.0003: input,hidraw2: USB HID v1.00 Mouse [Razer Razer DeathAdder V2] on usb-0000:00:14.0-4.3/input0
   12.102754] localhost kernel: input: Razer Razer DeathAdder V2 Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.3/1-4.3:1.1/0003:1532:0084.0004/input/input17
   12.146386] localhost kernel: raid6: sse2x4   xor()  8534 MB/s
   12.162516] localhost kernel: input: Razer Razer DeathAdder V2 Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.3/1-4.3:1.1/0003:1532:0084.0004/input/input18
   12.162579] localhost kernel: input: Razer Razer DeathAdder V2 System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.3/1-4.3:1.1/0003:1532:0084.0004/input/input19
   12.162629] localhost kernel: input: Razer Razer DeathAdder V2 as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.3/1-4.3:1.1/0003:1532:0084.0004/input/input20
   12.162681] localhost kernel: hid-generic 0003:1532:0084.0004: input,hidraw3: USB HID v1.00 Keyboard [Razer Razer DeathAdder V2] on usb-0000:00:14.0-4.3/input1
   12.163252] localhost kernel: input: Razer Razer DeathAdder V2 as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.3/1-4.3:1.2/0003:1532:0084.0005/input/input21
   12.214385] localhost kernel: raid6: sse2x2   gen() 15259 MB/s
   12.222520] localhost kernel: hid-generic 0003:1532:0084.0005: input,hidraw4: USB HID v1.00 Keyboard [Razer Razer DeathAdder V2] on usb-0000:00:14.0-4.3/input2
   12.223467] localhost kernel: hid-generic 0003:1532:0084.0006: hiddev96,hidraw5: USB HID v1.11 Device [Razer Razer DeathAdder V2] on usb-0000:00:14.0-4.3/input3
   12.282386] localhost kernel: raid6: sse2x2   xor()  8731 MB/s
   12.350384] localhost kernel: raid6: sse2x1   gen() 12455 MB/s
   12.418384] localhost kernel: raid6: sse2x1   xor()  6288 MB/s
   12.418385] localhost kernel: raid6: using algorithm avx2x2 gen() 36244 MB/s
   12.418386] localhost kernel: raid6: .... xor() 22267 MB/s, rmw enabled
   12.418386] localhost kernel: raid6: using avx2x2 recovery algorithm
   12.420140] localhost kernel: xor: automatically using best checksumming function   avx       
   12.513318] localhost kernel: Btrfs loaded, crc32c=crc32c-intel, assert=on
   12.516512] localhost kernel: BTRFS: device fsid 3108ecde-f6d6-4762-b060-31702758b087 devid 1 transid 815 /dev/dm-3
  151.848683] localhost dracut-initqueue[597]: Warning: dracut-initqueue timeout - starting timeout scripts
  152.436728] localhost dracut-initqueue[597]: Warning: dracut-initqueue timeout - starting timeout scripts

...lot of lines with the same type of message

  220.571813] localhost dracut-initqueue[597]: Warning: dracut-initqueue timeout - starting timeout scripts
  220.572523] localhost dracut-initqueue[597]: Warning: Could not boot.
  220.619487] localhost systemd[1]: Starting Dracut Emergency Shell...
  220.653721] localhost systemd[1]: Received SIGRTMIN+21 from PID 500 (plymouthd).
  223.769719] localhost systemd[1]: Received SIGRTMIN+21 from PID 500 (plymouthd).
  223.785285] localhost systemd[1]: plymouth-start.service: Succeeded.

Enable quota and show what you have. Substitute your path for /. Wait until rescan completed.

**erlangen:~ #** btrfs quota enable / 
**erlangen:~ #** btrfs quota rescan /  
quota rescan started 
**erlangen:~ #** btrfs qgroup show /  
WARNING: rescan is running, qgroup data may be incorrect 
qgroupid         rfer         excl  
--------         ----         ----  
0/5          16.00KiB     16.00KiB  
0/256        16.00KiB     16.00KiB  
0/257         2.14GiB      2.14GiB  
0/258        80.00KiB     80.00KiB  
0/259         1.99MiB      1.99MiB  
0/260        66.86MiB     66.86MiB  
0/261       569.35MiB    569.35MiB  
0/262       370.27GiB    370.27GiB  
0/263         4.04MiB      4.04MiB  
0/264        16.00KiB     16.00KiB  
0/265         1.58MiB      1.58MiB  
0/266        12.56GiB     68.69MiB  
0/808        12.41GiB      1.30GiB  
0/809        12.50GiB    144.96MiB  
0/856        12.28GiB     44.26MiB  
0/857        12.28GiB     39.80MiB  
0/870        12.25GiB      8.55MiB  
0/871        12.59GiB    104.05MiB  
0/872        12.50GiB      1.03MiB  
0/873        12.27GiB     24.53MiB  
0/989        12.43GiB    413.91MiB  
0/990        12.37GiB      6.61MiB  
0/991        12.37GiB      3.33MiB  
0/992        12.44GiB    640.00KiB  
0/993        12.44GiB    224.00KiB  
0/994        12.47GiB    112.00KiB  
0/995        12.47GiB    112.00KiB  
0/996        12.51GiB    288.00KiB  
0/997        12.51GiB    272.00KiB  
0/998        12.38GiB    144.00KiB  
0/999        12.38GiB    144.00KiB  
0/1000       12.51GiB     16.00KiB  
0/1001       12.51GiB     16.00KiB  
0/1002       12.51GiB    352.00KiB  
0/1005       12.51GiB      4.00MiB  
0/1006       12.38GiB      4.23MiB  
0/1007       12.38GiB     10.28MiB  
0/1008       12.33GiB      3.89MiB  
0/1009       12.33GiB      2.31MiB  
0/1010       12.56GiB      5.45MiB  
**erlangen:~ #**

Unfortunately I get stuck at the enable


knoppix@Microknoppix:/mnt$ sudo btrfs quota enable /mnt/mlroot
ERROR: quota command failed: No space left on device

Start here: https://forums.opensuse.org/showthread.php/549443-Root-Partition-Full-and-out-of-ideas?p=2999379#post2999379

Upload to https://susepaste.org/

Ok, I tried balance before but it didn’t work


knoppix@Microknoppix:/mnt$ sudo btrfs balance start -dusage=66 /mnt/mlroot
Done, had to relocate 0 out of 56 chunks

And, just to make sure I understand, then the last resort is to add an USB, rebalance, remove the USB and balance again?


sudo btrfs device add -f /dev/sda /mnt/mlroot
sudo btrfs balance start -dusage=1 /mnt/mlroot
sudo btrfs device remove /dev/sda /mnt/mlroot
sudo btrfs balance start -dusage=66 /mnt/mlroot

ofc :slight_smile:

here it is.

The problem here is not filesystem out of space. Initrd does not attempt to decrypt root partition (I assume you installed on LVM on encrypted partition based on the previous information). It is impossible to say why. Regenerating initrd may help, but this also needs space.

Are you able to boot using one of older kernels (advanced menu item in grub)?

Really?

knoppix@Microknoppix:~$ sudo du -sm /mnt/mlroot/
13087   /mnt/mlroot/

knoppix@Microknoppix:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on

/dev/mapper/system-home 104806400 102820224 1986176 99% /mnt/mlhome
/dev/mapper/system-root 41943040 41740040 27096 100% /mnt/mlroot

du shows 13GB while df shows 40GB. So your root subvolume consumes 13GB out of 40GB. The rest is in other subvolumes. You need to check space consumed in other mount points except /.snapshots. There is small chance that you have a lot of logs or huge core files or VM images somewehre in /var. But I suspect that space is tied in older snapshots, so if checking other subvolumes does not show anything obvious, deleting snapshots is the only option.

knoppix@Microknoppix:/mnt$ sudo btrfs filesystem usage -T /mnt/mlroot/
Overall:
Device size: 40.00GiB
Device allocated: 40.00GiB
Device unallocated: 1.00MiB
Device missing: 0.00B
Used: 39.70GiB
Free (estimated): 32.84MiB (min: 32.84MiB)
Free (statfs, df): 32.84MiB
Data ratio: 1.00
Metadata ratio: 2.00
Global reserve: 106.44MiB (used: 0.00B)
Multiple profiles: no

                       Data     Metadata System              

Id Path single DUP DUP Unallocated


1 /dev/mapper/system-root 37.37GiB 2.56GiB 64.00MiB 1.00MiB


Total 37.37GiB 1.28GiB 32.00MiB 1.00MiB
Used 37.34GiB 1.18GiB 16.00KiB

You may be able to delete snapshots (deleting something on btrfs needs additional space temporary, but you have some slack in metadata).

mount -o subvol=@/.snapshots /dev/mapper/system-root /mnt/mlroot/.snapshots
btrfs subvolume delete /mnt/mlroot/.snapshots/327/snapshot
btrfs subvolume delete /mnt/mlroot/.snapshots/368/snapshot
...

Check after each deletion how much space you recovered. Keep in mind that subvolume is not deleted instantaneously, you may use “btrfs subvolume sync /mnt/mlroot” to wait until subvolume is completely removed and its space is recovered after deletion.

Some progress, at least regarding freeing up space, but no luck in booting.

Yes it’s LVM on encrypted partition.

Are you able to boot using one of older kernels (advanced menu item in grub)?

Nope. I booted in Advanced Options for OpenSUSE and none of the three alternatives worked


openSUSE Leap 15.3, with Linux 5.3.18-59.10-default
openSUSE Leap 15.3, with Linux 5.3.18-lp152.106-default
openSUSE Leap 15.3, with Linux 5.3.18-lp152.102-default

You may be able to delete snapshots (deleting something on btrfs needs additional space temporary, but you have some slack in metadata).

Yes, that worked great. Got some more space removing a snapshot.


knoppix@Microknoppix:~$ sudo btrfs subvolume delete /mnt/mlroot/.snapshots/327/snapshot
Delete subvolume (no-commit): '/mnt/mlroot/.snapshots/327/snapshot'
knoppix@Microknoppix:~$ sudo btrfs filesystem usage -T /mnt/mlroot/
Overall:
    Device size:          40.00GiB
    Device allocated:          39.87GiB
    Device unallocated:         129.00MiB
    Device missing:             0.00B
    Used:              29.76GiB
    Free (estimated):           9.45GiB    (min: 9.39GiB)
    Free (statfs, df):           9.45GiB
    Data ratio:                  1.00
    Metadata ratio:              2.00
    Global reserve:          85.91MiB    (used: 0.00B)
    Multiple profiles:                no


                           Data     Metadata  System              
Id Path                    single   DUP       DUP      Unallocated
-- ----------------------- -------- --------- -------- -----------
 1 /dev/mapper/system-root 37.25GiB   2.56GiB 64.00MiB   129.00MiB
-- ----------------------- -------- --------- -------- -----------
   Total                   37.25GiB   1.28GiB 32.00MiB   129.00MiB
   Used                    27.92GiB 937.73MiB 16.00KiB            

Did you remove all snapshots? Because I am afraid all initrd’s have been regenerated during upgrade, so all of them are now wrong. You may try kernel+initrd from one of the older snapshots before upgrade it you still have them (you can actually try to simply boot into one of them).

Nope, I just removed one. I was quite happy that there was additional free space, so I just let the rest of the snapshots remain and tried a reboot.

Since I freed up space, I’m going for the option to regenerate initrd, which I guess should simply be done with dracut -f, but I’m having problems mounting my partitions following e.g. [SOLVED] kernel panic Failed to execute /init no working init found after update, encrypted luks lvm](https://forums.opensuse.org/showthread.php/547270-SOLVED-kernel-panic-Failed-to-execute-init-no-working-init-found-after-update-encrypted-luks-lvm?highlight=regenerate+initrd)
It’s the step when mounting boot that fails


knoppix@Microknoppix:/mnt$ ll
total 0
knoppix@Microknoppix:/mnt$ mount /dev/sda4 /mnt/boot/
mount: /mnt/boot: unknown filesystem type 'crypto_LUKS'.

I’ve decrypted the hdd and mounted root


knoppix@Microknoppix:/mnt$ vgscan -v
  Found volume group "system" using metadata type lvm2
knoppix@Microknoppix:/mnt$ lvscan -v
  ACTIVE            '/dev/system/home' [100.00 GiB] inherit
  ACTIVE            '/dev/system/root' [40.00 GiB] inherit
  ACTIVE            '/dev/system/swap' [2.00 GiB] inherit
knoppix@Microknoppix:/mnt$ ls /dev/system/
home  root  swap
knoppix@Microknoppix:/mnt$ mount /dev/system/root /mnt
knoppix@Microknoppix:/mnt$ lsblk -io NAME,TYPE,SIZE,FSTYPE,UUID,MOUNTPOINT
NAME         TYPE    SIZE FSTYPE   UUID                                   MOUNTPOINT
sda          disk  476.9G                                                 
|-sda1       part    156M vfat     C692-5146                              
|-sda2       part    157M vfat     C698-154F                              
|-sda3       part    408M btrfs    3108ecde-f6d6-4762-b060-31702758b087   
`-sda4       part  476.2G crypto_L a9152bd7-7626-4815-827f-b5800bf04220   
  `-crypt-ml crypt 476.2G LVM2_mem vm2hbF-69ii-TGky-EXiD-Y30T-6o5S-LnQYra 
    |-system-home
    |        lvm     100G xfs      17bd013b-f79c-4c1f-940d-7e8ad440b3a2   
    |-system-root
    |        lvm      40G btrfs    5a9113c5-293c-4c62-b02a-4d7922d1cbc2   /mnt
    `-system-swap
             lvm       2G swap     ab896a01-ebfe-494c-b20b-ecba8d64fe55   
sdb          disk    7.6G                                                 
`-sdb1       part    7.6G vfat     3A95-D1A2                              /mnt-system
cloop0       disk    1.8G                                                 /KNOPPIX
cloop1       disk    9.6G                                                 /KNOPPIX1
zram0        disk      4G                                                 [SWAP]

What obvious piece am I missing here?

So then the plan is to just


mount --bind /proc/ /mnt/proc/
mount --bind /dev/ /mnt/dev/
mount --bind /sys/ /mnt/sys/
chroot /mnt/
dracut -f
umount all partitions
reboot

“dracut -f” attempts to build initrd for the currently booted kernel. You are booted with Knoppix, so this kernel version does not exist in openSUSE (and would have been wrong anyway). You either need to tell dracut to use explicit kernel version or rebuild all initrds using mkinitrd (openSUSE wrapper around dracut)/“dracut --regenerate-all”.

To be on safe side I would additionally do

mount -a -t btrfs
mount /boot/efi

inside chroot. You may skip /boot/efi if you are not using UEFI boot (but you have VFAT partitions which is strong indication that you are).

Also to make further troubleshooting easier make sure to capture full dracut output, e.g.

script
mkinitrd
exit

and full output is in file typescript in current directory.

Ok great clarification, and just to be sure I don’t miss anything.

I dont’t have to mount boot, which is giving me error?


knoppix@Microknoppix:/mnt$ mount /dev/sda4 /mnt/boot/
mount: /mnt/boot: unknown filesystem type 'crypto_LUKS'.

So I basically just do


mount --bind /proc/ /mnt/proc/
mount --bind /dev/ /mnt/dev/
mount --bind /sys/ /mnt/sys/
chroot /mnt/

mount -a -t btrfs
mount /boot/efi

script
mkinitrd
exit

umount all above partitions
reboot

Think I realized the problem with mounting boot. I’m obviously mounting the wrong partition (/dev/sda4, which is the encrypted hdd) to boot.

Should be sda1?

Device       Start        End   Sectors   Size Type
/dev/sda1     2048     321535    319488   156M EFI System
/dev/sda2   321536     643071    321536   157M Microsoft basic data
/dev/sda3   643072    1478655    835584   408M Microsoft basic data
/dev/sda4  1478656 1000214527 998735872 476.2G Linux LVM

Anyways, it then shows


knoppix@Microknoppix:~$ mount /dev/sda1 /mnt/boot/
knoppix@Microknoppix:~$ ls -R /mnt/boot/
/mnt/boot/:
EFI


/mnt/boot/EFI:
boot  opensuse


/mnt/boot/EFI/boot:
bootx64.efi  fallback.efi  MokManager.efi


/mnt/boot/EFI/opensuse:
boot.csv  grub.cfg  grub.efi  grubx64.efi  MokManager.efi  shim.efi

Does this look ok?

Since it shows EFI, I guess the mentioned part


mount /boot/efi

is necessary.

Or maybe it’s sda3


knoppix@Microknoppix:~$ cat /mnt/boot/EFI/opensuse/grub.cfg 
set btrfs_relative_path="yes"
search --fs-uuid --set=root **3108ecde-f6d6-4762-b060-31702758b087**
set prefix=(${root})/grub2
source "${prefix}/grub.cfg"
knoppix@Microknoppix:~$ lsblk -io NAME,TYPE,SIZE,FSTYPE,UUID,MOUNTPOINT
NAME       TYPE    SIZE FSTYPE UUID                                   MOUNTPOINT
sda        disk  476.9G                                               
|-sda1     part    156M vfat   C692-5146                              /mnt/boot
|-sda2     part    157M vfat   C698-154F                              
**|-sda3     part    408M btrfs  3108ecde-f6d6-4762-b060-31702758b087   **
`-sda4     part  476.2G crypto a9152bd7-7626-4815-827f-b5800bf04220   
  `-crypt-ml
           crypt 476.2G LVM2_m vm2hbF-69ii-TGky-EXiD-Y30T-6o5S-LnQYra 
    |-system-home
    |      lvm     100G xfs    17bd013b-f79c-4c1f-940d-7e8ad440b3a2   
    |-system-root
    |      lvm      40G btrfs  5a9113c5-293c-4c62-b02a-4d7922d1cbc2   /mnt
    `-system-swap
           lvm       2G swap   ab896a01-ebfe-494c-b20b-ecba8d64fe55   
sdc        disk    7.6G                                               
`-sdc1     part    7.6G vfat   3A95-D1A2                              
cloop0     disk    1.8G                                               /KNOPPIX
cloop1     disk    9.6G                                               /KNOPPIX1
zram0      disk      4G                                               [SWAP]
knoppix@Microknoppix:~$ mkdir /tmp/tmp
knoppix@Microknoppix:~$ mount /dev/sda3 /tmp/tmp
knoppix@Microknoppix:~$ ls -R /tmp/tmp
/tmp/tmp/:
boot.readme                          symvers-5.3.18-lp152.106-default.gz
config-5.3.18-59.10-default          sysctl.conf-5.3.18-59.10-default
config-5.3.18-lp152.102-default      sysctl.conf-5.3.18-lp152.102-default
config-5.3.18-lp152.106-default      sysctl.conf-5.3.18-lp152.106-default
dracut                               System.map-5.3.18-59.10-default
efi                                  System.map-5.3.18-lp152.102-default
grub2                                System.map-5.3.18-lp152.106-default
initrd                               vmlinux-5.3.18-59.10-default.gz
initrd-5.3.18-59.10-default          vmlinux-5.3.18-lp152.102-default.gz
initrd-5.3.18-lp152.102-default      vmlinux-5.3.18-lp152.106-default.gz
initrd-5.3.18-lp152.106-default      vmlinuz
message                              vmlinuz-5.3.18-59.10-default
perl-BL_delayed_exec                 vmlinuz-5.3.18-lp152.102-default
symvers-5.3.18-59.10-default.gz      vmlinuz-5.3.18-lp152.106-default
symvers-5.3.18-lp152.102-default.gz


/tmp/tmp/dracut:


/tmp/tmp/efi:


/tmp/tmp/grub2:
fonts  grub.cfg  grubenv  locale  themes  x86_64-efi

...

So, it should be?


knoppix@Microknoppix:/mnt$ mount /dev/**sda3** /mnt/boot/