Results 1 to 6 of 6
Hi All,
I have 2 physical drives in my system. First is an 80GB SATA Hard drive from Seagate and second is a 16Gb Flash drive from Apacer. I want ...
- 02-03-2011 #1Just Joined!
- Join Date
- Dec 2006
- Posts
- 6
[SOLVED] RHEL 5.3 installation of 2 hard disks in same system
Hi All,
I have 2 physical drives in my system. First is an 80GB SATA Hard drive from Seagate and second is a 16Gb Flash drive from Apacer. I want to install RHEL 5.3 on both the drives and want a grub screen that will allow selection of the booting into a particular drive from grub menu. The 80GB Hard drive is shown as SDA & the 16GB flash drive is shown as SDB while installation. I also want to be able to remove the 80GB hard drive and still be able to boot into the flash drive from the grub menu. This essentially indicates that the grub menu displayed on the screen should be in the Flash disk.
Hence I have first installed RHEL 5.3 on the SDB i.e the flash disk and installed the grub boot loader on the MBR i.e SDA (80GB hard drive). Now I am getting confused when installing RHEL on the SDA (80GB HDD) whether to install Grub or not and if yes where to install it.
Any help would be appreciated in this regards
Knikhil
- 02-03-2011 #2Linux User
- Join Date
- Sep 2008
- Location
- UK
- Posts
- 353
You need to install grub to the mbr of both disks and have the non-boot disk to have a boot menu option to other disk's linux partition.
On the mbr of sda, rhel is the first option in grub and the boot partition on sdb is the other boot option.
For only sdb, swap things around.
You may need to tell your bios which disk to beet from. (sda or sdb)
- 02-04-2011 #3
For the scenario you describe, you don't necessarily NEED the grub hook in the MBR of sda, but I agree that's what you should do. If sdb is actually a flash drive, not an SSD, you're going to max out the write lifetime on it fairly quickly, and with grub hooked into the MBR of sda, you'll still have a bootable system. Just set your boot order to go sdb, sda.
You could set grub on sdb to load the RHEL on sda as an option without actually installing grub on sda, just making it one of the boot options in /boot/grub/grub.conf on sdb. Technically you'd be booting from sdb in that case, and loading Linux from sda.
- 02-04-2011 #4Just Joined!
- Join Date
- Dec 2006
- Posts
- 6
- 02-04-2011 #5Just Joined!
- Join Date
- Dec 2006
- Posts
- 6
The sdb is actually an SSD. In my final configuration after development, I am going to remove the 80GB Hard drive ( I m using it only for development purpose) & keep only the 16GB drive to start my programs on boot up.
Hence, I need a way by which, even if I remove the Hard Drive, I could still boot into the 16GB SSD. In that case, using grub on sda will not serve the purpose since if there is no sda there is no grub to boot from.
I will any way try the grub settings suggested by you. Thanks for the post.
knikhil
- 02-05-2011 #6Just Joined!
- Join Date
- Dec 2006
- Posts
- 6
Hi,
I have finally managed to put grub entry into flash so that the flash & HDD can boot from the grub itself. Here is the procedure that I have followed.
1. Remove the HDD from the system. This makes the Flash drive as sda. ( Please note that in my system there is no provision to connect the flash on CH0 or CH1)
2. Install RHEL on the flash as per normal procedure. Install the grub boot loader. Install grub on the MBR (which is sda & hence Flash disk as of now).
3. Reboot after installation & do the required settings. Shutdown the system.
4. Connect the HDD. Now this makes HDD as sda and Flash as sdb on my system.
5. Start installing RHEL on HDD (sda). Do not touch anything on Flash (now sdb).
6. Use the grub boot loader. While installing grub, use the second option below 'MBR' i.e. "install on /dev/sda1" which is the boot partition I have created for sda (HDD). Do not select to install grub on MBR since it will overwrite the MBR which was on earlier sda (Flash) and write it to sda (now HDD). Hence, all your boot settings will come on new sda (HDD).
7. Complete the installation. In the setup change the hard disk boot sequence to Flash first and HDD second.
8. System boots from Flash. (For ease of identification I have written "Flash" before the text that appears on the grub screen so that I know that this is grub in Flash).
8. Open the grub.conf (or menu.lst) file in the flash. It will be something like shown below:
************************************************** **********
# 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 (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda3
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Flash Red Hat Enterprise Linux Server (2.6.18-128.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-128.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-128.el5.img
************************************************** ***********
9. Just copy the four lines starting from Title and paste them below the last line. We will use this entry for booting HDD. The final menu.lst file as saved in Flash that allows booting of HDD also is shown below:
************************************************** *************
# 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 (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda3
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Flash Red Hat Enterprise Linux Server (2.6.18-128.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-128.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-128.el5.img
# This entry is added after installing RHEL 5.3 on Hard Disk
title HDD Red Hat Enterprise Linux Server (2.6.18-128.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/sda2 rhgb quiet
initrd /initrd-2.6.18-128.el5.img
************************************************** **************
10. As shown in the above file, the only change that is made is in the third line where "root=LABEL=/" has been replaced by "/dev/sda2". Here /dev/sda2 is the path from where linux can be booted in HDD.
11. Save the file and reboot the system.
12. In the grub menu you will find two entries as shown below:
************************************************** ********
Flash Red Hat Enterprise Linux Server (2.6.18-128.el5)
HDD Red Hat Enterprise Linux Server (2.6.18-128.el5)
************************************************** ********
11. Selecting the first option will boot into Flash & selecting the second option will boot into HDD.
12. It is to be noted that even if I now remove the HDD, the system can still boot but only into flash. If you try to boot into HDD you will encounter a kernel panic since the hard disk is not present. Also one reason is that the MBR is on the Flash and not the HDD.



