Re: Grub with multiple hard disks

From: P Gentry (rdgentry1_at_cablelynx.com)
Date: 09/06/04


Date: 6 Sep 2004 12:42:15 -0700

7 <website_has_email@www.ecu.pwp.blueyonder.co.uk> wrote in message news:<ob__c.157197$b76.90248@fe1.news.blueyonder.co.uk>...
> na wrote:
>
[snip]
>
> Just a thought from a complete newbie.
> 1. Make grub always boot from same drive / config file for each disk.

That was the point of my first two items -- the MBR code of hd0 is the
only one read, so with MBR on both disks loaded with grub ...

> 2. Suppose you had a boot script in an install to run up after booting
> that could know which distro had booted, then if its wrong install for the
> combinations of disks in the machine,
> then by modifying the one grub config text file and rebooting, ...

requires root priviledges -- see below ...

> ... it can boot
> into correct distro at all times regardless by setting the default boot
> menu option in the menu.lst file. Each menu option in grub you use
> savedefault option in menu.lst so that if the correct version is booting
> already, it won't keep rebooting into wrong version.

By this time Linux is already up and running so unless OP wants a
particular version of the kernel to run this is moot.

The issue at this point is whether /etc/fstab has run and successfully
mounted all partitions -- a reboot should not be necessary _if_ fstab
can be configured correctly. If it can't be configured to run all
_needed_ partitions by this stage (which would require duplicate
partitions on the hdds to be "foolproof") then the OP is left to
decide _which_ partitions to leave mounted/unmounted based on which
hdd the OS booted from (which is normally going to be hda in any case
-- how to figure out if hda is an "old" hdd or a "new" one).

If the disks could be treated independently (ie., run from one, forget
the other) then simply having grub in MBR of both disks would suffice.
 Fear that is no what OP has in mind.

Running scripts at this stage would also require suid scripts --
something to be avoided on servers at all costs! It might be made to
work, but personally I would prefer to take my medicine up front
rather than a phone call/ass chewing at 3 a.m. ;-)

It would be nice if some things like this were possible _and_ secure,
but that is what ssh or serial terminal connections are for. Gather
from what the OP did not say that serial terminal boards are not in
place, so ...

Still, it's a good sign that you were thinking through the problem.
When you get more familiar with Linux you'll catch your thought
glitches yourself -- I do it 5-10 times a day ;-)

regards,
prg
email above disabled



Relevant Pages

  • Re: RAID recovery????
    ... The system has 4 - identical 18GB SCSI disks and I installed the ... partitions out of the 4 disks and set as raid 5 with no spares ... This is a FC5 install as it came off the CD's ... title "GRUB module query" on the Unbuntu forum (see ...
    (Fedora)
  • Re: Is my hard drive thrashed?
    ... installed in the MBR, etc., are left alone. ... aren't always there (like USB drives), ... get as far as the stuck GRUB screen for that error. ... Although the contents of my partitions seem ...
    (Fedora)
  • Re: /boot partition mislabeled on last reinstall - need advice on how to fix
    ... > partitions for example with tune2fs, ... When I reboot, ... To examine the MBR: ... Good info on the master boot record and GRUB google "thestarman GRUB". ...
    (Fedora)
  • Re: Reinit Lilo or Grub
    ... > For my Linux bootable partitions I have Grub set up at the beginning ... > and it controls the MBR. ... If you install LILO or GRUB in your MBR, ...
    (alt.os.linux)
  • Re: Cant change partition table anymore
    ... > I don't see these problems on my disks. ... They are surely not (two of four partitions are ever unused). ... "If you have part of that device open GEOM won't let you touch the MBR.." ...
    (freebsd-current)