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

Re: Grub question...



"Larry 'Daffy' Daffner" <vizzie@mail.airmail.net> writes:

> >>>>> "SD" == Steve Dunham <dunham@cps.msu.edu> writes:

>   SD> "Larry 'Daffy' Daffner" <vizzie@mail.airmail.net> writes:
>   >> I do hve a small bit of cleverness though - making a GRUB floppy
>   >> with an MSDOS filesystem on it. It took a little bit of nosing
>   >> around, but it wasn't too bad. I then use that to put a kernel
>   >> on, so I can boot up a kernel off the floppy and use a Zip drive
>   >> (id 5) as the root FS, just for emergencies. :) Email me if you
>   >> want the gory details :)

>   SD> It's not that difficult.  (I usually use a raw GRUB disk and
>   SD> boot with a kernel and root off of the hard drive.)

> I mean with an actual MS-DOS filesystem and grub on the same floppy
> :). Sure, it's not too difficult to do, but I was generally pretty
> clueless on how, and it's not documented at all.

No, it isn't documented very clearly.  I guess it's "easy" to do once
you figure out the "install" command, which isn't easy.

I will work on some documentation for Linux users.

>   SD> Sorry about not updating the package, I'm trying to decide how
>   SD> to handle upgrades, because it will change the stage2 file.
>   SD> (Hence the boot sector needs to be reinstalled.)

> Well, it's working fine for me. No urgent need to mess with it at the
> moment :)

It has a messed up copyright file, and I need to figure this stuff out
before I can safely release a new version.  Plus I don't think grubinst
is flexible enough (you can specify where stage1 goes).

> One suggestion I would like to make, is to install it into
> /usr/lib/grub/stage{1,2} and let a setup program copy them to the
> appropriate places - That way, the 'pure' copies will always be
> available if needed.

Sounds like a plan (note to onlookers: the installation process
"tweaks" the stage2 file to include configuration information).

>   SD> My current idea:

>   SD>  * make grubinst more flexible, so the user can specify stage1,
>   SD> stage2, menu file, and install location.

> Do you really need to record the location of the menu file? Isn't it
> automatically assumed to be in the same directory as the stage2? I'm
> not entirely sure HOW it works, just that it does :)

Just the filename is stored. If you don't specify it, the default
(/boot/grub/menu.lst) is used.

> Just make sure it knows how to install itself on the root filesystem -
> I like to have it set up that way just in case.

>   SD>  * store the command line for "grubinst" somewhere, so the
>   SD> install script can do it automatically next time.

> Good plan, that :)

> I'm still not quite sure what the stage 1.5 buys you here.. All I know
> is on my system (large HD, LBA), it works correctly to have the stage
> 1 go directly to the stage 2, and let the stage 2 take care of the
> details. Or something like that :)

It buys allowing the blocks of stage2 to move around on disk, but this
probably doesn't make a big difference (how often does stage2 get moved)?

>   SD> My current ideas for an install program:

>   SD>   grubinst [options] stage1file stage2file device [menu file]

>   SD> With checks and warnings for screwing stuff up, backups of boot
>   SD> blocks to /boot (like lilo), and for options I'm thinking:

> This sounds pretty sane. Not sure if you have to be paranoid about the
> boot block, but I suppose it can't hurt to be paranoid :)

I've gotten a bug report that the warning wasn't clear enough and the
guy toasted a umsdos partition (i.e. made dos unbootable).  I've also
talked a guy through fixing a partition he toasted in a similar manner
with Lilo, so it would be a nice feature.

I will, of course, follow LILO's lead of only making a backup if the
file doesn't exist.

> Overall, sounds good, though. I did it via floppy this last time,
> because I couldn't figure out how to work grubinst. It would be nice
> if there was some reasonable docs for grubinst. I don't generally
> blindly put trust in something that has a high possibility of making
> my system unbootable if I screw it up :)

I don't blame you, I looked at the source before running it.

Currently, the docs are gotten by:

  grubinst -h

Basically, you do:

  grubinst stage1 stage2

It installs stage1 on the boot sector of partition where stage2 is
located and configures the blocklists, etc.  (It will ask you before
it does anything.)


Steve
dunham@cps.msu.edu


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: