Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Running sudo apt-get -f install said that The link /vmlinuz.old is a damaged link and:

you may need to re-run your boot loader[grub]

Here's the full output:

user@chrubuntu:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.13.0-32 linux-headers-3.13.0-32-generic
  linux-image-3.13.0-32-generic linux-image-extra-3.13.0-32-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
user@chrubuntu:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-3.13.0-32 linux-headers-3.13.0-32-generic
  linux-image-3.13.0-32-generic linux-image-extra-3.13.0-32-generic
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 270 MB disk space will be freed.
Do you want to continue? [Y/n] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en
en",
    LC_ALL = (unset),
    LC_TIME = "en",
    LC_MONETARY = "en",
    LC_ADDRESS = "en",
    LC_TELEPHONE = "en",
    LC_NAME = "en",
    LC_MEASUREMENT = "en",
    LC_IDENTIFICATION = "en",
    LC_NUMERIC = "en",
    LC_PAPER = "en",
    LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 232120 files and directories currently installed.)
Removing linux-headers-3.13.0-32-generic (3.13.0-32.57) ...
Removing linux-headers-3.13.0-32 (3.13.0-32.57) ...
Removing linux-image-extra-3.13.0-32-generic (3.13.0-32.57) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-32-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old 
 you may need to re-run your boot loader[grub]
Removing linux-image-3.13.0-32-generic (3.13.0-32.57) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-32-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old 
 you may need to re-run your boot loader[grub]
user@chrubuntu:~$

How do I re-run the boot loader?

share|improve this question
    
I get the same issue when I use apt-get autoremove, but as the Eliah Kagan says in his answer grub seems to work fine on reboot. –  Mark Mikofski Apr 10 at 0:44

2 Answers 2

According to womble's answer to Damaged /vmlinuz and /initrd.img symbolic links after Kernel uninstall (on Server Fault), you don't have to do anything in this situation when your boot loader is GRUB/GRUB2—which it is, here.

For some other boot loaders (at least LILO), it is/was apparently sometimes necessary to manually run the boot loader's configuration.

If you did need to tell GRUB to check for existing kernels and update its configuration, running sudo update-grub would do so. And there's no harm in running that. But it shouldn't be necessary in this case.

share|improve this answer
    
ok i ran them thou –  TevinYoungz Sep 2 '14 at 2:57
    
@TevinYoungz That's fine. sudo update-grub shouldn't do any harm. –  Eliah Kagan Sep 2 '14 at 3:00
4  
The word "sometimes" is an understatement. –  Simon Richter Sep 2 '14 at 4:35
1  
In think that this pair of error and the resolution could receive a prize for the most stupid design mistakes: having a grub command that is named update-grub instead of grub-update which is logical and failing to specify the fix (command) that works in 99.99% of cases. –  sorin Jul 7 at 13:22

The error is a bit odd in case of grub.

When apt installs a new kernel-version, it moves /vmlinuz and /initrd.img to /vmlinuz.old and /initrd.img.old (Which then are still pointing to the currently active kernel. Again, notice the .old extension, which is different from the story linked in "Damaged links after kernel uninstall") and creates two new files /vmlinuz /initrd.img.

When you run apt-get autoremove (the messages weren't generated by apt-get -f install) it removes that previously active kernel (you rebooted after that install, before running autoremove, right?), which makes the links invalid.

When the removal of the kernel itself done, the autoremove itself invokes update-grub:

run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic

Hence:

The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old 
 you may need to re-run your boot loader[grub]

So, autoremove does:

  1. remove old kernel
  2. run update-grub
  3. update-grub removes .old files which linked to removed files.

Nothing to worry about :-)

Regards.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.