7

After a recent update, I get multiple entries for same linux kernel version in the boot menu. I have tried running update-grub2 but it also lists the same linux-image version twice i.e

adnan@adnan-laptop:/boot$ sudo update-grub2
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-26-generic
Found initrd image: /boot/initrd.img-2.6.32-26-generic
Found Windows 7 (loader) on /dev/sda1
Found linux image: /boot/vmlinuz-2.6.32-26-generic
Found initrd image: /boot/initrd.img-2.6.32-26-generic
Found memtest86+ image: /boot/memtest86+.bin
done

As you can see vmlinuz and initrd are found multiple times. But there is only one vmlinuz and initrd file in /boot

adnan@adnan-laptop:/boot$ ls -l
total 15120
-rw-r--r-- 1 root root  646144 2010-11-24 15:58 abi-2.6.32-26-generic
-rw-r--r-- 1 root root  110601 2010-11-24 15:58 config-2.6.32-26-generic
drwxr-xr-x 3 root root    4096 2011-01-01 18:59 grub
-rw-r--r-- 1 root root 8335528 2010-12-20 23:36 initrd.img-2.6.32-26-generic
-rw-r--r-- 1 root root  160280 2010-03-23 14:40 memtest86+.bin
-rw-r--r-- 1 root root 2156100 2010-11-24 15:58 System.map-2.6.32-26-generic
-rw-r--r-- 1 root root    1336 2010-11-24 16:00 vmcoreinfo-2.6.32-26-generic
-rw-r--r-- 1 root root 4050080 2010-11-24 15:58 vmlinuz-2.6.32-26-generic

Can some one tell me why does update-grub2 finds vmlinuz and initrd twice? and how to stop this from happening.

UPDATE: Find grub.cfg here

6
  • 1
    The command is update-grub and not update-grub2 i guess.Could you post the contents of grub.cfg ? Also have you created any custom grub files in /etc/grub.d ?
    – karthick87
    Jan 1, 2011 at 18:02
  • 1
    @karthick87 update-grub2 is just a wrapper for update-grub, so it shouldn't make any difference.
    – htorque
    Jan 1, 2011 at 19:21
  • 1
    Thankyou @htorque i have never used that command,that is why i am confused.
    – karthick87
    Jan 1, 2011 at 19:23
  • binW, I think you have to run: ls -la /etc/grub.d, because you may have there two ##_linux file. These scripts looks for OS-s when you update grub. Update your question with that output!
    – antivirtel
    Jan 2, 2011 at 14:58
  • Yes. After posting the grub.cfg file I analysed it my self too and found that there are two *_linux files. So I changed permission for 10_linux to not-executable. After that I ran update-grub and it fixed the problem but I still dont know how I got two ##_linux files there. I didnt have that problem before the update.
    – binW
    Jan 2, 2011 at 15:08

1 Answer 1

4

How I thought, you had two linux image finder in /etc/grub.d, remove one, the right list is:

00_header 
05_debian_theme 
10_linux 
20_memtest86+ 
30_os-prober 
40_custom

These scripts looks for OS-s when you update the grub.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .