pupa-devel
[Top][All Lists]
Advanced

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

Re: Normal and rescue mode


From: Yoshinori Okuji
Subject: Re: Normal and rescue mode
Date: Sun, 28 Sep 2003 23:22:53 +0100 (BST)

 --- Marco Gerards <address@hidden> wrote:
> After playing with PUPA for a while I got really confused.  I've
> noticed that there is a "rescue mode" and a "normal mode".  It is not
> clear to me why both modes exist and how modules are loaded into a
> mode.

As the names suggest, "rescue mode" is for rescue use, and "normal mode" is for
normal use. :)

PUPA is designed to survive even if your hard disk is extremely damaged. In
GRUB, if a filesystem contains the file "stage2" and the filesystem is damaged,
the whole boot loader can be unfunctional quite easily. This could be really
bad if GRUB is installed into the MBR.

Unlike GRUB, PUPA has a rescue mode so that you can struggle with boot failures
even when PUPA is not working completely. To make this true, PUPA installs a
minimum environment into the MBR, and this environment is called "rescue mode".
Normally, this includes not only "rescue mode" but also some other modules,
such as a chainloader.

However, "rescue mode" is not intended to be used for ordinary users, because
it has poor functionality in nature.

Thus, PUPA normally loads "normal mode" if possible. This mode is conceptually
the same as GRUB's stage2.

Also, to make PUPA flexible enough, it is possible to change the mode
dynamically, both from normal mode to rescue mode, and from rescue mode to
normal mode.

> pupa rescue> root (fd0)
> (fd0): Filesystem is unknown.
> pupa rescue> ls (fd0)/foo
> error: unknown filesystem

Umm, that looks like a bug.

> GRUB for example has a shell that works in GNU/Linux, that would be
> convenient to have for PUPA as well, it makes hacking a lot easier.

I agree. For now, I'm using Bochs.

> Another thing I want to have a look at is ext2fs, can I just copy the
> driver from GRUB and change the interfaces so it works on PUPA or do
> you want a rewrite?

It would be a good exercise, but I'd recommend not doing that.

There is a legal problem in stage2/fsys_ext2fs.c in GRUB. That is, the author
is unknown. Probably it is based on Linux's code, so it might be safe, but if
we cannot probe that the code is written legally, I assume that there is a
potential problem.

Therefore, I was planning to rewrite ext2fs support myself, but I couldn't have
time for that. (How much time do you want to have for reinventing a wheel?)

If you write new ext2fs code without using GRUB's, it would be quite helpful
for both PUPA and GRUB. If you write it for PUPA, it is very easy to "backport"
it to GRUB, I think.

Okuji




reply via email to

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