• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 365
  • Last Modified:

Dual Redhat boot in Thinkpad

Configuration:  Thinkpad A22m,  two drives with Redhat (almost identical).

Q:  I'm trying to get the Grub.conf configured so that I can boot both redhat installs  from the boot drive.  In short, I've got two drives that were independantly built with Redhat RHEL 3 (identically), I put the 2nd drive in the IBM "ultra bay" and boot but of course grub doesn't have a menu item for  the 2nd drive.  Also, when I boot into linux on /dev/hda,  I type fdisk -l /dev/hdb  and it doesn't return anything.

[root@morocco ]# fdisk -l /dev/hda

Disk /dev/hda: 48.0 GB, 48004669440 bytes
240 heads, 63 sectors/track, 6201 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      3761  28433128+   7  HPFS/NTFS
/dev/hda2          4803      6063   9533160   83  Linux
/dev/hda3          6064      6201   1043280   82  Linux swap
/dev/hda4          4722      4802    612360    f  Win95 Ext'd (LBA)
/dev/hda5          4722      4802    612328+   b  Win95 FAT32

Partition table entries are not in disk order
[root@morocco ]# fdisk -l /dev/hdb
[root@morocco ]#

=> GRUB.CONF <=

splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Linux Client (2.4.21-20.EL)
        root (hd0,1)
        kernel /boot/vmlinuz-2.4.21-20.EL ro root=LABEL=/ rhgb hdc=ide-scsi
        initrd /boot/initrd-2.4.21-20.EL.img
title Microsoft Windows XP Professional
        rootnoverify (hd0,0)
        chainloader +1


Any suggestions? any issues with doing this ?
0
NYCmitch25
Asked:
NYCmitch25
  • 6
  • 4
1 Solution
 
NYCmitch25Author Commented:
Also I added the last line to the /boot/grub/device.map file to little avail.

# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/hda
(hd1)     /dev/hdb
~                        
0
 
NYCmitch25Author Commented:
Seemingly I have the correct configuration here.. maybe I have a problem with the BIOS ?
I put a pause in there and it clearly picks the correct  stuff from what I can tell.. However, it proceeds to boot the first drive only (still)...  

title Linux Client (2.4.21-20.EL) (HDB)
        root (hd1,0)
        kernel (hd1,0)/boot/vmlinuz-2.4.21-20.EL ro root=LABEL=/ rhgb hdc=ide-scsi
        initrd (hd1,0)/boot/initrd-2.4.21-20.EL.img
        pause  start now!^G!!
        boot




0
 
wesly_chenCommented:
> put the 2nd drive in the IBM "ultra bay"
> fdisk -l /dev/hdb  
Could you try "fdisk -l /dev/sda" since the second drive is not connect to internal IDE bus?
Besides, how the second disk show up in BIOS?

Wesly
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
NYCmitch25Author Commented:
put the 2nd drive in the IBM "ultra bay"
> fdisk -l /dev/hdb  
Could you try "fdisk -l /dev/sda" since the second drive is not connect to internal IDE bus?
Besides, how the second disk show up in BIOS?
 ------------------------------

[root@morocco ]# fdisk -l /dev/sda
[root@morocco ]#

It doesn't show up in the BIOS (sh***y IBM bios never shows each drive) .  I guess I  should explain the drive bay a little more  --   basically you plug in the second drive (without using any jumpers) and it works as a 2nd drive on the IDE bus with no issues. It's a direct connection to the IDE secondary bus because it replaces the CDROM (thus needs no jumpers).  Its great to use if you need to clone drives or migrate data.  

* PROOF BIOS Sees the drive *
 I  booted grub and used the command line options where I typed     root (      then pressed TAB key and it showed     fd0 hd0 hd1     then I  typed hd1  and pressed TAB again and it showed     0 1   which accurately described the 2nd drive.  Also when I  boot with my config above.  it finds the  Kernel and img file and starts those, however, it jumps back to the first drive for some reason and continues...  

Could there be somthing in the startup that tells it to point to hda which is why it's switching back ?
0
 
wesly_chenCommented:
> It's a direct connection to the IDE secondary bus
For the secondary IDE, it should be /dev/hdc or /dev/hdd.
Try
# fdisk -l /dev/hdc (or /dev/hdd)

Wesly
0
 
NYCmitch25Author Commented:
Try
# fdisk -l /dev/hdc (or /dev/hdd)
-----------------

Now if I just typed fdisk -l , shouldn't it have showed me the other drive anyways ?  In other words, it will never show me the drive right ?  anyway, I don't know it it matters that the 1st machin doesn't see the second, I'm not trying to mount it.  Want I want is for grub to boot from it which from what I can tell does see the 2nd drive but doesnt correctly boot from it.

[root@morocco ]# fdisk -l /dev/hdc
[root@morocco ]# fdisk -l /dev/hdd
[root@morocco ]#
0
 
wesly_chenCommented:
> Want I want is for grub to boot from it which from what I can tell does see the 2nd drive but doesnt correctly boot from it.
If the Linux on the first drive can not see the second drive , then how can grub on the frist drive see the second drive?
Without seeing the second drive, how can grub boot from the second drive?
So the first thing is make sure that Linux can see the second drive. (which drive letter)
Then you can put the right information into /boot/grub/device.map and /etc/grub.conf.

Please do
# dmesg | grep -i sector
and post result.

Wesly
0
 
NYCmitch25Author Commented:
I guess I thought that if grub reconized the drive Linux didn't have to... Anyway ..  here's the info I got :

[root@morocco ]# dmesg | grep -i sector
hda: 93759120 sectors (48005 MB) w/1806KiB Cache, CHS=6201/240/63, UDMA(33)
 hdc:end_request: I/O error, dev 16:00 (hdc), sector 0
end_request: I/O error, dev 16:00 (hdc), sector 2
end_request: I/O error, dev 16:00 (hdc), sector 4
end_request: I/O error, dev 16:00 (hdc), sector 6
end_request: I/O error, dev 16:00 (hdc), sector 0
end_request: I/O error, dev 16:00 (hdc), sector 2
end_request: I/O error, dev 16:00 (hdc), sector 4
end_request: I/O error, dev 16:00 (hdc), sector 6
0
 
wesly_chenCommented:
>  hdc:end_request: I/O error, dev 16:00 (hdc), sector 0
> end_request: I/O error, dev 16:00 (hdc), sector 2
From the error messages show that the Linux can not recognize second disk in the IBM "ultra bay".
It is supposed to be /dev/hdc. (you can modify /boot/grub/device.map to "(hd1) /dev/hdc" to try but
I doubt it will work)
You may want to check the IBM website for the Linux driver of "Ultrabay".
http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4K4PWW
(There is no Linux driver anyway.)

For boot 2 version (kernel) of Linux, you don't need to have 2 disks. All you need is install the need kernel
and edit the /etc/grub.conf, then you can choose which kernel to boot.

Wesly

0
 
rindiCommented:
I think /dev/hdc is probably the CDRom. Do you have a Knoppix CD? If so boot with that and then have a look at it's fstab. Maybe post it here.
0
 
NYCmitch25Author Commented:
I got it to work mainly in part by your help!

I guess In theory you could start and stop the drive with the command:

hdparm -U /dev/hdc       #stop drive
hdparm -R /dev/hdc       #add drive

also, you need to edit the /boot/grub/device.map file such that it has the entry for the Ultrabay:
add ->   hd1 /dev/hdc

Anyway, you can just do the following (example grub.conf below) to get it to dual boot.If you wanted to be more percise you could add somthing like root (hd1,0) to the front of everyline in the menu. Somthing like:
                     #not needed options (probably)
        root (hd1,0)
        kernel (hd1,0)/boot/vmlinuz-2.4.21-20.EL ro root=LABEL=/ rhgb
        initrd (hd1,0)/boot/initrd-2.4.21-20.EL.img


# Example Grub.conf file
#simple work around for drivebay boot
default=0
timeout=10
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Linux Client for e-business release 3.50 (2.4.21-20.EL)
        root (hd0,1)
        kernel /boot/vmlinuz-2.4.21-20.EL ro root=LABEL=/ rhgb hdc=ide-scsi
        initrd /boot/initrd-2.4.21-20.EL.img
title Linux Client ULTRABAY for e-business release 3.50 (2.4.21-20.EL) (NO HDC)
        root (hd0,1)
        kernel /boot/vmlinuz-2.4.21-20.EL ro root=LABEL=/ rhgb
        initrd /boot/initrd-2.4.21-20.EL.img
title Microsoft Windows XP Professional
        rootnoverify (hd0,0)
        chainloader +1




Afterward you will see that the other drive is now seen in Linux:

[root@w00t root]# fdisk -l

Disk /dev/hdc: 6448 MB, 6448619520 bytes
240 heads, 63 sectors/track, 833 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdc1   *         1       746   5639728+  83  Linux
/dev/hdc2           747       833    657720   82  Linux swap

Disk /dev/hda: 48.0 GB, 48004669440 bytes
240 heads, 63 sectors/track, 6201 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      3761  28433128+   7  HPFS/NTFS
/dev/hda2          4803      6063   9533160   83  Linux
/dev/hda3          6064      6201   1043280   82  Linux swap
/dev/hda4          4722      4802    612360    f  Win95 Ext'd (LBA)
/dev/hda5          4722      4802    612328+   b  Win95 FAT32
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now