All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bean <bean123@126.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Command extension suggestions
Date: Thu, 14 Jun 2007 11:46:49 +0800	[thread overview]
Message-ID: <20070614034649.GA591@ws3.vdp.com> (raw)

These ideas are mostly from grub4dos, I think they can be useful in GRUB2.

1. cat

In addition to the current function, cat can also generate hexadecimal dump, 
and it can optionally choose the range of bytes to display. For example:

cat [--hex] [--skip=S] [--length=L] FILE

Sometimes it's useful to dump the content of physical memory, it can be
implemented with a special option --mem. For example,

cat [--mem] [--skip=S] [--length=L] base_address

It can also be implemented with virtual device (md). For example,

cat --hex (md)+2

dump the first 1K of memory.

But It seems a waste to add a new device just for cat.

The cat module can export function dump:

dump(unsigned long base, char* buf, int len);

other module can use it to generate hexadecimal dump.

2. find

Find command is missing in GRUB2. It's used to find the device which contains
a certain file.

find [--set=var_name] FILENAME

If the device is found, it's name will be copied to var_name. For example,

find --set=root /io.sys
chainloader +1

Boot from the partition that has io.sys in the root directory.

3. chainloader

It can be useful if chainloader can load multiple sector file.

chainloader [--force] [--load-addr=SEG:OFS] [--boot-addr=CS:IP] FILE

The default load address and boot address is 0:0x7C00.

With this extension, chainloader can load grldr, ntldr, io.sys, kernel.sys, 
etc.

-- 
Bean <bean123@126.com>




             reply	other threads:[~2007-06-14  3:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14  3:46 Bean [this message]
2007-06-14  6:08 ` Command extension suggestions Robert Millan
2007-06-14  6:24   ` Bean
2007-06-14  9:42     ` Marco Gerards
2007-06-14 10:24       ` Bean
2007-06-14 10:49         ` Marco Gerards
2007-06-14 11:31           ` Bean
2007-06-14 11:50             ` Marco Gerards
2007-06-14 13:08               ` Bean
2007-06-14 13:48                 ` Marco Gerards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070614034649.GA591@ws3.vdp.com \
    --to=bean123@126.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.