5

I have recently noticed that four new files have appeared in my / directory:

lrwxrwxrwx   1 root root    33 Apr  9 14:07 initrd.img -> boot/initrd.img-3.16.0-34-generic
lrwxrwxrwx   1 root root    33 Mar 23 19:42 initrd.img.old -> boot/initrd.img-3.16.0-33-generic
lrwxrwxrwx   1 root root    30 Apr  9 14:07 vmlinuz -> boot/vmlinuz-3.16.0-34-generic
lrwxrwxrwx   1 root root    30 Mar 23 19:42 vmlinuz.old -> boot/vmlinuz-3.16.0-33-generic

As I have not seen them there before I was wondering what they are and why they are now there. So I was wondering if someone could explain this to me?


OS Information:

Description:    Ubuntu 14.10
Release:    14.10
2
  • I'm pretty sure you have seen them before, but simply failed to notice them. If they weren't present, or were broken links, I'd be concerned.
    – muru
    Apr 22, 2015 at 13:49
  • Muru is right. They are there. They are links to the boot files, and should be left alone.
    – Terrance
    Apr 22, 2015 at 13:51

2 Answers 2

3

Well, they are symbolic links and, as muru said, probably they have been there all the time but you just didn't notice them.

This answer in Ubuntu Forums explains pretty well why they're there:

Let's look at a grub config entry in /boot/grub/grub.cfg:

menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menu
entry_id_option 'gnulinux-simple-blahblahblah' {
        [...]
        linux   /boot/vmlinuz-3.16.0-28-generic.efi.signed root=UUID=blahblahblah ro  quiet splash $vt_handoff
        initrd  /boot/initrd.img-3.16.0-28-generic
}

You don't need those symlinks if you always boot from this grub.cfg. If you are ever manually pointing grub to a boot, 'vmlinuz' is a lot easier to remember and type than '/boot/vmlinuz-3.16.0-28-generic' The symlinks are a legacy from simpler booting times, but still occasionally very handy. You can delete the symlinks if you wish, but they will be recreated the next time grub updates it's grub.cfg file.

Lots of stuff gets updated automatically whenever you install a new kernel, including your initrd.img and grub.cfg...and those symlinks.

More info about vmlinuz and initrd.

0

They are soft links to file in /boot mount point

1 root root 33 Apr 9 14:07 initrd.img -> boot/initrd.img-3.16.0-34-generic

initrd stands for Initial RAM Disk. initrd is used by kernel as temporary root file system until kernel is booted and the real root file system is mounted. It also contains necessary drivers compiled inside, which helps it to access the hard drive partitions, and other hardware.

lrwxrwxrwx 1 root root 33 Mar 23 19:42 initrd.img.old -> boot/initrd.img-3.16.0-33-generic

This is old version before updating

lrwxrwxrwx 1 root root 30 Apr 9 14:07 vmlinuz -> boot/vmlinuz-3.16.0-34-generic

This is current kernel you can check with "uname -r" command

lrwxrwxrwx 1 root root 30 Mar 23 19:42 vmlinuz.old -> boot/vmlinuz-3.16.0-33-generic

This is old version of kernel before updating to current version

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy