Problems with chroot

Please format, read the link and post all like

sudo mkdir -p /mnt/broken
sudo mount /dev/nvme0n1p2 /mnt/broken
sudo garuda-chroot /mnt/broken/@

[root@garuda-lxqt /]# sudo mount /dev/sda6 /mnt/broken
[root@garuda-lxqt /]# sudo garuda-chroot /mnt/broken/@
sudo: garuda-chroot: command not found

@malik it looks like you clicked the chroot icon.

If that is accurate, you can skip those steps and proceed directly to restoring grub.

1 Like

So doing so
sudo grub-install /dev/sda6 ?????

Try /dev/sda, not any specific partition and post the output.

[root@garuda-lxqt /]# sudo grub-install /dev/sda
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

Yikes, poor grub doesn't even know what to do on that disk anymore. What happens if you try

grub-install /dev/sda --boot-directory=/boot

:slight_smile: :slight_smile: in fact he doesn't know what to do anymore

sorry the sequence is wrong.
the last and the first

wait now I'll show you some images having started it in lagacy



Just edit your post.

?????????
sorry I do not understand

@discobot start tutorial

Gosh I hate to say so, but that disk is just a terrible mess.

  • What is on /dev/sda1 and why does it have those flags? Did it used to be a boot partition? If so, what happened to it? Normally if you see a grub2 core.img filesystem it is very small, less than 1 MB so I am wondering if this partition was set up with a different purpose.
  • /dev/sda3 looks like an EFI partition, but it seems a little...odd. Did the system set up this partition, or did you create it in GParted, independent of an installation? Why does it have only 2.74 MiB on it? Have you looked at the contents of /boot/efi to see what is actually on there?
  • What is on /dev/sda6? It has a legacy_boot flag and it is mounted at /boot, but the partition is 185.55 GiB? The purpose of this partition is unclear. Is boot/grub in here?

If this were my disk, I would do whatever it takes to get my backups in order and just start over. Format the disk completely, set up new sensible partitions, and begin from scratch. Whatever missteps led to this present state are going to be difficult or impossible to straighten out.

4 Likes

So in sda6 I have garuda kde and I would like to get it back since I have many files saved
sda5 instead there is garuda LXQT.
But the problem that with garuda lxqt does not see the partition of garuda kde, that of win10 yes.
that at most I saved the win10 files but those of garuda kde I don't know how.
the sda1 partition made me build it boot repair but I guess it just made trouble.
and sda1, if desired, I could also delete it.
I hope I was able to make myself explain

If you can start in UEFI successfully

  • Run these commands in terminal and post all terminal contents, including the commands:
cat /etc/fstab
sudo fdisk -l
lsblk -f
ls -la /boot

If you cannot boot anymore

  • Start your ISO installer in UEFI mode
  • Mount your partitions, using the terminal, like this:
sudo mkdir -p /mnt/garuda
sudo mkdir -p /mnt/boot
sudo mkdir -p /mnt/esp
sudo mount /dev/sda5 /mnt/garuda
sudo mount /dev/sda6 /mnt/boot
sudo mount /dev/sda3 /mnt/esp
  • If all the above complete without errors, post output and commands of these (copy+paste, or you will make a mistake):
ls -la /mnt/boot
ls -la /mnt/esp
lsblk -f
sudo fdisk -l

We also need /etc/fstab file of your installed system. If you can find it, post it here, as well.

3 Likes
[root@DELL malik]# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
#UUID=5E63-73A4                            /boot/efi      vfat    umask=0077 0 2
UUID=85767c9d-1549-476d-ad89-f880cf55488b /              btrfs   subvol=/@,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=85767c9d-1549-476d-ad89-f880cf55488b /home          btrfs   subvol=/@home,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=85767c9d-1549-476d-ad89-f880cf55488b /root          btrfs   subvol=/@root,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=85767c9d-1549-476d-ad89-f880cf55488b /srv           btrfs   subvol=/@srv,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=85767c9d-1549-476d-ad89-f880cf55488b /var/cache     btrfs   subvol=/@cache,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=85767c9d-1549-476d-ad89-f880cf55488b /var/log       btrfs   subvol=/@log,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=85767c9d-1549-476d-ad89-f880cf55488b /var/tmp       btrfs   subvol=/@tmp,defaults,noatime,compress=zstd,discard=async,ssd 0 0
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
#UUID=59b2d140-9617-4869-bc03-09f061ee6bce  /boot       btrfs    defaults      0       2
#UUID=5E63-73A4  /boot/efi       vfat    defaults      0       1
UUID=59b2d140-9617-4869-bc03-09f061ee6bce  /boot       btrfs    defaults
[root@DELL malik]# sudo fdisk -l
Disk /dev/sda: 447,13 GiB, 480103981056 bytes, 937703088 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B6291FBA-5200-459B-AE1E-87041A292765

Dispositivo     Start      Fine   Settori   Size Tipo
/dev/sda2      264192   1286143   1021952   499M Microsoft basic data
/dev/sda3     1286144   1490943    204800   100M EFI System
/dev/sda4     1490944 197303029 195812086  93,4G Microsoft basic data
/dev/sda5   586424320 936576663 350152344   167G Linux filesystem
/dev/sda6   197304320 586424319 389120000 185,5G Linux filesystem
/dev/sda7   936577024 937701375   1124352   549M Linux swap

Partition table entries are not in disk order.


Disk /dev/zram0: 15,53 GiB, 16677601280 bytes, 4071680 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/loop0: 4 KiB, 4096 bytes, 8 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 164,76 MiB, 172761088 bytes, 337424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 71,1 MiB, 74551296 bytes, 145608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 44,68 MiB, 46845952 bytes, 91496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 65,21 MiB, 68378624 bytes, 133552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 55,54 MiB, 58232832 bytes, 113736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@DELL malik]# lsblk -f
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0
     squash 4.0                                                    0   100% /var/lib/snapd/snap/bare/5
loop1
     squash 4.0                                                    0   100% /var/lib/snapd/snap/snapd/15534
loop2
     squash 4.0                                                    0   100% /var/lib/snapd/snap/translatium/141
loop3
     squash 4.0                                                    0   100% /var/lib/snapd/snap/gnome-3-28-1804/161
loop4
     squash 4.0                                                    0   100% /var/lib/snapd/snap/gtk-common-themes/1519
loop5
     squash 4.0                                                    0   100% /var/lib/snapd/snap/core18/2409
sda                                                                         
β”œβ”€sda2
β”‚    ntfs         Recovery
β”‚                       B0243BA0243B690C                                    
β”œβ”€sda3
β”‚    vfat   FAT32       5E63-73A4                                           
β”œβ”€sda4
β”‚    ntfs               06F665DCF665CC8D                                    
β”œβ”€sda5
β”‚    btrfs              85767c9d-1549-476d-ad89-f880cf55488b  151,2G     9% /var/log
β”‚                                                                           /var/cache
β”‚                                                                           /home
β”‚                                                                           /root
β”‚                                                                           /var/tmp
β”‚                                                                           /srv
β”‚                                                                           /
β”œβ”€sda6
β”‚    btrfs              59b2d140-9617-4869-bc03-09f061ee6bce  157,4G    14% /boot
└─sda7
     swap   1           2f465ffe-f823-4f14-bcb9-cec74faa773a                [SWAP]
sr0                                                                         
zram0
                                                                            [SWAP]
root@DELL malik]# ls -la /boot
totale 122976
drwxr-xr-x 1 root root      172 23 mag 20.02 .
drwxr-xr-x 1 root root      192 20 mag 21.57 ..
drwxr-xr-x 1 root root       20 11 mag 18.18 @
drwxr-xr-x 1 root root        0 23 mag 20.02 broken
drwxr-xr-x 1 root root        0 14 mag 16.21 efi
drwxr-xr-x 1 root root      112 23 mag 23.11 grub
-rw------- 1 root root 70136397 20 mag 18.49 initramfs-linux-zen-fallback.img
-rw------- 1 root root 44401209 20 mag 18.49 initramfs-linux-zen.img
-rw-r--r-- 1 root root 11362912 20 mag 18.49 vmlinuz-linux-zen
[root@DELL malik]# sudo mkdir -p /mnt/garuda
[root@DELL malik]# sudo mkdir -p /mnt/boot
[root@DELL malik]# sudo mkdir -p /mnt/esp
[root@DELL malik]# sudo mount /dev/sda5 /mnt/garuda
[root@DELL malik]# sudo mount /dev/sda6 /mnt/boot
[root@DELL malik]# sudo mount /dev/sda3 /mnt/esp
[root@DELL malik]# ls -la /mnt/boot
totale 122976
drwxr-xr-x 1 root root      172 23 mag 20.02 .
drwxr-xr-x 1 root root       38 24 mag 08.41 ..
drwxr-xr-x 1 root root       20 11 mag 18.18 @
drwxr-xr-x 1 root root        0 23 mag 20.02 broken
drwxr-xr-x 1 root root        0 14 mag 16.21 efi
drwxr-xr-x 1 root root      112 23 mag 23.11 grub
-rw------- 1 root root 70136397 20 mag 18.49 initramfs-linux-zen-fallback.img
-rw------- 1 root root 44401209 20 mag 18.49 initramfs-linux-zen.img
-rw-r--r-- 1 root root 11362912 20 mag 18.49 vmlinuz-linux-zen
[root@DELL malik]# ls -la /mnt/esp
totale 4
drwxr-xr-x 5 root root 1024  1 gen  1970 .
drwxr-xr-x 1 root root   38 24 mag 08.41 ..
drwxr-xr-x 2 root root 1024 14 mag 17.54 broken
drwxr-xr-x 6 root root 1024 23 mag 23.27 EFI
drwxr-xr-x 2 root root 1024 22 mag 15.51 sda6
[root@DELL malik]#
root@DELL malik]# lsblk -f
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0
     squash 4.0                                                    0   100% /var/lib/snapd/snap/bare/5
loop1
     squash 4.0                                                    0   100% /var/lib/snapd/snap/snapd/15534
loop2
     squash 4.0                                                    0   100% /var/lib/snapd/snap/translatium/141
loop3
     squash 4.0                                                    0   100% /var/lib/snapd/snap/gnome-3-28-1804/161
loop4
     squash 4.0                                                    0   100% /var/lib/snapd/snap/gtk-common-themes/1519
loop5
     squash 4.0                                                    0   100% /var/lib/snapd/snap/core18/2409
sda                                                                         
β”œβ”€sda2
β”‚    ntfs         Recovery
β”‚                       B0243BA0243B690C                                    
β”œβ”€sda3
β”‚    vfat   FAT32       5E63-73A4                                97M     2% /mnt/esp
β”œβ”€sda4
β”‚    ntfs               06F665DCF665CC8D                                    
β”œβ”€sda5
β”‚    btrfs              85767c9d-1549-476d-ad89-f880cf55488b  151,2G     9% /mnt/garuda
β”‚                                                                           /var/log
β”‚                                                                           /var/cache
β”‚                                                                           /home
β”‚                                                                           /root
β”‚                                                                           /var/tmp
β”‚                                                                           /srv
β”‚                                                                           /
β”œβ”€sda6
β”‚    btrfs              59b2d140-9617-4869-bc03-09f061ee6bce  157,4G    14% /mnt/boot
β”‚                                                                           /boot
└─sda7
     swap   1           2f465ffe-f823-4f14-bcb9-cec74faa773a                [SWAP]
sr0                                                                         
zram0
                                                                            [SWAP]
[root@DELL malik]#