LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Grub 0.97 Boot issues from a different disk dual boot Debian / RHEL. (https://www.linuxquestions.org/questions/red-hat-31/grub-0-97-boot-issues-from-a-different-disk-dual-boot-debian-rhel-4175459724/)

gdizzle 04-26-2013 07:20 PM

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

Madhu Desai 04-27-2013 12:31 AM

Quote:

Originally Posted by gdizzle (Post 4939650)

root=569b9100-e26f-4247-88c8-c8bf0dc318a0

Code:

root=UUID=569b9100-e26f-4247-88c8-c8bf0dc318a0

gdizzle 04-27-2013 01:39 AM

Well spotted I will check that out and report back thanks!

gdizzle 04-28-2013 10:51 PM

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.


All times are GMT -5. The time now is 06:15 PM.