LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 04-26-2013, 07:20 PM   #1
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Rep: Reputation: Disabled
Grub 0.97 Boot issues from a different disk dual boot Debian / RHEL.


Hi there,
I have Vm with Debian 6.07 Installed on the first hard disk : /dev/sda which is a 40gb disk.

On the second disk which is a 16gb disk /dev/sdb, I have installed Redhat Enterprise Linux 6.1.

Code:
[root@maz01 ~]# fdisk -l Disk /dev/sda: 42.9 GB, 42949672960 bytes 
255 heads, 63 sectors/track, 5221 cylinders 
Units = cylinders of 16065 * 512 = 8225280 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disk identifier: 0x000a5254 

Device    Boot Start   End     Blocks        Id   System 

/dev/sda1 *    1       5004    40190976      83   Linux 
/dev/sda2      5004    5222    1748993       5    Extended 
/dev/sda5      5004    5222    1748992       82   Linux swap / Solaris Disk 


/dev/sdb: 17.2 GB, 17179869184 bytes 
255 heads, 63 sectors/track, 2088 cylinders 
Units = cylinders of 16065 * 512 = 8225280 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disk identifier: 0x0009cc30 

Device    Boot Start   End     Blocks        Id   System 

/dev/sdb1 *     1      26       204800        83    Linux 
Partition 1 does not end on cylinder boundary. 
/dev/sdb2       26     1811     14336000      83    Linux
However now I can only boot my computer to Redhat 6.1 Linux and I cannot see Debian anywhere. This is becuase I installed the RHEL boot loader on /dev/sda which has overwritten the Debian boot loader GRUB. As RHEL is located on /dev/sdb.

Why did I do this? I am trying to learn and troubleshoot Grub 0.97. Why? Because it's still in use!

So I modified the GRUB from the Redhat Installation:

So I booted into the Redhat Installation:

Mounted the Debian disk:

Code:
[root@maz01 ~]# mkdir -p /mnt/debian 
[root@maz01 ~]# mount /dev/sda1 /mnt/debian/ 

[root@maz01 ~]# cd /mnt/debian/boot/ 

[root@maz01 boot]# ll

total 13248 
-rw-r--r--. 1 root root 106193 Feb 16 06:18  config-2.6.32-5-amd64 
drwxr-xr-x. 3 root root 4096 Apr 26 12:27 grub 
-rw-r--r--. 1 root root 9325922 Apr 26 12:25 initrd.img-2.6.32-5-amd64 
-rw-r--r--. 1 root root 1667857 Feb 16 06:18 System.map-2.6.32-5-amd64 
-rw-r--r--. 1 root root 2426464 Feb 16 06:09 vmlinuz-2.6.32-5-amd64 

blkid /dev/sda1 : UUID="569b9100-e26f-4247-88c8-c8bf0dc318a0" TYPE="ext3"
got the details:

Now to edit the RHEL Grub Menu:

Code:
vim /boot/grub/menu.lst 

#boot=/dev/sda 
default=0 timeout=5 splashimage=(hd1,0)/grub/splash.xpm.gz 
	hiddenmenu title Red Hat Enterprise Linux (2.6.32-131.0.15.el6.x86_64) 
	root (hd1,0) kernel /vmlinuz-2.6.32-131.0.15.el6.x86_64 ro root=UUID=50b14f5b-18f7-4f5d-9309-71376cb95b2e rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet 
        initrd /initramfs-2.6.32-131.0.15.el6.x86_64.img 
        title Debian Linux 	       
        root (hd0,0) kernel /vmlinuz-2.6.32-5-amd64 ro root=569b9100-e26f-4247-88c8-c8bf0dc318a0 
	initrd /initrd.img-2.6.32-5-amd64
rebooted the machine.

Instead I get error 15: File not found Press any key to continue.

It's like GRUB is have an issue identifying the other disk.

Code:
cat /boot/grub/device.map
= I will paste the output when I get near the system again but this was fine.

I tried the "map" option in GRUB:


Code:
vim /boot/grub/menu.lst 

#boot=/dev/sda 
default=0 timeout=5 splashimage=(hd1,0)/grub/splash.xpm.gz 
	hiddenmenu title Red Hat Enterprise Linux (2.6.32-131.0.15.el6.x86_64) 
	root (hd1,0) kernel /vmlinuz-2.6.32-131.0.15.el6.x86_64 ro root=UUID=50b14f5b-18f7-4f5d-9309-71376cb95b2e rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet 
        initrd /initramfs-2.6.32-131.0.15.el6.x86_64.img 
        title Debian Linux 
        map (hd0)(hd1)
        map (hd1)(hd0)	       
        root (hd0,0) kernel /vmlinuz-2.6.32-5-amd64 ro root=569b9100-e26f-4247-88c8-c8bf0dc318a0 
	initrd /initrd.img-2.6.32-5-amd64
Now I am aware, I could:

Update grub 0.97 to to Grub 1.99 and run the update-grub command which would launch the OS Prober script and discover the Debian Install and add it automatically into the GRUB Menu.

However I am trying to troubleshoot this issue from a Grub 0.97 perspective since RHEL and Centos still use it.

I did open a case with Redhat and there answer was:

"If there is any workaround to this issue, it will be out of our scope of coverage as this is an unsupported issue"

Has anyone came into this kind of scenario, where an older GRUB verison has installed over a newer GRUB and the installation of the OS's are on seperate disks and got it working?

Or is there anything obvious above I have missed?

Thanks
 
Old 04-27-2013, 12:31 AM   #2
Madhu Desai
Member
 
Registered: Mar 2013
Distribution: Rocky, Fedora, Ubuntu
Posts: 541

Rep: Reputation: 153Reputation: 153
Quote:
Originally Posted by gdizzle View Post

root=569b9100-e26f-4247-88c8-c8bf0dc318a0
Code:
root=UUID=569b9100-e26f-4247-88c8-c8bf0dc318a0
 
Old 04-27-2013, 01:39 AM   #3
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Original Poster
Rep: Reputation: Disabled
Well spotted I will check that out and report back thanks!
 
Old 04-28-2013, 10:51 PM   #4
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Original Poster
Rep: Reputation: Disabled
Thanks for your help mddesai, you put me on the right path to fix this.

The situation is did a cheap and nasty quick install of Debian:

/dev/sda1 : This wasn't an actual /boot partition the it was the entire /root partition. So the Kernel and the Initrd has a symlink from the / partition to the /boot partition.


The symlink for the Kernel and the Initrd was labeled:

initrd.img -> boot/initrd.img-2.6.32-5-amd64
vmlinuz -> boot/vmlinuz-2.6.32-5-amd64


Code:
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux (2.6.32-131.0.15.el6.x86_64)
        root (hd1,0)
        kernel /vmlinuz-2.6.32-131.0.15.el6.x86_64 ro root=UUID=50b14f5b-18f7-4f5d-9309-71376cb95b2e rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-131.0.15.el6.x86_64.img
title Debian Linux
        root (hd0,0)
        kernel /vmlinuz ro root=UUID=569b9100-e26f-4247-88c8-c8bf0dc318a0
        initrd /initrd.img

All is good now.
 
  


Reply



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
[SOLVED] Grub menu not coming; XP & RHEL Dual boot vikas027 Linux - Newbie 5 10-15-2007 11:12 PM
grub issues: dual boot Debian i386 & Debian amd64 ErrorBound Debian 1 03-09-2007 07:41 PM
Dual boot issues… Not SuSE, but Grub… LinuxHawk Linux - General 1 11-06-2004 10:41 PM
GRUB and dual disk boot. matgorb Linux - Software 2 09-08-2004 12:00 PM
Grub Dual Boot Mandrake 9.2 and Win2000 Invalid Boot Disk larsenmtl Linux - Newbie 1 02-01-2004 03:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:49 AM.

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