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

Re: Misremembered (was: Re: Stupid question)



On Lu, 14 feb 22, 17:23:52, David Wright wrote:
> > On 2/14/2022 10:19 AM, Bijan Soleymani wrote:
> > > 
> > > Not sure about the Debian installer (except that it does boot and
> > > run Linux, but not sure it ever switches to another kernel
> > > midway), but the Grub bootloader is kind of a mini-OS, in that it
> > > can read files from filesystems (rather than some other
> > > bootloaders that read from specific sectors/blocks of a disk).
> 
> I think that confuses the issue. Grub is just a program, not an OS.
> It can run commands from a shell, and it can load lots of drivers,
> but that doesn't even qualify it as a single-user OS.
 
Well, without digging too much into it GRUB seems to be almost as 
capable as DOS ;)

> It's technically correct to say that Grub is designed with a "kernel"
> and modules, but that's mainly a way of saving space in the final
> product, by having as little excess code included as possible.

As far as I recall there is a very strict limit for the first stage, 
because it has to fit in the MBR.

> There's no concept of kernel- and user-space. They could have as
> easily named the kernel.img "trunk.img", and core.img "body.img",
> to illustrate how Grub is agglomerated.

However, GRUB's capabilities are heavily influenced by what modules are 
available and loaded (as you mention below with the 'normal' module), 
and anyway, an OS isn't defined by having kernel- and user-space.

On the other hand it can't run *other* programs within it's environment 
(scripts in it's own scripting language don't count). When it loads a 
kernel or chain-loads another boot-loader it basically hands over 
control completely, so maybe this is the distinguishing limitation 
compared to a "real" OS.

(this is all as far as I know, and I might be very mistaken about it)
  
> Effectively, Grub has two shells, Grub> and Grub rescue>, depending on
> whether the "normal" module has been loaded, and about the only thing
> you can sensibly do without normal is to find it and insmod it.
> 
> But most people will never see rescue, and with patience it's usually
> fairly straightforward to stumble your way round the system with ls,
> and find something to boot or chainload.
> 
> BTW a very useful command to kick off with in Grub is:
> 
> Grub> set pager=1
> 
> without which it can be hard to use:
> 
> Grub> help

[:facepalm:]

Never bothered to search for something like this, I just assumed it's 
the kind of limitation one has to put up with in such a restricted 
environment (but then why would they write such long help texts, duh).

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

Attachment: signature.asc
Description: PGP signature


Reply to: