bugGNU GRUB - Bugs: bug #7212, grub-install doesn't support...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #7212: grub-install doesn't support installing to more places

Submitted by:  Egmont Koblinger <egmont>
Submitted on:  Mon 12 Jan 2004 07:32:40 PM UTC  
 
Category: InstallationSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 0.93
Release: NoneReproducibility: Every Time
Planned Release: None

Sat 15 Dec 2007 12:43:59 PM UTC, comment #3:

We've moved to GRUB 2 as a development platform. Please can you check if this bug still applies there, and if it does, reopen it?

Thanks

Robert Millan <robertmh>
Project Administrator
Sun 18 Jan 2004 07:29:47 PM UTC, comment #2:

I'm developing a Hungarian Linux distro called UHU-Linux.
Here we're trying to satisfy the needs of as many users as
possible.

The installer asks whether to install GRUB into MBR or not.
Some users like to have GRUB there, some prefer using Smart
Boot Manager or a boot-floppy or something else. In the mean
time we've found that it's much better if we install grub
into the /boot partition under all circumstances, without
even asking the user. This is a big help in case something
goes wrong and they have to use a boot floppy or an SBM to
load their Linux. Actually the auto-generated boot-floppy
also contains an entry "boot the UHU-Linux partition". So
it's kind of a rescue solution for those who have grub in
mbr. (Many of our users are beginners, we cannot expect them
to remember which partition they installed Linux into, and
they don't know how to use the command line interface of
grub. That's why we try to help them as much as possible.)

(Btw we do already have a trivial patch for this problem,
stage2 is renamed to stage2.hd0 or stage2.hd0,5 etc., so
this particular bugreport is not about "please help me",
it's about "please fix it mainstream so that it works for
other people as well".)

Anonymous
Sun 18 Jan 2004 07:07:26 PM UTC, comment #1:

Describe why you need to do this.

Yoshinori K. Okuji <okuji>
Project Administrator
Mon 12 Jan 2004 07:32:40 PM UTC, original submission:

Suppose you want to install GRUB to more different places,
e.g. both to your partition and to MBR. So you type e.g.:
grub-install "(hd0,5)"
grub-install "(hd0)"

But this is incorrect. The first command copies stage2 to
/boot/grub and hardwires its position to the stage1 of
(hd0,5). Then the second command copies stage2 again to
/boot/grub, overwriting the previous version. The new
version might go to a different part of the disk (actually
more other commands might be executed between the two
commands above, even months or years may elapse between
these two commands, including kernel and GRUB updates...).
So a grub-install "(hd0)" can easily break the boot loader
of (hd0,5), and similarly a grub-install "(hd0,5)" can
easily break grub in (hd0).

Suggested workaround: the grub-install script should encode
the name of the partition in stage2 filename, e.g. create
files named /boot/grub/stage2.hd0 and stage2.hd0,5. (Care
should be taken, of course, to choose filename that are
compatible with all types of file systems).

I hope that nowadays no-one cares about storing a 100k file
in two or three instances instead of one. In case you try to
find a solution where stage2 is only stored once, you'll
always risk that installing/upgrading the boot loader of one
device (partition or mbr) will completely break it for
another device.

Egmont Koblinger <egmont>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by robertmh (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 15 Dec 2007 12:43:59 PM UTCrobertmhOpen/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1