[Top][All Lists]

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

Re: normal vs. rescue mode commands

From: Tomas Ebenlendr
Subject: Re: normal vs. rescue mode commands
Date: Sun, 6 Jun 2004 12:55:16 +0200
User-agent: Mutt/1.5.6i


> Indeed, there is an unofficial patch for initrd, which makes an initrd 
> image dynamically by adding arbitrary kernel modules at run time. This 
> makes me afraid that anything possible will happen.

Wow, that is very nice feature :-).


> 1. Generate two versions for each loader from the same source code.
> This case compiles the same source code twice to generate two different 
> loaders for rescue mode and normal mode. Basically, the version for 
> rescue mode would be a subset of the version for normal mode. This 
> makes redundant binary code, but the maintainability is not very bad.

This looks like best solution for me, also the 'normal' mode loader may
depend on 'rescue' mode loader and use some of its functions. This looks
like most 'clean' way. If we want that users won't be confused by 2
modules doing the same, we can add 'automatic module load support' which
will load modules-normal_mode_extensions of loaded loaders to normal mode.

> 2. Share the same loaders if possible, and make different soure code if 
> not possible.
> If a loader can be shared between rescue mode and normal mode, we make 
> it as a rescue mode loader and use it from normal mode as well. If this 
> is not possible, we make a different loader specific for normal mode. 
> My intuition is that this is quite unmaintainable, because things are 
> not consistent.

May be. I think that 'normal mode extensions' are somwhere in between
1. and 2.

> 3. Use only a chainloader in rescue mode. The others require normal 
> mode.
> This is what I thought at the beginning of this project. Because 
> chainloader can be quite compact and so convenient if you have any 
> other boot loader installed in your system, chainload might suffice for 
> rescue purpose. In this case, we just forget sharing loaders. Only 
> chainloader must be implemented for rescue mode and normal mode.

Hmm, I like to boot 'rescue' kernel with 'rescue' initrd and not using
floppy or CD.

I include here the previously dicussed solution only for completness
of the list of solutions how loaders can be implemented:

4. There is also the solution wich I dislike, that is normal mode
extensions compiled in loaders. I designed interface wich implements
client/server module cooperation when modules should be loaded
independently. My opinion is that this interface does the same work,
which can do module loader, when client module depends on server module,
but more complicated way. (I don't understand binutils and module loader,
so it is done by tables of functions and indirect calls :-(. )
Also normal mode code is redundant in rescue mode, which should be as
small as possible.
                                 Tomas 'ebi' Ebenlendr
                                 PF 2004.43038501189

reply via email to

[Prev in Thread] Current Thread [Next in Thread]