GoonMaster
Member
i was following a tutorial on fixing grub and got an error telling me that the "vmlinuz" file was missing from my /boot directory. is there a way for me to recover its contents
im running archIt sounds like the kernel is missing from what you explained.
What Linux distribution are you running?
Test Disk might help.
![]()
Partition Recovery and File Undelete
TestDisk is a free and open source data recovery software tool designed to recover lost partition and unerase deleted files.www.cgsecurity.org
That vmlinuz file would be the kernel. You will need to find it. Here it is on this machine, along with it's initrd and system-map mates:i was following a tutorial on fixing grub and got an error telling me that the "vmlinuz" file was missing from my /boot directory. is there a way for me to recover its contents
[flip@flop ~]$ ls /boot
config-6.4.0-4-amd64 initrd.img-6.5.0-2-amd64
config-6.5.0-1-amd64 System.map-6.4.0-4-amd64
config-6.5.0-2-amd64 System.map-6.5.0-1-amd64
efi System.map-6.5.0-2-amd64
grub vmlinuz-6.4.0-4-amd64
initrd.img-6.4.0-4-amd64 vmlinuz-6.5.0-1-amd64
initrd.img-6.5.0-1-amd64 vmlinuz-6.5.0-2-amd64
[flip@flop ~]$ ll /
total 1.1M
lrwxrwxrwx 1 root root 7 Sep 22 2022 bin -> usr/bin
drwxr-xr-x 4 root root 4.0K Oct 21 22:17 boot
drwxr-xr-x 17 root root 3.4K Oct 24 06:14 dev
drwxr-xr-x 166 root root 12K Oct 24 06:15 etc
-rw-r--r-- 1 root root 904K Sep 17 17:28 familyLife.iso
drwxr-xr-x 5 root root 4.0K Mar 14 2022 home
lrwxrwxrwx 1 root root 29 Oct 21 22:14 initrd.img -> boot/initrd.img-6.5.0-2-amd64
lrwxrwxrwx 1 root root 29 Oct 21 22:14 initrd.img.old -> boot/initrd.img-6.5.0-1-amd64
lrwxrwxrwx 1 root root 7 Sep 22 2022 lib -> usr/lib
lrwxrwxrwx 1 root root 9 Sep 22 2022 lib64 -> usr/lib64
drwx------ 2 root root 16K Dec 2 2018 lost+found
drwxr-xr-x 3 root root 4.0K Dec 2 2018 media
drwxr-xr-x 2 root root 4.0K Dec 2 2018 mnt
drwxr-xr-x 5 root root 4.0K Mar 11 2023 mounts
drwxr-xr-x 3 root root 4.0K Dec 5 2022 opt
dr-xr-xr-x 254 root root 0 Oct 24 06:14 proc
drwx------ 9 root root 4.0K Oct 23 13:49 root
drwxr-xr-x 27 root root 800 Oct 24 06:22 run
lrwxrwxrwx 1 root root 8 Sep 22 2022 sbin -> usr/sbin
drwxr-xr-x 2 root root 4.0K Dec 2 2018 srv
dr-xr-xr-x 13 root root 0 Oct 24 06:14 sys
drwxrwxrwt 18 root root 60K Oct 24 12:46 tmp
drwxr-xr-x 12 root root 4.0K Sep 9 21:37 usr
drwxr-xr-x 11 root root 4.0K Oct 21 22:18 var
lrwxrwxrwx 1 root root 26 Oct 21 22:14 vmlinuz -> boot/vmlinuz-6.5.0-2-amd64
lrwxrwxrwx 1 root root 26 Oct 21 22:14 vmlinuz.old -> boot/vmlinuz-6.5.0-1-amd64
i booted into a live arch iso and i think i might've mounted my drive incorrectly and maybe thats why my kernel isn't where its supposed to be. i remember earlier today i did a bunch of stuff to one of my grub directory and idk if that has something to do with itThat vmlinuz file would be the kernel. You will need to find it. Here it is on this machine, along with it's inittrd and system-map mates:
Code:[flip@flop ~]$ ls /boot config-6.4.0-4-amd64 initrd.img-6.5.0-2-amd64 config-6.5.0-1-amd64 System.map-6.4.0-4-amd64 config-6.5.0-2-amd64 System.map-6.5.0-1-amd64 efi System.map-6.5.0-2-amd64 grub vmlinuz-6.4.0-4-amd64 initrd.img-6.4.0-4-amd64 vmlinuz-6.5.0-1-amd64 initrd.img-6.5.0-1-amd64 vmlinuz-6.5.0-2-amd64
It would help if you navigated to the root directory and hunted for where the vmlinux file is since it's not likely that an installation would leave it out. Sometimes, it can be in the root directory, /, itself, so it you find it, you should copy it with all it mates (as above) in the /boot directory.
Here on this machine the vmlinuz files are in the root directory, but they are links to the /boot where the actual vmlinuz file sits:
Code:[flip@flop ~]$ ll / total 1.1M lrwxrwxrwx 1 root root 7 Sep 22 2022 bin -> usr/bin drwxr-xr-x 4 root root 4.0K Oct 21 22:17 boot drwxr-xr-x 17 root root 3.4K Oct 24 06:14 dev drwxr-xr-x 166 root root 12K Oct 24 06:15 etc -rw-r--r-- 1 root root 904K Sep 17 17:28 familyLife.iso drwxr-xr-x 5 root root 4.0K Mar 14 2022 home lrwxrwxrwx 1 root root 29 Oct 21 22:14 initrd.img -> boot/initrd.img-6.5.0-2-amd64 lrwxrwxrwx 1 root root 29 Oct 21 22:14 initrd.img.old -> boot/initrd.img-6.5.0-1-amd64 lrwxrwxrwx 1 root root 7 Sep 22 2022 lib -> usr/lib lrwxrwxrwx 1 root root 9 Sep 22 2022 lib64 -> usr/lib64 drwx------ 2 root root 16K Dec 2 2018 lost+found drwxr-xr-x 3 root root 4.0K Dec 2 2018 media drwxr-xr-x 2 root root 4.0K Dec 2 2018 mnt drwxr-xr-x 5 root root 4.0K Mar 11 2023 mounts drwxr-xr-x 3 root root 4.0K Dec 5 2022 opt dr-xr-xr-x 254 root root 0 Oct 24 06:14 proc drwx------ 9 root root 4.0K Oct 23 13:49 root drwxr-xr-x 27 root root 800 Oct 24 06:22 run lrwxrwxrwx 1 root root 8 Sep 22 2022 sbin -> usr/sbin drwxr-xr-x 2 root root 4.0K Dec 2 2018 srv dr-xr-xr-x 13 root root 0 Oct 24 06:14 sys drwxrwxrwt 18 root root 60K Oct 24 12:46 tmp drwxr-xr-x 12 root root 4.0K Sep 9 21:37 usr drwxr-xr-x 11 root root 4.0K Oct 21 22:18 var lrwxrwxrwx 1 root root 26 Oct 21 22:14 vmlinuz -> boot/vmlinuz-6.5.0-2-amd64 lrwxrwxrwx 1 root root 26 Oct 21 22:14 vmlinuz.old -> boot/vmlinuz-6.5.0-1-amd64
when i ls in /boot i get efi and grub but thats itThat vmlinuz file would be the kernel. You will need to find it. Here it is on this machine, along with it's initrd and system-map mates:
Code:[flip@flop ~]$ ls /boot config-6.4.0-4-amd64 initrd.img-6.5.0-2-amd64 config-6.5.0-1-amd64 System.map-6.4.0-4-amd64 config-6.5.0-2-amd64 System.map-6.5.0-1-amd64 efi System.map-6.5.0-2-amd64 grub vmlinuz-6.4.0-4-amd64 initrd.img-6.4.0-4-amd64 vmlinuz-6.5.0-1-amd64 initrd.img-6.5.0-1-amd64 vmlinuz-6.5.0-2-amd64
It would help if you navigated to the root directory and hunted for where the vmlinux file is since it's not likely that an installation would leave it out. Sometimes, it can be in the root directory, /, itself, so if you find it, you should copy it with all it mates (as above) into the /boot directory.
Here on this machine the vmlinuz files are in the root directory, but they are links to the /boot where the actual vmlinuz file sits:
Code:[flip@flop ~]$ ll / total 1.1M lrwxrwxrwx 1 root root 7 Sep 22 2022 bin -> usr/bin drwxr-xr-x 4 root root 4.0K Oct 21 22:17 boot drwxr-xr-x 17 root root 3.4K Oct 24 06:14 dev drwxr-xr-x 166 root root 12K Oct 24 06:15 etc -rw-r--r-- 1 root root 904K Sep 17 17:28 familyLife.iso drwxr-xr-x 5 root root 4.0K Mar 14 2022 home lrwxrwxrwx 1 root root 29 Oct 21 22:14 initrd.img -> boot/initrd.img-6.5.0-2-amd64 lrwxrwxrwx 1 root root 29 Oct 21 22:14 initrd.img.old -> boot/initrd.img-6.5.0-1-amd64 lrwxrwxrwx 1 root root 7 Sep 22 2022 lib -> usr/lib lrwxrwxrwx 1 root root 9 Sep 22 2022 lib64 -> usr/lib64 drwx------ 2 root root 16K Dec 2 2018 lost+found drwxr-xr-x 3 root root 4.0K Dec 2 2018 media drwxr-xr-x 2 root root 4.0K Dec 2 2018 mnt drwxr-xr-x 5 root root 4.0K Mar 11 2023 mounts drwxr-xr-x 3 root root 4.0K Dec 5 2022 opt dr-xr-xr-x 254 root root 0 Oct 24 06:14 proc drwx------ 9 root root 4.0K Oct 23 13:49 root drwxr-xr-x 27 root root 800 Oct 24 06:22 run lrwxrwxrwx 1 root root 8 Sep 22 2022 sbin -> usr/sbin drwxr-xr-x 2 root root 4.0K Dec 2 2018 srv dr-xr-xr-x 13 root root 0 Oct 24 06:14 sys drwxrwxrwt 18 root root 60K Oct 24 12:46 tmp drwxr-xr-x 12 root root 4.0K Sep 9 21:37 usr drwxr-xr-x 11 root root 4.0K Oct 21 22:18 var lrwxrwxrwx 1 root root 26 Oct 21 22:14 vmlinuz -> boot/vmlinuz-6.5.0-2-amd64 lrwxrwxrwx 1 root root 26 Oct 21 22:14 vmlinuz.old -> boot/vmlinuz-6.5.0-1-amd64
And what is in the root directory?when i ls in /boot i get efi and grub but thats it
ls /
ls -al /
i remember what i did. i tried to mount my drive to /mnt/boot/efi but i kept getting an error telling me that efi wasn't a directory so i just used mkdir and made onei booted into a live arch iso and i think i might've mounted my drive incorrectly and maybe thats why my kernel isn't where its supposed to be. i remember earlier today i did a bunch of stuff to one of my grub directory and idk if that has something to do with it
literally nothing.And what is in the root directory?
Code:ls / [/ [/QUOTE]
Then the system is defunct. You can re-install if you wish. The arch installation guide apparently is quite thorough:https://wiki.archlinux.org/title/installation_guideliterally nothing.
yes this whole whole issue derived from earlier today when i installed windows onto this nvme drive i have on my computerDo you have other operating systems on that pc?
is there a way for me to back up my data before i do. i have months worth of stuff on that installThen the system is defunct. You can re-install if you wish.
Boot to a Live version of Linux via a usb or CD/DVD and drag all of your files and other data to an external drive.is there a way for me to back up my data before i do. i have months worth of stuff on that install
Yes of course ... I perhaps ought to have mentioned that. One easy way is to boot up a live disk, and plug in another usb, mount the hard drive, navigate to the where the files you wish to keep, and copy them all to the second usb. Or, if you can bring up a network on the live disk, either online or to another computer on your network, copy or send the files to some other machine.is there a way for me to back up my data before i do. i have months worth of stuff on that install
no i have arch and windows installed on separate drivesBoot to a Live version of Linux via a usb or CD/DVD and drag all of your files and other data to an external drive.
If you can't do that then give Test Disk a spin.
So your Windows install and Arch is on the nvme and you haven't any other drives?
im gonna go the networking route. now that im on the live disk and i have an ethernet cable connected to another computer, how do i move the files from my linux drive to my other computer. could you maybe link a tutorial or something. im very new to this stuffYes of course ... I perhaps ought to have mentioned that. One easy way is to boot up a live disk, and plug in another usb, mount the hard drive, navigate to the where the files you wish to keep, and copy them all to the second usb. Or, if you can bring up a network on the live disk, either online or to another computer on your network, copy or send the files to some other machine.
If you use a usb with persistence, you can copy files to the usb, so you only need one usb stick. If the machine has only one usb port, you can use a 2 or 4 port usb hub.
I mention usbs because of the convenience, and since some can handle upwards of 32 and 64 G, they are likely to be sufficient. YMMV.
Glad to hear that!no i have arch and windows installed on separate drives
im probably gonna have to reinstall everything anyway bruhGlad to hear that!