Windows ate my grub?

@susejunky Followed the steps precisely. I still get stopped at:

inux@localhost:~> sudo chroot /mnt/my-root
chroot: failed to run command ‘/bin/bash’: No such file or directory

I tried it without, then with, the recursive bind suggested by @nrickert

Really?

There is no

sudo chroot /mnt/my-root

but

chroot /mnt/my-root

so no “sudo”.

Do you have secure-boot enabled?

If you are not using secure-boot, then it should work (based on your output). It won’t work with secure-boot.

If you are using secure-boot, then to reinstall you will need “shim-install” rather than “grub2-install

I am not using secure boot. I will try the process again and post the entire log.

linux@localhost:~> lsblk -f
NAME FSTYPE FSVER LABEL                          UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0
     squash 4.0                                                                             0   100% /run/overlay/squashfs_container
loop1
     ext4   1.0                                  274aa3b0-f4ee-42da-a79a-1ee100d57959  983.6M    72% /run/overlay/rootfsbase
sda                                                                                                  
└─sda1
     ext4   1.0                                  468deb91-0db4-4e6c-82cb-bf2daaa021f2                
sdb                                                                                                  
├─sdb1
│    ntfs         Recovery                       E43AC7213AC6F01A                                    
├─sdb2
│    vfat   FAT32                                D2CA-2AD1                                           
├─sdb3
│                                                                                                    
└─sdb4
     ntfs         Win 10                         B858D2AA58D26722                                    
sdc  iso966 Jolie openSUSE_Tumbleweed_GNOME_Live 2025-12-12-22-46-50-00                              
├─sdc1
│    iso966 Jolie openSUSE_Tumbleweed_GNOME_Live 2025-12-12-22-46-50-00                     0   100% /run/overlay/live
├─sdc2
│    vfat   FAT16 BOOT                           90CE-0D37                                           
└─sdc3
     ext4   1.0   cow                            ce00164b-ad03-4f1f-9cf8-49ce36551409   52.3G     1% /run/overlay/overlayfs
nvme0n1
│                                                                                                    
├─nvme0n1p1
│    vfat   FAT32                                3DB3-04DC                                           
└─nvme0n1p2
     btrfs                                       e95a1494-ab93-47ae-a375-66b40f89311c                
nvme1n1
│                                                                                                    
└─nvme1n1p1
     ext4   1.0                                  5f4f8f15-9d96-478a-b590-671f84350f58                
linux@localhost:~> sudo mkdir /mnt/volume
linux@localhost:~> sudo mount /dev/nvme0n1p2 /mnt/volume/
linux@localhost:~> ls -a /mnt/volume
.   bin   dev  home  lib64  opt   root  sbin        srv  tmp  var
..  boot  etc  lib   mnt    proc  run   .snapshots  sys  usr
linux@localhost:~> sudo btrfs subvolume list /mnt/volume
ID 256 gen 87235 top level 5 path @
ID 257 gen 87182 top level 256 path @/var
ID 258 gen 87164 top level 256 path @/usr/local
ID 259 gen 71875 top level 256 path @/srv
ID 260 gen 84512 top level 256 path @/root
ID 261 gen 87180 top level 256 path @/opt
ID 262 gen 87234 top level 256 path @/home
ID 263 gen 87202 top level 256 path @/boot/grub2/x86_64-efi
ID 264 gen 71875 top level 256 path @/boot/grub2/i386-pc
ID 265 gen 85500 top level 256 path @/.snapshots
ID 268 gen 842 top level 265 path @/.snapshots/3/snapshot
ID 305 gen 752 top level 265 path @/.snapshots/40/snapshot
ID 326 gen 929 top level 265 path @/.snapshots/61/snapshot
ID 494 gen 6665 top level 265 path @/.snapshots/229/snapshot
ID 495 gen 6716 top level 265 path @/.snapshots/230/snapshot
ID 496 gen 6763 top level 262 path @/home/.snapshots
ID 497 gen 6724 top level 496 path @/home/.snapshots/1/snapshot
ID 498 gen 6740 top level 496 path @/home/.snapshots/2/snapshot
ID 515 gen 7005 top level 265 path @/.snapshots/247/snapshot
ID 518 gen 84511 top level 257 path @/var/lib/swap
ID 587 gen 9036 top level 265 path @/.snapshots/318/snapshot
ID 638 gen 12499 top level 265 path @/.snapshots/369/snapshot
ID 655 gen 12883 top level 265 path @/.snapshots/386/snapshot
ID 658 gen 12965 top level 265 path @/.snapshots/389/snapshot
ID 728 gen 87233 top level 265 path @/.snapshots/459/snapshot
ID 791 gen 59841 top level 265 path @/.snapshots/522/snapshot
ID 792 gen 59882 top level 265 path @/.snapshots/523/snapshot
ID 797 gen 66170 top level 265 path @/.snapshots/528/snapshot
ID 798 gen 66403 top level 265 path @/.snapshots/529/snapshot
ID 799 gen 66411 top level 265 path @/.snapshots/530/snapshot
ID 800 gen 66443 top level 265 path @/.snapshots/531/snapshot
ID 801 gen 69300 top level 265 path @/.snapshots/532/snapshot
ID 802 gen 69494 top level 265 path @/.snapshots/533/snapshot
ID 803 gen 72911 top level 265 path @/.snapshots/534/snapshot
ID 804 gen 73160 top level 265 path @/.snapshots/535/snapshot
ID 805 gen 73166 top level 265 path @/.snapshots/536/snapshot
ID 806 gen 73205 top level 265 path @/.snapshots/537/snapshot
ID 807 gen 74463 top level 265 path @/.snapshots/538/snapshot
ID 808 gen 74654 top level 265 path @/.snapshots/539/snapshot
linux@localhost:~> sudo mkdir /mnt/my-root
linux@localhost:~> sudo mount /dev/nvme0n1p2 -o subvolid=256 /mnt/my-root/
linux@localhost:~> sudo mount /dev/nvme0n1p2 -o subvolid=257 /mnt/my-root/var
linux@localhost:~> sudo mount /dev/nvme0n1p2 -o subvolid=263 /mnt/my-root/boot/grub2/x86_64-efi/
linux@localhost:~> sudo mount /dev/nvme0n1p2 -o subvolid=264 /mnt/my-root/boot/grub2/i386-pc/
linux@localhost:~> sudo mount /proc/ -o bind /mnt/my-root/proc/
linux@localhost:~> sudo mount /sys -o bind /mnt/my-root/sys
linux@localhost:~> sudo mount /dev -o bind /mnt/my-root/dev
linux@localhost:~> sudo chroot /mnt/my-root/
chroot: failed to run command ‘/bin/bash’: No such file or directory
linux@localhost:~> 

@susejunky

linux@localhost:~> chroot /mnt/my-root/
chroot: cannot change root directory to '/mnt/my-root/': Operation not permitted

By manually mounting individual btrfs subvolumes (subvolid=256, /var, /boot, etc.) you broke the root filesystem layout, so /bin/bash wasn’t present and chroot failed.

Do not mount subvolumes manually for recovery. Just mount the root partition (/dev/nvme0n1p2) directly at /mnt, then openSUSE will automatically select the active snapshot. Once mounted that way, /bin/bash exists and chroot /mnt /bin/bash works.

@deano_ferrari So your post #6, with the recursive bind on /sys? I did that, but I’m willing to do it again and post my efforts if you want.

linux@localhost:~> sudo mount /dev/nvme0n1p2 /mnt
linux@localhost:~> chroot /mnt /bin/bash
chroot: cannot change root directory to '/mnt': Operation not permitted
linux@localhost:~> 

Yes, it’s hard to follow when we don’t see all that you typed.

When you do
sudo mount /dev/nvme0n1p2 /mnt
you can then check ls /mnt/bin/bash exists.

Mount the EFI partition

sudo mkdir -p /mnt/boot/efi
sudo mount /dev/nvme0n1p1 /mnt/boot/efi

and then the rest as already explained.

linux@localhost:~> sudo mount /dev/nvme0n1p2 /mnt
linux@localhost:~> chroot /mnt /bin/bash
chroot: cannot change root directory to '/mnt': Operation not permitted
linux@localhost:~> 

Sudo worked, but I got this ttyname error. Should I proceed?

You should be ok, otherwise try

sudo umount /mnt
sudo mount -o subvol=@ /dev/nvme0n1p2 /mnt

(mounts root subvolume).

@deano_ferrari Ok. But before I use this chroot I should mount the EFI partition to my opensuse drive? Keep in mind that my efi partition is over on that win10 disk at sdb2. Sorry, I really am trying. Just still wet behind my suse ears.

You have an openSUSE EFI parition. That is the pertinent one here, and making sure that the UEFI boot order is as you want it.

As I also mentioned check ls /mnt/bin/bash exists once the openSUSE root filesystem is mounted.

@deano_ferrari Mounted the root as you said, then the following w/error:

linux@localhost:~> sudo mkdir -p /mnt/boot/efi
linux@localhost:~> sudo mount /dev/nvme0n1p1 /mnt/boot/efi
linux@localhost:~> sudo chroot /mnt /bin/bash
tty: ttyname error: Inappropriate ioctl for device
:/ # grub2-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=openSUSE
Installing for x86_64-efi platform.
grub2-install: error: cannot find a device for /boot/efi (is /dev mounted?).
:/ # exit
exit
linux@localhost:~> ls /mnt/bin/bash
/mnt/bin/bash
linux@localhost:~> 

Huh? Did you bind the virtual file systems as required? They are not optional steps.

I always do

sudo umount /mnt/volume

before I proceed with

sudo mount /dev/nvme0n1p2 -o subvolid=256 /mnt/my-root/

And I always do

sudo mount /dev -o rbind /mnt/my-root/dev
sudo mount /proc -o rbind /mnt/my-root/proc
sudo mount /sys -o rbind /mnt/my-root/sys
sudo mount /run -o rbind /mnt/my-root/dev

and

sudo mount /dev/nvme0n1p1 /mnt/my-root/boot/efi

before I chroot.

No, I thought you didn’t want those. I will do these:

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

Ok, that was different. It says installed without error. Going to try and boot in using F11 now.

1 Like

I told you to do the rest. Go back and review the last posts.