[Solved] - Error file vmlinuz not found - (Pastebin Boot Info Script)

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
BeardedOne

[Solved] - Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by BeardedOne »

Hi Everyone !

Hoping for some guidance please on using the Boot Repair DVD to repair an unbootable system.

the error on trying to boot is:
"error: file '/vmlinuz-4.4.0-180-generic' not found"

I used the Boot Repair DVD to create and upload a txt file titled :
"Boot Info Script 8f991e4 + Boot-Repair extra info"

to here:
https://paste.ubuntu.com/p/zHdvdM4jP9/

Basically, while running update manager the system reported 0 bytes remaining on the boot partition.
So I stupidly went in there and deleted some of the larger oldest archives to make some space so that the updates could continue to complete the install.

Upon the next boot, I got the error above.

I have used the DVD to make a backup of the partitions etc , but to be on the safe side, I'm hoping someone would please be kind enough to reply with more or less step by step instructions that I could follow after booting from the Boot Repair DVD please !?

Also, without using the DVD to boot, I have tried all of the available boot kernel options under the advanced boot options and none of them worked.

Thanks so much !
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
WharfRat

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by WharfRat »

Hello BeardedOne Image

Welcome to Linux Mint and the Linux Mint forum :)

You deleted the linux kernel so you'll need to reinstall the linux-image--4.4.0-180-generic package using a chroot from the installation media.

Boot the mint live media, then open the terminal and carefully enter the following one line at a time:

Code: Select all

sudo -i
/sbin/cryptsetup luksOpen /dev/sda5  sda5_crypt 
mount /dev/mapper/mint--vg-root /mnt
mount /dev/sda1 /mnt/boot
mount -t proc none /mnt/proc
mount --rbind /sys /mnt/sys
mount --rbind /dev /mnt/dev
/usr/sbin/chroot /mnt /bin/bash
source /etc/profile
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
export PS1="\[\033[1;33m\]chroot to ->\[\033[1;31m\](system) #\[\e[0m\] "
apt-get install linux-image-4.4.0-180-generic 
mkinitramfs -o /boot/initrd.img-4.4.0-180-generic 
reboot
If apt says linux-image-4.4.0-180-generic is already installed then use apt-get install --reinstall linux-image-4.4.0-180-generic

Good luck :wink:
BeardedOne

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by BeardedOne »

Hi WharfRat, thanks so much for your help.

I did as you said and got to the point where APT was unable to locate linux-image-4.4.0-180-generic.

I have left the system as is... can you please help me out from here !?

Code: Select all

mint@mint:~$ sudo -i
root@mint:~# /sbin/cryptsetup luksOpen /dev/sda5  sda5_crypt
Enter passphrase for /dev/sda5: 
root@mint:~# mount /dev/mapper/mint--vg-root /mnt
root@mint:~# mount /dev/sda1 /mnt/boot
root@mint:~# mount -t proc none /mnt/proc
root@mint:~# mount --rbind /sys /mnt/sys
root@mint:~# mount --rbind /dev /mnt/dev
root@mint:~# /usr/sbin/chroot /mnt /bin/bash
mint / # source /etc/profile
mint / # echo "nameserver 8.8.8.8" >> /etc/resolv.conf
mint / # export PS1="\[\033[1;33m\]chroot to ->\[\033[1;31m\](system) #\[\e[0m\] "
chroot to ->(system) # apt-get install linux-image-4.4.0-180-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-image-4.4.0-180-generic
E: Couldn't find any package by regex 'linux-image-4.4.0-180-generic'
chroot to ->(system) # apt-get install linux-image-4.4.0-180-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-image-4.4.0-180-generic
E: Couldn't find any package by regex 'linux-image-4.4.0-180-generic'
chroot to ->(system) # apt-get install linux-image-4.4.0-180-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-image-4.4.0-180-generic
E: Couldn't find any package by regex 'linux-image-4.4.0-180-generic'
chroot to ->(system) # apt-get install --reinstall linux-image-4.4.0-180-genericReading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-image-4.4.0-180-generic
E: Couldn't find any package by regex 'linux-image-4.4.0-180-generic'
chroot to ->(system) # 
Thanks again!
Last edited by BeardedOne on Sat Dec 15, 2018 9:45 am, edited 1 time in total.
Reason: Changed quote tag to code tag
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by MrEen »

I think that should have been 140 instead of 180. In the last 2 lines Wharfrat gave you before reboot, change the 180's to 140.
BeardedOne

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by BeardedOne »

Thanks MrEen... I did that and got the same error

Code: Select all

E: Unable to locate package linux-image-4.4.0-140-generic
E: Couldn't find any package by regex 'linux-image-4.4.0-140-generic'
Any other help would be greatly appreciated please !
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by MrEen »

Strange. That's the newest 4.4 kernel:

Code: Select all

apt policy linux-image-4.4.0-140-generic
linux-image-4.4.0-140-generic:
  Installed: (none)
  Candidate: 4.4.0-140.166
  Version table:
     4.4.0-140.166 500
        500 http://mirrors.advancedhosters.com/ubuntu xenial-updates/main amd64 Packages
This is beyond my ability to help. We'll have to wait for others.
BeardedOne

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by BeardedOne »

OK, thank you MrEen.
will wait for other assistance.
WharfRat

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by WharfRat »

I used the kernel version from your post
BeardedOne wrote:the error on trying to boot is:
"error: file '/vmlinuz-4.4.0-180-generic' not found"
From the chroot environment past back ls -lhd /lib/modules/* and ls -lh /boot/{vmlin*,init*}
BeardedOne

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by BeardedOne »

Thanks WharfRat !

here is the output of that:

Code: Select all

mint@mint:~$ sudo -i
root@mint:~# /usr/sbin/chroot /mnt /bin/bash
/usr/sbin/chroot: failed to run command ‘/bin/bash’: No such file or directory
root@mint:~# /sbin/cryptsetup luksOpen /dev/sda5  sda5_crypt
Enter passphrase for /dev/sda5: 
No key available with this passphrase.
Enter passphrase for /dev/sda5: 
root@mint:~# mount /dev/mapper/mint--vg-root /mnt
root@mint:~# mount /dev/sda1 /mnt/boot
root@mint:~# mount -t proc none /mnt/proc
root@mint:~# mount --rbind /sys /mnt/sys
root@mint:~# mount --rbind /dev /mnt/dev
root@mint:~# /usr/sbin/chroot /mnt /bin/bash
mint / # source /etc/profile
mint / # ls -lhd /lib/modules/*
drwxr-xr-x 6 root root 4.0K Nov 29  2015 /lib/modules/3.19.0-32-generic
drwxr-xr-x 5 root root 4.0K Jan 16  2018 /lib/modules/4.4.0-109-generic
drwxr-xr-x 5 root root 4.0K Mar 25  2018 /lib/modules/4.4.0-116-generic
drwxr-xr-x 5 root root 4.0K Jun 28 13:30 /lib/modules/4.4.0-128-generic
drwxr-xr-x 5 root root 4.0K Aug  7 13:24 /lib/modules/4.4.0-130-generic
drwxr-xr-x 5 root root 4.0K Sep 22 20:58 /lib/modules/4.4.0-134-generic
drwxr-xr-x 5 root root 4.0K Oct 14 19:59 /lib/modules/4.4.0-137-generic
drwxr-xr-x 5 root root 4.0K Nov 21 19:11 /lib/modules/4.4.0-139-generic
mint / # ls -lh /boot/{vmlin*,init*}
ls: cannot access /boot/init*: No such file or directory
-rw-r--r-- 1 root root 6.0M Nov 29  2015 /boot/vmlinuz-3.19.0-32-generic
-rw------- 1 root root 6.4M Jan 10  2018 /boot/vmlinuz-4.4.0-109-generic
-rw------- 1 root root 6.5M Feb 16  2018 /boot/vmlinuz-4.4.0-116-generic
-rw------- 1 root root 6.5M May 26  2018 /boot/vmlinuz-4.4.0-128-generic
-rw------- 1 root root 6.5M Nov  1 00:58 /boot/vmlinuz-4.4.0-139-generic
mint / # 
thanks again.
BeardedOne

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by BeardedOne »

Im guessing that from here perhaps it may look like this ?

Code: Select all

echo "nameserver 8.8.8.8" >> /etc/resolv.conf
export PS1="\[\033[1;33m\]chroot to ->\[\033[1;31m\](system) #\[\e[0m\] "
apt-get install linux-image-4.4.0-139-generic 
mkinitramfs -o /boot/initrd.img-4.4.0-139-generic 
reboot
WharfRat

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by WharfRat »

BeardedOne wrote: Sat Dec 15, 2018 9:05 pm Im guessing that from here perhaps it may look like this ?
Good guess - but you only need the initram as far as I can see mkinitramfs -o /boot/initrd.img-4.4.0-139-generic :wink:
BeardedOne

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by BeardedOne »

thanks WharfRat !
Oops !... I did that before it seems u edited your post. So I included all lines and the output is as follows...

Code: Select all

mint / # echo "nameserver 8.8.8.8" >> /etc/resolv.conf
mint / # export PS1="\[\033[1;33m\]chroot to ->\[\033[1;31m\](system) #\[\e[0m\] "
chroot to ->(system) # apt-get install linux-image-4.4.0-139-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-image-4.4.0-139-generic is already the newest version.
linux-image-4.4.0-139-generic set to manually installed.
The following packages were automatically installed and are no longer required:
  libwireshark3 libwireshark5 libwiretap3 libwiretap4 libwsutil3 libwsutil4
  linux-image-extra-4.4.0-109-generic linux-image-extra-4.4.0-116-generic
  linux-image-extra-4.4.0-128-generic linux-image-extra-4.4.0-130-generic
  linux-image-extra-4.4.0-134-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-4.4.0-139-generic (4.4.0-139.165~14.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-139-generic
vmlinuz(/boot/vmlinuz-4.4.0-139-generic
) points to /boot/vmlinuz-4.4.0-139-generic
 (/boot/vmlinuz-4.4.0-139-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-139-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic
Error! Bad return status for module build on kernel: 4.4.0-139-generic (x86_64)
Consult /var/lib/dkms/ndiswrapper/1.59/build/make.log for more information.
Error! Module version 5.0.4_LinuxMint for vboxguest.ko
is not newer than what is already found in kernel 4.4.0-139-generic (5.0.18_Ubuntu).
You may override by specifying --force.
Error! Module version 5.0.4_LinuxMint for vboxsf.ko
is not newer than what is already found in kernel 4.4.0-139-generic (5.0.18_Ubuntu).
You may override by specifying --force.
Error! Module version 5.0.4_LinuxMint for vboxvideo.ko
is not newer than what is already found in kernel 4.4.0-139-generic (5.0.18_Ubuntu).
You may override by specifying --force.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-139-generic
Warning: No support for locale: en_AU.utf8
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-139-generic
Found initrd image: /boot/initrd.img-4.4.0-139-generic
Found linux image: /boot/vmlinuz-4.4.0-128-generic
Found linux image: /boot/vmlinuz-4.4.0-116-generic
Found linux image: /boot/vmlinuz-4.4.0-109-generic
Found linux image: /boot/vmlinuz-3.19.0-32-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Setting up linux-image-extra-4.4.0-139-generic (4.4.0-139.165~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic
Error! Bad return status for module build on kernel: 4.4.0-139-generic (x86_64)
Consult /var/lib/dkms/ndiswrapper/1.59/build/make.log for more information.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-139-generic
Warning: No support for locale: en_AU.utf8
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-139-generic
Found initrd image: /boot/initrd.img-4.4.0-139-generic
Found linux image: /boot/vmlinuz-4.4.0-128-generic
Found linux image: /boot/vmlinuz-4.4.0-116-generic
Found linux image: /boot/vmlinuz-4.4.0-109-generic
Found linux image: /boot/vmlinuz-3.19.0-32-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Setting up linux-image-generic-lts-xenial (4.4.0.139.119) ...
Setting up linux-generic-lts-xenial (4.4.0.139.119) ...
chroot to ->(system) # mkinitramfs -o /boot/initrd.img-4.4.0-139-generic
grep: /boot/config-4.15.0-20-generic: No such file or directory
WARNING: missing /lib/modules/4.15.0-20-generic
Device driver support needs thus be built-in linux image!
depmod: ERROR: could not open directory /lib/modules/4.15.0-20-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
Warning: No support for locale: en_AU.utf8
depmod: WARNING: could not open /tmp/mkinitramfs_1anGQD/lib/modules/4.15.0-20-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_1anGQD/lib/modules/4.15.0-20-generic/modules.builtin: No such file or directory
chroot to ->(system) # 
maybe something like ?:
apt-get install config-4.15.0-20-generic

then maybe something like the following again ? :
mkinitramfs -o /boot/initrd.img-4.4.0-139-generic

Just almost total guesses :D

Thanks for your help WharfRat !
WharfRat

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by WharfRat »

Look at the list of ls -lh /boot/{vmlin*,init*}

For now try booting to any kernel that has a corresponding initrd.img
BeardedOne

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by BeardedOne »

Thanks WharfRat

I restarted the computer and went to the advanced boot options screen.
I first tried the compatibility (i think it is named) boot choice directly under the .139 kernel boot option.
It seemed to run very slowly through configuring the USB devices (1 per 60 seconds or so), then after 15 minutes or so, was left with a blank line with a prompt saying (intramfs)

I rebooted and chose the .139 kernel directly.
There was is a black screen with 4 green animated dots in the centre slowly flashing sequentially.
The HDD seemed to be silent and the hdd light was not coming on.
Then after 15 minutes or so, am now left with a black screen with some lines of code and a prompt saying (intramfs):

Not sure what to do ! please help !?
WharfRat

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by WharfRat »

From the chroot environment again did the initrd get built ls -lh /boot/initrd*

Is the module folder populated du -hs /lib/modules/4.4.0-139-generic/
BeardedOne

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by BeardedOne »

I think the answers are YES... but I guess this output will tell u 100%

Code: Select all

mint@mint:~$ sudo -i
root@mint:~# /sbin/cryptsetup luksOpen /dev/sda5  sda5_crypt
Enter passphrase for /dev/sda5: 
root@mint:~# mount /dev/mapper/mint--vg-root /mnt
root@mint:~# mount /dev/sda1 /mnt/boot
root@mint:~# mount -t proc none /mnt/proc
root@mint:~# mount --rbind /sys /mnt/sys
root@mint:~# mount --rbind /dev /mnt/dev
root@mint:~# /usr/sbin/chroot /mnt /bin/bash
mint / # source /etc/profile
mint / # ls -lh /boot/initrd*
-rw-r--r-- 1 root root 9.4M Dec 16 11:59 /boot/initrd.img-4.4.0-139-generic
mint / # du -hs /lib/modules/4.4.0-139-generic/
155M	/lib/modules/4.4.0-139-generic/
mint / # 
Thanks again
WharfRat

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by WharfRat »

It looks like it should boot :?

Try reinstalling the kernel

From the point you left off

apt-get install --reinstall linux-modules-4.4.0-139-generic linux-image-4.4.0-139-generic linux-modules-extra-4.4.0-139-generic linux-headers-4.4.0-139-generic
BeardedOne

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by BeardedOne »

Says it cant find it again !

Code: Select all

mint@mint:~$ sudo -i
root@mint:~# /sbin/cryptsetup luksOpen /dev/sda5  sda5_crypt
Enter passphrase for /dev/sda5: 
root@mint:~# mount /dev/mapper/mint--vg-root /mnt
root@mint:~# mount /dev/sda1 /mnt/boot
root@mint:~# mount -t proc none /mnt/proc
root@mint:~# mount --rbind /sys /mnt/sys
root@mint:~# mount --rbind /dev /mnt/dev
root@mint:~# /usr/sbin/chroot /mnt /bin/bash
mint / # source /etc/profile
mint / # ls -lh /boot/initrd*
-rw-r--r-- 1 root root 9.4M Dec 16 11:59 /boot/initrd.img-4.4.0-139-generic
mint / # du -hs /lib/modules/4.4.0-139-generic/
155M	/lib/modules/4.4.0-139-generic/
mint / # apt-get install --reinstall linux-modules-4.4.0-139-generic linux-image-4.4.0-139-generic linux-modules-extra-4.4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-modules-4.4.0-139-generic
E: Couldn't find any package by regex 'linux-modules-4.4.0-139-generic'
E: Unable to locate package linux-modules-extra-4.4
E: Couldn't find any package by regex 'linux-modules-extra-4.4'
mint / # echo "nameserver 8.8.8.8" >> /etc/resolv.conf
mint / # export PS1="\[\033[1;33m\]chroot to ->\[\033[1;31m\](system) #\[\e[0m\] "
chroot to ->(system) # apt-get install --reinstall linux-modules-4.4.0-139-generic linux-image-4.4.0-139-generic linux-modules-extra-4.4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-modules-4.4.0-139-generic
E: Couldn't find any package by regex 'linux-modules-4.4.0-139-generic'
E: Unable to locate package linux-modules-extra-4.4
E: Couldn't find any package by regex 'linux-modules-extra-4.4'
chroot to ->(system) # 
thanks again !
WharfRat

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by WharfRat »

What does apt search linux-image-4.4.0-139 and egrep -w 'RELEASE|CODENAME|EDITION|DESKTOP|TOOLKIT' /etc/linuxmint/info return :?:
BeardedOne

Re: Error file vmlinuz not found - (Pastebin Boot Info Script)

Post by BeardedOne »

it returns this:

Code: Select all

chroot to ->(system) # apt search linux-image-4.4.0-139
i   linux-image-4.4.0-139-generic   - Linux kernel image for version 4.4.0 on 32
p   linux-image-4.4.0-139-lowlatenc - Linux kernel image for version 4.4.0 on 32
chroot to ->(system) # egrep -w 'RELEASE|CODENAME|EDITION|DESKTOP|TOOLKIT' /etc/linuxmint/info
RELEASE=17.3
CODENAME=rosa
EDITION="Cinnamon 32-bit"
DESKTOP=Gnome
TOOLKIT=GTK
chroot to ->(system) #
Thx WharfRat !
Locked

Return to “Installation & Boot”