[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: boot-floppies package

On Sun, Jun 01, 2003 at 04:50:58PM -0400, Haines Brown wrote:
> Carel,
> Now I'm really getting worried, and trying to recall were I picked up
> the suggestion to create a grub floppy (it wasn't my own idea). I was
> from Linux Journal, but I can't seem to pin down the issue.

I'm not sure I understand your fear, there is nothing wrong with a grub
boot floppy, on the contrary, it's very very handy, has saved my day on
many occasions, so I hardly leave the house without one.

But, when you "dd" stage2 right after stage1, that is right after the
MBR, then you're very likely to be overwriting the FAT tables
(assuming we're dealing with DOS formatted floppies here).  Ofcourse
it all depends on the way the floppy is formatted, check it with
"minfo" and look for "reserved" and "hidden" fields (normally 1 sector
is reserved for the MBR and 0 for hidden sectors).

I don't know the details of ext2fs, but I assume there too not a lot
of space is waisted;)

> I also find a reference to doing so in the clone-HOWTO, section
> 5.3. Also
> http://www.mathematik.uni-marburg.de/sys/os/linux/install/mkgrubfd.html 

After some puzzled looks, I conclude that they err.  At one time they
were describing how to create a bootflop for a RedHat system. At that
time they were using a setup where stage2 was to be found on hd0.
Then it's alright to remove stage* from the floppy after the setup as
those files weren't used to begin with.

Later they changed to a full floppy based setup much like the way I
suggested in an earlier post this week.  Now stage2 on the flop is
used, so removing it is *bad* advice.

[stage1 is always copied to the MBR, so it doesn't matter where it
 was during setup]

> here's another venture:
> http://www.uruk.org/orig-grub/install.html
> I find that the Linux Journal article was from the May issue:
> http://www.linuxjournal.com/article.php?sid=4622
> These discussions propose two or three somewhat different approaches
> to creating the floppy, and I see that I didn't use the Linux Journal
> method after all. But these methods would not see to have any bearing
> on your concern about overwriting the floppy's filesystem.

Well, they don't mention it, but they do take precorsions not to fool
things up:)  The linux journal does like I posted, which takes care
not to overwrite the filesystem, it merely puts stage1 into the MBR
and alters the MBR to point to stage2 on the floppy.  www.uruk.org on
the otherhand explicitly warns:

  NOTE: This will destroy any data currently on the floppy.

So, yes they use dd for stage2, but they know that doing so will
destroy any filesystem currently on the floppy.  There is no way
you can safely add a menu.lst file on that flop and use it.

> If stage2 does intrude on the file system, what exactly do you mean by
> the "file system?" The diskette's partition table? The 1_5 fs drivers?

the FAT tables and the root directory to begin with (unless there were
enough sectors 'reserved' or 'hidden').

> > The ruined file system might lead to you overwriting part of stage2
> > whenever you put something on the floppy, like changing menu.lst, or
> > putting the other grub files on disk.
> At least you suggest the floppy is in danger of failing. But beyond
> ending up with a non-functioning floppy, are you suggesting it might
> affect the file system on the hard disk? If so, how?

I can't remember suggesting such a thing!

> > Ofcourse if you first put those files on the flop, change menu.lst,
> > and only then use dd to put stage1 and stage2 in place, you might be
> > lucky and overwrite only some of those superfluous grub files.
> I'm not sure what surperfluous files you refer to. I run multiple file
> systems and so need some of the drivers, but, of course not all. But

stage1 and stage1.5* are superfluous.  stage1 is needed during setup,
is copied to the MBR and updated to know where stage2 resides.
stage1.5* can only be put to use on harddisk as there is some spare
room between the MBR and the actual file system, during setup it is
copied into that spare room and stage1 is linked to it instead of to
stage2.  This is very usefull as stage1.5 is able to find stage2 on a
file system without having to resort to having to list the sectors it
lives on, so one can e.g. upgrade stage2 without having to run setup
again.  Maybe you should try to read more on it in the fine manual?

> since one can never know, you are implying that a grub floppy is a BAD
> IDEA to begin with? 

What on earth have I done to make you think such evil thoughts:)

groetjes, carel

Reply to: