LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Debian update removed ubuntu from grub (https://www.linuxquestions.org/questions/linux-software-2/debian-update-removed-ubuntu-from-grub-4175446325/)

esfahan2000 01-19-2013 08:27 AM

Debian update removed ubuntu from grub
 
Hi
I have Debian 6 and Ubuntu 10:10.
after installing debian.I upgrade my debian (its kernel upgraded to 2.6.32-5-686).after that i cant see my ubuntu 10:10 in grub.
this is the output of update-grub command:
Code:

root@Debian:~# update-grub
Generating grub.cfg ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-2.6.32-5-686
Found initrd image: /boot/initrd.img-2.6.32-5-686
Found Ubuntu 10.10 (10.10) on /dev/sda11
done

it find's the ubuntu but after reboot is'nt in grub
thanks

towheedm 01-19-2013 08:59 PM

Could you post the output of:
Code:

$ grep -1 ^menuentry /boot/grub/grub.cfg

k3lt01 01-19-2013 10:22 PM

Make sure os-prober is installed in Debian. If it isn't install it and update grub. You will find Ubuntu will probably reappear in Grub then. Also Ubuntu 10.10 is out of support and it is a possible security risk for you. I would recommend you update to a supported version of Ubuntu.

esfahan2000 01-20-2013 12:40 AM

Quote:

Originally Posted by towheedm (Post 4873832)
Could you post the output of:
Code:

$ grep -1 ^menuentry /boot/grub/grub.cfg

this is the output:
Code:

root@Debian:~# grep -1 ^menuentry /boot/grub/grub.cfg
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686' --class debian --class gnu-linux --class gnu --class os {
        insmod part_msdos
--
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
        insmod part_msdos


esfahan2000 01-20-2013 12:41 AM

Quote:

Originally Posted by k3lt01 (Post 4873857)
Make sure os-prober is installed in Debian. If it isn't install it and update grub. You will find Ubuntu will probably reappear in Grub then. Also Ubuntu 10.10 is out of support and it is a possible security risk for you. I would recommend you update to a supported version of Ubuntu.

Yes it's installed in my system....

k3lt01 01-20-2013 03:10 PM

Are you able to get into your Ubuntu system using Nautilus in Debian? By this I mean can you see there is another partition and can you mount it and see the file system in there.

Have you tried Super Grub Disk?

towheedm 01-20-2013 08:36 PM

Your output from /boot/grub/grub.cfg does not show an entry for your Ubuntu installation. That's why it's not on your menu.

Also, the fact that it shows up as detected in the update-grub output indicates that os-prober is seeing an Ubuntu installation. It may be that linux-boot-prober is not seeing any kernel in your Ubuntu installation. Run this command and post the output:
Code:

sudo linux-boot-prober /dev/sda11
This should return all vmlinuz and initramfs files found on /dev/sda11.

Alternatively, you can mount /dev/sda11 and manually look for the presence of those files:
Code:

sudo mkdir /mnt/ubuntu
sudo mount /dev/sda11 /mnt/ubuntu
ls /mnt/ubuntu/boot/{vmlinux,init}*    # Or, if it returns an error, try
ls /mnt/ubuntu/{vmlinuz,init}*
sudo umount /mnt/ubuntu

In either case, post your output.

BTW: Did you try running update-grub again to see if it works? I just tried it in a VM and it did not pick up the Ubuntu installation initially. However, after mounting and unmounting my Ubuntu partition and re-running update-grub, it worked. I have not looked at why it happened because my grub, os-prober and linux-boot-prober are heavily modified, so that could be why. Anyway, it sure won't hurt to re-run update-grub and see if that helps.

k3lt01 01-20-2013 08:59 PM

Something is drastically wrong. I'd try this
Code:

update-grub
note the ouput and copy it down into a txt file. Then
Code:

mount /dev/sda11 /mnt
update-grub

copy it down as above and compare the two, reboot and see how it goes. Theory, based on towheedm's post above, is that mounting sda11 may help Grub to find Ubuntu. I've seen it happen once before.

@ towheedm, I've never heard of linux-boot-prober so will go and do some reading to enlighten myself even further.

towheedm 01-20-2013 09:56 PM

os-prober and linux-boot-prober work together.

os-prober probes your drives for others OSes such as other Linux installs, Windows, Gnu/Hurd, MacOS etc. If other Linux installation(s) are found, linux-boot-prober probe those partitions for their kernels and/or initramfs files.

You can look at the /etc/grub.d/30_os-prober script for an idea on how they work together.


All times are GMT -5. The time now is 01:55 PM.