All of lore.kernel.org
 help / color / mirror / Atom feed
* Command extension suggestions
@ 2007-06-14  3:46 Bean
  2007-06-14  6:08 ` Robert Millan
  0 siblings, 1 reply; 10+ messages in thread
From: Bean @ 2007-06-14  3:46 UTC (permalink / raw)
  To: The development of GRUB 2

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>




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-06-14 13:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-14  3:46 Command extension suggestions Bean
2007-06-14  6:08 ` 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

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.