- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- GRUB multiboot with redhat ES and DL380
Operating System - Linux
1758690
Members
3215
Online
108874
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2007 10:26 AM
06-25-2007 10:26 AM
Solution
You'll have to read the GRUB documentation and do some customizing. The BIOS is so restricted by PC legacy that using it to control multi-booting tends to be rather painful.
First, GRUB gets all its knowledge of disks from the BIOS. When a computer is booting, the BIOS will make a list of all the disks it can access. The BIOS will identify each hard disk by a hexadecimal number, starting from 0x80 (the numbers of the floppy disks start from 0x00). This numbering is created dynamically each time system boots up: if you add or remove disks, the numbers of the other disks may/will change.
How does this relate to GRUB's disk identifiers? Well, if you don't confuse the situation with "map" directives, BIOS's 0x80 = GRUB's (hd0), 0x81 = (hd1) and so on. With Linux, you should not need any "map" directives at all.
If the BIOS has a facility to select a disk to boot from, that facility usually works by making that disk become the disk 0x80 in the BIOS numbering, and thus (hd0) for GRUB. What happens to the numbers of the other disks is "implementation-specific" - i.e. a likely cause for headaches: this is why I don't recommend using BIOS settings to handle complex multi-boot situations.
The BIOS loads the Master Boot Record from disk 0x80, i.e. the first hard disk on its list. The Master Boot Record might contain the boot loader (the usual way with GRUB), or just a simple program to load the real boot loader from the beginning of the active partition of the same disk (the Microsoft way, although GRUB can be used like this too).
If the boot loader needs to load some more parts of itself (like GRUB's stage2), it usually expects to find them on BIOS disk 0x80, unless specifically configured otherwise. Because the Master Boot Record is always read from disk 0x80, there is not much point to place the bootloader to any other disk: it would just increase the possibilities for failure.
When the Linux kernel starts up, it re-identifies all the disks. There is no general way to ensure that the detection order of Linux matches the detection order of the BIOS if you have multiple controllers, but if you have just a single SmartArray controller you can usually trust that
if disk slot 1 = 0x80 = (hd0) = /dev/cciss/c0d0,
then disk slot 2 = 0x81 = (hd1) = /dev/cciss/c0d1
and so on.
If you have multiple disk controllers, the problem may become a lot more challenging.
When you get this figured out, you can start writing extra entries in the GRUB configuration file. For the simplicity's sake, I recommend that you make the first disk, i.e. /dev/cciss/c0d0 as your "master" bootloader disk. (Otherwise you'll need to get your BIOS make some other disk get the number 0x80, which makes the entire numbering scheme more difficult to predict... see above.)
The /boot/grub/grub.conf (or in some distributions, /boot/grub/menu.lst) file will contain the GRUB boot configurations for all the OSes you have in this system.
Look at the entries for your first OS (c0d0) in the grub.conf file. They should be similar to this:
title
First, GRUB gets all its knowledge of disks from the BIOS. When a computer is booting, the BIOS will make a list of all the disks it can access. The BIOS will identify each hard disk by a hexadecimal number, starting from 0x80 (the numbers of the floppy disks start from 0x00). This numbering is created dynamically each time system boots up: if you add or remove disks, the numbers of the other disks may/will change.
How does this relate to GRUB's disk identifiers? Well, if you don't confuse the situation with "map" directives, BIOS's 0x80 = GRUB's (hd0), 0x81 = (hd1) and so on. With Linux, you should not need any "map" directives at all.
If the BIOS has a facility to select a disk to boot from, that facility usually works by making that disk become the disk 0x80 in the BIOS numbering, and thus (hd0) for GRUB. What happens to the numbers of the other disks is "implementation-specific" - i.e. a likely cause for headaches: this is why I don't recommend using BIOS settings to handle complex multi-boot situations.
The BIOS loads the Master Boot Record from disk 0x80, i.e. the first hard disk on its list. The Master Boot Record might contain the boot loader (the usual way with GRUB), or just a simple program to load the real boot loader from the beginning of the active partition of the same disk (the Microsoft way, although GRUB can be used like this too).
If the boot loader needs to load some more parts of itself (like GRUB's stage2), it usually expects to find them on BIOS disk 0x80, unless specifically configured otherwise. Because the Master Boot Record is always read from disk 0x80, there is not much point to place the bootloader to any other disk: it would just increase the possibilities for failure.
When the Linux kernel starts up, it re-identifies all the disks. There is no general way to ensure that the detection order of Linux matches the detection order of the BIOS if you have multiple controllers, but if you have just a single SmartArray controller you can usually trust that
if disk slot 1 = 0x80 = (hd0) = /dev/cciss/c0d0,
then disk slot 2 = 0x81 = (hd1) = /dev/cciss/c0d1
and so on.
If you have multiple disk controllers, the problem may become a lot more challenging.
When you get this figured out, you can start writing extra entries in the GRUB configuration file. For the simplicity's sake, I recommend that you make the first disk, i.e. /dev/cciss/c0d0 as your "master" bootloader disk. (Otherwise you'll need to get your BIOS make some other disk get the number 0x80, which makes the entire numbering scheme more difficult to predict... see above.)
The /boot/grub/grub.conf (or in some distributions, /boot/grub/menu.lst) file will contain the GRUB boot configurations for all the OSes you have in this system.
Look at the entries for your first OS (c0d0) in the grub.conf file. They should be similar to this:
title
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2007 07:27 PM
06-27-2007 07:27 PM
Re: GRUB multiboot with redhat ES and DL380
Hello Bill,
My opinion is that this shouldn't be that complicated. The logic should be very similar to the situation when You have Windows and Linux on the same HDD and GRUB gives You the possibility to choose among them.
When You install the first RH(RH1) on the first HD (HD1), the GRUB is installed there. When You install second RH2 on HD2, You can boot only RH1 (RH2 installed it's grub in MBR of HD2). So, You need to change the menu.lst file on the HD1 and to tell him that You have another OS on another HD (HD2). This way, You'll have unique GRUB file, allways on the fisrt disk, and every time You reboot a machine, this file will be checked.
title RH1
root (hd0,2)
kernel
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault
title RH2
# You should put here another disk,
# ie. (hd1,2)
root (hd1,2)
kernel
initrd /boot/initrd.img-2.6.20-16-generic
For the details about naming hard disks in GRUB, check the manual :-)
When You make changes to menu.lst file, after reboot You should be able to see the GRUB menu with available OS and You should see something like this:
RH1
RH2
See You soon in Belgrade ;-)
Best Regards,
Marko
My opinion is that this shouldn't be that complicated. The logic should be very similar to the situation when You have Windows and Linux on the same HDD and GRUB gives You the possibility to choose among them.
When You install the first RH(RH1) on the first HD (HD1), the GRUB is installed there. When You install second RH2 on HD2, You can boot only RH1 (RH2 installed it's grub in MBR of HD2). So, You need to change the menu.lst file on the HD1 and to tell him that You have another OS on another HD (HD2). This way, You'll have unique GRUB file, allways on the fisrt disk, and every time You reboot a machine, this file will be checked.
title RH1
root (hd0,2)
kernel
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault
title RH2
# You should put here another disk,
# ie. (hd1,2)
root (hd1,2)
kernel
initrd /boot/initrd.img-2.6.20-16-generic
For the details about naming hard disks in GRUB, check the manual :-)
When You make changes to menu.lst file, after reboot You should be able to see the GRUB menu with available OS and You should see something like this:
RH1
RH2
See You soon in Belgrade ;-)
Best Regards,
Marko
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP