LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2013, 04:58 AM   #1
mirzasoltan
LQ Newbie
 
Registered: Oct 2010
Posts: 28

Rep: Reputation: 0
grub problem


hi everyone,

i had Fedora 15, and Centos 5.5 in my pc, fedora in a hard disk (/dev/sda) and centos in another hard disk (/dev/sdb)
i add third hard disk (/dev/sdc) and install ubuntu 10.4 in it. after installing ubuntu, centos gone from grub list, in grub there is just ubuntu and fedora.

how can i fix it?!
i try grub recovery and just found ubuntu and fedora, not centos.
tanx.
 
Old 08-06-2013, 05:04 AM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Try mounting centos partitions & running update-grub
 
1 members found this post helpful.
Old 08-06-2013, 05:24 AM   #3
mirzasoltan
LQ Newbie
 
Registered: Oct 2010
Posts: 28

Original Poster
Rep: Reputation: 0
root@ardaneh-ubuntu:~# mkdir /media/centos
root@ardaneh-ubuntu:~# mount /dev/sdb2 /media/centos/
root@ardaneh-ubuntu:~# ls /media/centos/
bin boot dev etc home lib lost+found media misc mnt opt poweroff proc root sbin selinux srv sys tftpboot tmp usr var
root@ardaneh-ubuntu:~# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-50-generic-pae
Found initrd image: /boot/initrd.img-2.6.32-50-generic-pae
Found memtest86+ image: /memtest86+.bin
Found Fedora release 15 (Lovelock) on /dev/sda2
Found CentOS release 5.9 (Final) on /dev/sdb2
done
root@ardaneh-ubuntu:~# cat /boot/grub/grub.cfg
...
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-50-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd2,1)'
search --no-floppy --fs-uuid --set c7f7ea49-4178-404b-8460-2d723ecc2c38
linux /vmlinuz-2.6.32-50-generic-pae root=UUID=6909eb58-c9fe-469c-808c-0f5685bba641 ro quiet splash
initrd /initrd.img-2.6.32-50-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.32-50-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd2,1)'
search --no-floppy --fs-uuid --set c7f7ea49-4178-404b-8460-2d723ecc2c38
echo 'Loading Linux 2.6.32-50-generic-pae ...'
linux /vmlinuz-2.6.32-50-generic-pae root=UUID=6909eb58-c9fe-469c-808c-0f5685bba641 ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-50-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd2,1)'
search --no-floppy --fs-uuid --set c7f7ea49-4178-404b-8460-2d723ecc2c38
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd2,1)'
search --no-floppy --fs-uuid --set c7f7ea49-4178-404b-8460-2d723ecc2c38
linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Fedora (2.6.40.6-0.fc15.x86_64) (on /dev/sda2)" {
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set e889a008-6616-4388-a1ed-fc9e2b8b35b0
linux /vmlinuz-2.6.40.6-0.fc15.x86_64 ro root=UUID=82b3a603-bbb9-4c45-bd36-e899592576e4 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.40.6-0.fc15.x86_64.img
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
root@ardaneh-ubuntu:~#


Centos detected but dont add in grub.cfg list.
 
Old 08-06-2013, 07:03 AM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
root@ardaneh-ubuntu:~# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-50-generic-pae
Found initrd image: /boot/initrd.img-2.6.32-50-generic-pae
Found memtest86+ image: /memtest86+.bin
Found Fedora release 15 (Lovelock) on /dev/sda2
Found CentOS release 5.9 (Final) on /dev/sdb2
done
It shows detected have you rebooted?
 
1 members found this post helpful.
Old 08-06-2013, 07:30 AM   #5
mirzasoltan
LQ Newbie
 
Registered: Oct 2010
Posts: 28

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by EDDY1 View Post
It shows detected have you rebooted?
yes, i do it many times after "update-grub" from ubuntu/terminal and from ubuntu recovery mode, but every time i reboot in grub just ubuntu, ubuntu recovery, memory test and fedora appear. there is no line for centos.
 
Old 08-06-2013, 08:59 AM   #6
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

the first thing you noticed was that your menu was missing a detected OS
but notice that the first entries are for ubuntu
---so you must have have booted into ubuntu or you must have had ubuntu install its grub into MBR of something and take over.

Ideally as each drive has a mbr......but we don't know your bios boot order.....I suggest you want fedora on sda to be the controlling grub?

so try manual commands to get in

at grub menu press C for commands
Code:
set root=(hd0,2)
linux /boot/vml (and press TAB key to autocomplete kernel name,
----you must see something that resembles fedora or I have it wrong so don't continue this way
(lets pretend)
linux /boot/vmlinuz-fedora root=/dev/sda2
initrd /boot/init (and press TAB key to auto complete and choose the matching k to initrd numbers
boot
you have just booted into fedora....assuming grub2 now fix up fedora grub2

Code:
sudo grub-install /dev/sda
re-puts fedora's grub into mbr of sda

may or may not find the other 2 OS but I assume you have os-prober installed in fedora

good luck

#####
set root=(hd0,2) tells grub to look for fedora's /boot partition at hd0,2
if you have a separate /boot partition to / for fedora then change it twice
once for the set root command and drop the leading /boot from the linux and initrd line
 
1 members found this post helpful.
Old 08-06-2013, 09:00 AM   #7
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
if you have some weird partition type you need to tell us....as we may need to insmod <module> for strange partition type
 
1 members found this post helpful.
Old 08-06-2013, 10:07 AM   #8
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,672

Rep: Reputation: 486Reputation: 486Reputation: 486Reputation: 486Reputation: 486
I'm having the same problem after installing Ubuntu 12.04 which has re-written the Grub config files and my Centos system is missing. It may be because Centos uses LVM and I've got it installed over an 8 disk RAID (Yes, I know, total overkill and pointless.) The volume shows up as /dev/cciss0 or something, it's on an HP SmartArray.

The last time I got it working, I had to manually "knit" the 40_custom file to get it to be recognised. So far it gives me "Centos" as a boot option but can't find the kernel. (It was 01:00 this morning when I gave up so I've still a bit of work to do.) I had to define the Root volume by its UUID which worked last time.

Interesting that your system acknowledgd that you had Centos as a choice, mine never has.

I shall watch this post with interest...

Play Bonny!

 
1 members found this post helpful.
Old 08-08-2013, 01:09 AM   #9
mirzasoltan
LQ Newbie
 
Registered: Oct 2010
Posts: 28

Original Poster
Rep: Reputation: 0
tanx everyone for all of your suggestion,
i can not use them but i learn many things
i finally replace ubuntu 12.04.2 Desktop edition with ubuntu 10.4 and my problem solved.
now in grub i have ubuntu, fedora and centos together.

good luck everyone.
 
Old 08-08-2013, 09:10 AM   #10
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by mirzasoltan View Post
tanx everyone for all of your suggestion,
i can not use them but i learn many things
i finally replace ubuntu 12.04.2 Desktop edition with ubuntu 10.4 and my problem solved.
now in grub i have ubuntu, fedora and centos together.

good luck everyone.
It's great to know that
you haveit worked out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
12.4 new install grub 2 boot problem with grub put on it's own partition not on MBR james2b Ubuntu 14 12-07-2012 09:34 AM
Problem with GRUB: partition not found. Grub Rescue?? genoboss Ubuntu 117 01-04-2011 07:56 PM
Installing GRUB in another disk problem, GRUB Hangs in boot caosxxi Linux - General 7 08-26-2009 01:55 PM
installing GRUB 2, grub-install problem r00tb33r Linux - Software 1 02-26-2007 09:42 PM
Grub setup problem (/boot/grub/stage1 not found) davidas Debian 2 04-28-2004 08:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration