My system won't boot

Edit: this is now solved and i want to add a message: For anyone reading this post in the future: Don’t just read the last solution, everything from @pebcak is of value and you’ll probably need some of the steps mentioned in the thread!

As the title says my system won’t boot. I’m getting:
Error: file ‘/boot/initramfs-linux.img’ not found
I’m aware that there are multiple posts with the same thing here, and I pretty much followed this one but it doesn’t fix my problem. These are the steps i took one by one:
fdisk -l
I identified that the disk i need is sda. This was the output:

Device       Start       End   Sectors   Size Type
/dev/sda1     4096   2052095   2048000  1000M EFI System
/dev/sda2  2052096 234436544 232384449 110.8G Linux filesystem

sudo su
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot/efi
arch-chroot /mnt
pacman -Syyu
I had 2 boot folders, one of was /boot/grub/grub.cfg the other was /@/boot/grub/grub.cfg. The second one contained the grub.cfg file so i did this:
grub-mkconfig -o /@/boot/grub/grub.cfg.
The result was still the same so i reinstalled the kernel and repeated the steps, it booted once to TTY after that but later went back to the same error. I think the original problem was lack of space that I wasn’t aware of before (i’m assuming) the update that broke the system, so i deleted the files from a steam game i had (20GB aprox) and it still shows lack of space when i try to install a KDE de for the new linux i installed:
sudo pacman -S linux
pacman -S xorg plasma plasma-wayland-session kde-applications
I also had timeshift installed and i have snapshots that I can see the folder but it won’t recognise the timeshift command, so i reinstalled timeshift from chroot:
sudo pacman -S timeshift
Now it recognizes the command but it won’t find the snapshots:
timeshift --list

First run mode (config file not found)
Selected default snapshot type: RSYNC
Device : Not Selected

** (process:27867): CRITICAL **: 18:14:50.235: gee_abstract_collection_get_size: assertion 'self != NULL' failed
No snapshots found

From everything above you can obviously see that i’m a real Linux noob so any help is appreciated. I have a lot of browser tabs that i need from that system for a project that i’m working on, if i can extract only those it would be sufficient for me. Browsers that i used are Brave and Firefox if that helps. Thanks!

1 Like

What file system are you using?

This makes me think you are using Btrfs. If that is indeed the case, the instructions for chroot are somewhat different than what you have used.

Could you boot up your live usb and post the output of:

lsblk -f




Also - are you sure it is grub?, EnOS defaults to systemd-boot/dracut.

No, not really.

It may very well be systemd-boot.

efibootmgr should show if there is an entry for Linux Boot Manager pointing to \EFI\systemd\systemd-bootx64.efi

But on the other hand /@/boot/grub/grub.cfg points to Grub.

Could be an older install or OP may have chosen Grub in the installer.

lsblk -f

NAME    FSTYPE FSVER LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0                                                                       0   100% /var/lib/snapd/snap/bare/5
loop1                                                                       0   100% /var/lib/snapd/snap/brave/371
loop2                                                                       0   100% /var/lib/snapd/snap/brave/368
loop3                                                                       0   100% /var/lib/snapd/snap/code/153
loop4                                                                       0   100% /var/lib/snapd/snap/code/154
loop5                                                                       0   100% /var/lib/snapd/snap/core/16202
loop6                                                                       0   100% /var/lib/snapd/snap/core18/2796
loop7                                                                       0   100% /var/lib/snapd/snap/core/16574
loop8                                                                       0   100% /var/lib/snapd/snap/core18/2812
loop9                                                                       0   100% /var/lib/snapd/snap/core20/2105
loop10                                                                      0   100% /var/lib/snapd/snap/core20/2182
loop11                                                                      0   100% /var/lib/snapd/snap/core22/1122
loop12                                                                      0   100% /var/lib/snapd/snap/core22/1033
loop13                                                                      0   100% /var/lib/snapd/snap/cups/980
loop14                                                                      0   100% /var/lib/snapd/snap/flutter/145
loop15                                                                      0   100% /var/lib/snapd/snap/flutter/141
loop16                                                                      0   100% /var/lib/snapd/snap/cups/1024
loop17                                                                      0   100% /var/lib/snapd/snap/gnome-3-28-1804/194
loop18                                                                      0   100% /var/lib/snapd/snap/gnome-3-28-1804/198
loop19                                                                      0   100% /var/lib/snapd/snap/gnome-3-38-2004/140
loop20                                                                      0   100% /var/lib/snapd/snap/gnome-42-2204/132
loop21                                                                      0   100% /var/lib/snapd/snap/gnome-42-2204/141
loop22                                                                      0   100% /var/lib/snapd/snap/gtk-common-themes/1535
loop23                                                                      0   100% /var/lib/snapd/snap/gnome-3-38-2004/143
loop24                                                                      0   100% /var/lib/snapd/snap/pieces-os/45
loop25                                                                      0   100% /var/lib/snapd/snap/pieces-for-developers/3
loop26                                                                      0   100% /var/lib/snapd/snap/pieces-os/46
loop27                                                                      0   100% /var/lib/snapd/snap/snapd/20671
loop28                                                                      0   100% /var/lib/snapd/snap/snapd/21184
loop29                                                                      0   100% /var/lib/snapd/snap/superproductivity/1878
loop30                                                                      0   100% /var/lib/snapd/snap/pyqt5-runtime-core20/9
loop31                                                                      0   100% /var/lib/snapd/snap/tradingview/50
loop32                                                                      0   100% /var/lib/snapd/snap/superproductivity/1865
├─sda1  vfat   FAT32             1842-3D80                                           
└─sda2  btrfs        endeavouros ee9b16b8-d971-4e33-9ffa-6313920b03f6                
├─sdb1  vfat   FAT32             B471-CB5B                             298.8M     0% /boot/efi
└─sdb2  btrfs                    110d1954-10ba-41f4-81cf-d120cb9ac2c5   14.6G    80% /var/tmp
└─sdc1  ntfs         Storage     EEFA00A8FA006EE1                                    
zram0                                                                                [SWAP]
│       vfat   FAT32             92DA-6F75                                           
│       ntfs                     6218FC1A18FBEAC5                                    
        ntfs                     D61051C21051AA6F                                    


BootCurrent: 002A
Timeout: 1 seconds
BootOrder: 002A,0003,0002,0029,0028,0000,0001
Boot0000* Garuda	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0001* ArcoLinux	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0002* endeavouros	HD(1,GPT,88c6cd8d-ee75-4961-b9fb-427c20689006,0x1000,0x1f4000)/\EFI\ENDEAVOUROS\GRUBX64.EFI
Boot0003* Windows Boot Manager	HD(1,GPT,826ba909-e78e-40e6-84ff-397094169370,0x800,0x32000)/\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000030000100000010000000040000007fff0400
Boot0028* Hard Drive	BBS(HD,,0x0)0000474f00004e4fab000000010000007500530050004300430020004d002e00320020005000430049006500200053005300440000000501090002000000007fff040002010c00d041030a0000000001010600001d010106000000031710000100000001000000000000007fff040001043800ef47642dc93ba041ac194d51d01b4ce6530050004300430020004d002e00320020005000430049006500200053005300440000007fff04000000424f00004e4faf000000010000006f004b0049004e004700530054004f004e002000530056003300300030005300330037004100310032003000470000000501090002000000007fff040002010c00d041030a0000000001010600001703120a000000ffff00007fff040001043e00ef47642dc93ba041ac194d51d01b4ce63000350032003000420036003700370037003400340030004400450042003500200020002000200000007fff04000000424f00004e4fab000000010000006f004b0049004e004700530054004f004e0020005300560050003200300030005300330039003000470000000501090002000000007fff040002010c00d041030a0000000001010600001703120a000200ffff00007fff040001043e00ef47642dc93ba041ac194d51d01b4ce63000350032003000420036003200370035003200460030003500440034003300200020002000200000007fff04000000424f00004e4fab000000010000006f005700440043002000570044003200300045004100520058002d00300030005000410053004200300000000501090002000000007fff040002010c00d041030a0000000001010600001703120a000400ffff00007fff040001043e00ef47642dc93ba041ac194d51d01b4ce62000200020002000570020002d004400430057005a0041004100410035003600330036003600390000007fff04000000424f
Boot0029* UEFI OS	HD(1,GPT,88c6cd8d-ee75-4961-b9fb-427c20689006,0x1000,0x1f4000)/\EFI\BOOT\BOOTX64.EFI0000424f
Boot002A* UEFI OS	HD(1,GPT,7c2c0b9f-f4bf-7b41-ac54-ccedeb86d187,0x1000,0x96000)/\EFI\BOOT\BOOTX64.EFI0000424f

There is an update, I deleted some extra files form the game i mentioned earlier, i guess i missed the main folder so now i have the room needed ( about 21GB), and i also installed a vanilla KDE on top of the new arch i had installed. So now there is basically 2 parallel systems on that hd, and i can boot to the new one. I can still see all the files form the EndeavourOS i had previously. I don’t know id manually replacing folders will work (ex: old /home with the new /home etc.)

Yes, it is. Then you should use slightly different instructions for chrooting.

In the Live ISO, stay connected to Internet and forum.

Open a terminal and run: (if you get any error message at whatever step, post them back here)

sudo mount -t btrfs -o subvol=@ /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/boot/efi
sudo arch-chroot /mnt

Now in chroot:

pacman -S grub linux
grub-mkconfig -o /boot/grub/grub.cfg

Pay close attention to the output of each and every command. Specifically make sure that the initramfs is correctly generated.

If no errors (we don’t bother about warnings at this stage), then type exit followed by enter to quit chroot.

Cross your fingers and reboot! And report back in case of success or failure.


pacman -S grub linux

error: failed to init transaction (unable to lock database)
error: could not lock database: File exists
  if you're sure a package manager is not already
  running, you can remove /var/lib/pacman/db.lck


Installing for x86_64-efi platform.
Installation finished. No error reported.
grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found background: /usr/share/endeavouros/splash.png
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...

I noticed the error on the first command but i i didn’t know if i should delete the /var/lib/pacman/db.lck file

1 Like

Still in chroot, right?

Then do:

rm  /var/lib/pacman/db.lck

pacman -S linux

grub-mkconfig -o /boot/grub/grub.cfg

When done quit chroot: exit


1 Like

Better get rid of those eroneous grub.cfg files! :wink:

1 Like

I exited at first, restarted and it got stuck in:

Loading Linux linux ...
Loading initial ramdisk ...

Without the Error: file ‘/boot/initramfs-linux.img’ this time and it wasn’t a black background but the Endeavour os grub shoewed first and it was the Endeavour grub background.
Now following this steps, error on

pacman -S grub linux

But it think it’s because it’s already installed.

warning: linux-6.7.5.arch1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1)  Old Version    New Version    Net Change  Download Size

core/linux   6.7.5.arch1-1  6.7.5.arch1-1    0.00 MiB     130.67 MiB

Total Download Size:   130.67 MiB
Total Installed Size:  130.76 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 linux-6.7.5.arch1-1-x86_64.pkg.tar.zst failed to download
error: failed retrieving file 'linux-6.7.5.arch1-1-x86_64.pkg.tar.zst' from : The requested URL returned error: 404
error: failed retrieving file 'linux-6.7.5.arch1-1-x86_64.pkg.tar.zst' from : The requested URL returned error: 404
error: failed retrieving file 'linux-6.7.5.arch1-1-x86_64.pkg.tar.zst' from : The requested URL returned error: 404
error: failed retrieving file 'linux-6.7.5.arch1-1-x86_64.pkg.tar.zst' from : The requested URL returned error: 404
error: failed retrieving file 'linux-6.7.5.arch1-1-x86_64.pkg.tar.zst' from : The requested URL returned error: 404
error: failed retrieving file 'linux-6.7.5.arch1-1-x86_64.pkg.tar.zst' from : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.

This looks like a mirror problem.
Edit: Update the arch mirrors and then run the command again.

1 Like

Where are you at the moment?

In chroot?

1 Like


How would i do that form chroot ? As mentioned big noob here :slight_smile:

Alright, in chroot just run:

mkinitcpio -p linux (If you are not using mkinitcpio, then run dracut-rebuild)

grub-mkconfig -o /boot/grub/grub.cfg

1 Like

This almost worked i guess, past the previous error, now stuck here for few minutes:

Sorry i don’t know how to copy this.


1 Like

My only suggestion at this point would be to chroot once again in your system and update it fully.
Make sure you have internet connection.

sudo mount -o subvol=@ /dev/sda2 /mnt
sudo mount -o subvol=@cache /dev/sda2 /mnt/var/cache
sudo mount -o subvol=@log /dev/sda2 /mnt/var/log
sudo mount -o subvol=@home /dev/sda2 /mnt/home
sudo mount /dev/sda1 /mnt/boot/efi
sudo arch-chroot /mnt

In chroot:

pacman -Syyu


Brooooooo :heart::heart::heart:
Thanks for having the patience and the knowledge.

1 Like