LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 12-29-2007, 09:53 AM   #1
xxx_anuj_xxx
Member
 
Registered: Jun 2004
Location: Bharat
Distribution: RedHat, Debian, FreeBSD, Fedora, Centos
Posts: 114

Rep: Reputation: 16
rhel5 dual boot installation- no grub at boot time.


Hi,
I had dual boot with rhel4 and windowsxp. I installed rhel5 by using edit of older partitions. Installation had no error. After reboot I have no grub.

sh-3.1# uname -a
Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 athlon i386 GNU/Linux

I tried rescue and then re-install grub but getting error.


sh-3.1# grub-install /dev/sda
/dev/sda does not have any corresponding BIOS drive.

partition table as follows.
sh-3.1# fdisk -l /dev/sda

Disk /dev/sda: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 4462 35840983+ 7 HPFS/NTFS
/dev/sda2 4463 4475 104422+ 83 Linux
/dev/sda3 4476 5750 10241437+ 83 Linux
/dev/sda4 5751 9733 31993447+ 5 Extended
/dev/sda5 5751 6387 5116671 83 Linux
/dev/sda6 6388 6642 2048256 82 Linux swap / Solaris
/dev/sda7 6643 6897 2048256 83 Linux
/dev/sda8 6898 7152 2048256 83 Linux
/dev/sda9 7153 7241 714861 83 Linux


I used grub-shell then which is giving me error of no such partition:

grub> root (hd0,1)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0,0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
Running "embed /grub/e2fs_stage1_5 (hd0,1)"... failed (this is not fatal)
Running "install /grub/stage1 (hd0,0) /grub/stage2 p /grub/grub.conf "... fail
ed

Error 22: No such partition


did ls and found vmlinuz,initrd and other /boot/ files at the right place.

I found my /boot/grub/grub.conf


#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd2,1)/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$EfjvUqFA$KRwo.7YS0pE0tkQqqJbnv/
title Red Hat Enterprise Linux Server (2.6.18-8.el5)
root (hd2,1)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.18-8.el5.img
title Other
rootnoverify (hd2,0)
chainloader +1

which says grub installed on my second hard disk. Whereas I deselected my two other hard disks during partitioning (I always follow this rule as I have important data on other hard disks.).

I can reinstall but...
1.Why it happened ?
2.Why am I getting error when I am trying to install grub on my first hard disk ? /dev/sda ?
3.How to resolve it, i.e. to install grub on my first hard disk?

Thanks and regards
Anuj singh "anugunj"

Last edited by xxx_anuj_xxx; 12-29-2007 at 09:54 AM.
 
Old 12-29-2007, 10:41 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
Try using rescue mode once again this time when ready to issue the grub-install command and maybe type:

grub-install --recheck /dev/sda

Check the current /boot/grub/device.map file to verify which drives are listed first. Also review your /boot/grub/grub.conf file top comment section does provide additional clues.
 
Old 12-29-2007, 11:41 AM   #3
xxx_anuj_xxx
Member
 
Registered: Jun 2004
Location: Bharat
Distribution: RedHat, Debian, FreeBSD, Fedora, Centos
Posts: 114

Original Poster
Rep: Reputation: 16
i have this information


sh-3.1# cat boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd2,1)
# kernel /vmlinuz-version ro root=/dev/mapper/pdc_cfabdbchhep8
# initrd /initrd-version.img
#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd2,1)/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$EfjvUqFA$KRwo.7YS0pE0tkQqqJbnv/
title Red Hat Enterprise Linux Server (2.6.18-8.el5)
root (hd2,1)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.18-8.el5.img
title Other
rootnoverify (hd2,0)
chainloader +1

sh-3.1# cat boot/grub/device.map
# this device map was generated by anaconda
(hd2) /dev/mapper/pdc_cfabdbchhe
(hd0) /dev/sdb
sh-3.1#


whereas my first disk is /dev/sda

and why grub-install failing to install on this device? errors are same in my previous post

Thanks and regards
Anuj Singh "anugunj"
 
Old 12-29-2007, 12:19 PM   #4
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
Hmmm...........

Try: grub-install --recheck /dev/sdb
(Based on the output from the device.map file)

You may want to check/verify what fdisk -l shows for all the drives.
 
Old 12-29-2007, 12:31 PM   #5
xxx_anuj_xxx
Member
 
Registered: Jun 2004
Location: Bharat
Distribution: RedHat, Debian, FreeBSD, Fedora, Centos
Posts: 114

Original Poster
Rep: Reputation: 16
hi,


sh-3.1# uname -a
Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 athlon i386 GNU/Linux

sh-3.1# grub-install --recheck /dev/sda
grub-install does not support reprobing of device.map when
using a device-mapper based boot device.


fdisk -l has.


Disk /dev/sda: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 4462 35840983+ 7 HPFS/NTFS
/dev/sda2 4463 4475 104422+ 83 Linux
/dev/sda3 4476 5750 10241437+ 83 Linux
/dev/sda4 5751 9733 31993447+ 5 Extended
/dev/sda5 5751 6387 5116671 83 Linux
/dev/sda6 6388 6642 2048256 82 Linux swap / Solaris
/dev/sda7 6643 6897 2048256 83 Linux
/dev/sda8 6898 7152 2048256 83 Linux
/dev/sda9 7153 7241 714861 83 Linux


Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1278 10265503+ c W95 FAT32 (LBA)
/dev/sdb2 1279 3834 20531070 c W95 FAT32 (LBA)
/dev/sdb3 3835 6390 20531070 c W95 FAT32 (LBA)
/dev/sdb4 6391 9729 26820517+ c W95 FAT32 (LBA)

Disk /dev/sdc: 150.0 GB, 150039945216 bytes
255 heads, 63 sectors/track, 18241 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 18240 146512768+ 7 HPFS/NTFS
 
Old 12-30-2007, 02:53 AM   #6
xxx_anuj_xxx
Member
 
Registered: Jun 2004
Location: Bharat
Distribution: RedHat, Debian, FreeBSD, Fedora, Centos
Posts: 114

Original Poster
Rep: Reputation: 16
ok,
I followed the dirty method now, unplugged my other disks and re-installation worked.
Unplugged other hard disks and re-installed whole OS. No answer yet why rhel5 installation's grub reached to other disk earlier which I deselected while partitioning.

New grub.conf is
#boot=/dev/mapper/pdc_cfabdbchhe
default=0
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$4.OrhaiC$SeGJ4DlzmC31y5zbd9Sb5.
title Red Hat Enterprise Linux Server (2.6.18-8.el5)
root (hd0,2)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-8.el5.img
title Other
rootnoverify (hd0,0)
chainloader +1


and /boot/grub/device.map is

# this device map was generated by anaconda
(hd0) /dev/mapper/pdc_cfabdbchhe


Regards
Anuj Singh.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Two hard disks - dual boot ( XP - Linux ) using microsoft boot loader, not grub cristy88 Linux - General 2 12-17-2007 06:26 PM
"Grub" is displayed in dual-boot dual-drive Win xp and Fedora 6 installation hanscom Linux - Newbie 10 02-28-2007 10:48 AM
Grub: Dual Boot/Installation Problems Gins Linux - General 13 10-30-2006 10:53 AM
Fedora Core 3 Dual Boot, Dual Hard drives, Grub Boot Loader Denali03 Linux - Newbie 1 03-04-2005 01:44 PM
Grub Dual Boot Mandrake 9.2 and Win2000 Invalid Boot Disk larsenmtl Linux - Newbie 1 02-01-2004 03:29 PM


All times are GMT -5. The time now is 02:53 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration