[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Command documentation part 1.
From: |
Andrey Borzenkov |
Subject: |
Re: Command documentation part 1. |
Date: |
Sun, 10 Mar 2013 20:45:23 +0400 |
В Thu, 07 Mar 2013 12:06:56 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <address@hidden> пишет:
> > +* background_color:: Set background color for active terminal
> > +* background_image:: Load background image for active terminal
>
> These are specific to gfxterm, not generic how your patch would suggest.
Fixed
> It also checks. This is an alias to hashsum
>
Fixed
> > +* vbeinfo:: List available video modes
>
> vbeinfo is a compatibility alias and is reserved for VBE.
> Perhaps we should start having commands specifically excluded from help
> lists to discourage their use
>
Commented out using @comment and @ignore.
> > address@hidden cmosclean
> It's available on all platforms featuring CMOS which are all x86
> (including EFI, coreboot, ieeee1275, and so on), Loongson, Qemu-mips and
> some IEEE1275 platforms (determined at runtime).
>
> GROUPS["cmos"] = GROUPS["x86"][:] + ["mips_loongson", "mips_qemu_mips",
> "sparc64_ieee1275", "powerpc_ieee1275"]
>
I'm not sure whether explicitly listing them here is needed, just added
note that it may be available everywhere.
> > address@hidden cmostest
>
> Ditto.
>
Too.
> > address@hidden cryptomount
> > address@hidden cryptomount
> > +
> > address@hidden Command cryptomount device|@option{-u}
> > uuid|@option{-a}|@option{-b}
> > +Setup access to encrypted device. If necessary, passphrase
> > +is requested interactively. Option @var{device} configures specific grub
> > device
> > +(@pxref{Naming convention}); option @option{-u} @var{uuid} configures
> > device
> > +with specified @var{uuid}; option @option{-a} configures all encrypted
> > devices;
>
> Only the ones GRUB supports
>
Rephrased as "all detected encrypted devices"
> > +option @option{-b} configures all partitions that have boot flag set.
>
> Last part is wrong. It refers to boot flag in geli container, not the
> one in partmap.
changed
> Also I think it's worth mentioning that luks/geli/... aren't autoloaded.
>
Is there any other encryption container that is currently supported? I
see only LUKS and geli.
Also changed installation part that says encrypted devices are not
supported.
> Much more hashes are supported. Currently:
>
> ADLER32: adler32
> CRC64: crc64
> CRC32: gcry_crc
> CRC32RFC1510: gcry_crc
> CRC24RFC2440: gcry_crc
> MD4: gcry_md4
> MD5: gcry_md5
> RIPEMD160: gcry_rmd160
> SHA1: gcry_sha1
> SHA224: gcry_sha256
> SHA256: gcry_sha256
> SHA512: gcry_sha512
> SHA384: gcry_sha512
> TIGER192: gcry_tiger
> TIGER: gcry_tiger
> TIGER2: gcry_tiger
> WHIRLPOOL: gcry_whirlpool
>
Added all.
> > +When option @option{--check} is given, it points to a file that contains
> > +list of @var{hash name} pairs. File hash and file name are separated by
> > +single @key{SPACE} or @key{TAB}, one pair on a line. Option
> > @option{--prefix}
> > +may be used to give directory where files are located. Hash verification
> > +stops after the first mismatch was found unless option
> > @option{--keep-going}
> > +was given.
> > address@hidden deffn
>
> This is the same format as used by standard UNIX tools.
>
Not sure what change is needed so left alone :)
> > @@ -4147,6 +4372,74 @@ will not be shown immediately.
> > @end deffn
> >
> >
> > address@hidden test
> > address@hidden test
> > +
> > address@hidden Command test expression
> > +Evaluate @var{expression} and return zero exit status if result is true,
> > +non zero status otherwise.
> > +
> > address@hidden is one of:
>
>
> Did you copy it from somewhere else? Please specify all parts copied
> from anywhere else.
>
As mentioned, used "man test" as template.
---
From: Andrey Borzenkov <address@hidden>
Subject: [PATCH v3] document grub commands
Add documentation for grub commands
Signed-off-by: Andrey Borzenkov <address@hidden>
---
docs/grub.texi | 348 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 339 insertions(+), 9 deletions(-)
diff --git a/docs/grub.texi b/docs/grub.texi
index 0b66827..d45b637 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -1554,6 +1554,10 @@ Causes a function to exit with the return value
specified by @code{n}. If
in the function body. If used outside a function the return status is
false.
address@hidden setparams address@hidden @dots{}
+Replace positional parameters starting with @code{$1} with arguments to
address@hidden
+
@item shift address@hidden
The positional parameters from @code{n}+1 @dots{} are renamed to
@address@hidden Parameters represented by the numbers @code{$#} down to
@@ -1751,8 +1755,8 @@ Colors can be specified in several ways:
The fonts GRUB uses ``PFF2 font format'' bitmap fonts. Fonts are specified
with full font names. Currently there is no
provision for a preference list of fonts, or deriving one font from another.
-Fonts are loaded with the ``loadfont'' command in GRUB. To see the list of
-loaded fonts, execute the ``lsfonts'' command. If there are too many fonts to
+Fonts are loaded with the ``loadfont'' command in GRUB (@ref{loadfont}). To
see the list of
+loaded fonts, execute the ``lsfonts'' command (@ref{lsfonts}). If there are
too many fonts to
fit on screen, do ``set pager=1'' before executing ``lsfonts''.
@@ -3361,16 +3365,25 @@ you forget a command, you can run the command
@command{help}
(@pxref{help}).
@menu
+* [:: Check file types and compare values
* acpi:: Load ACPI tables
+* authenticate:: Check whether user is in user list
+* background_color:: Set background color for active terminal
+* background_image:: Load background image for active terminal
* badram:: Filter out bad regions of RAM
* blocklist:: Print a block list
* boot:: Start up your operating system
* cat:: Show the contents of a file
* chainloader:: Chain-load another boot loader
+* clear:: Clear the screen
+* cmosclean:: Clear bit in CMOS
+* cmosdump:: Dump CMOS contents
+* cmostest:: Test bit in CMOS
* cmp:: Compare two files
* configfile:: Load a configuration file
* cpuid:: Check for CPU features
-* crc:: Calculate CRC32 checksums
+* crc:: Compute or check CRC32 checksums
+* cryptomount:: Mount a crypto device
* date:: Display or set current date and time
* drivemap:: Map a drive to another
* echo:: Display a line of text
@@ -3379,6 +3392,7 @@ you forget a command, you can run the command
@command{help}
* gettext:: Translate a string
* gptsync:: Fill an MBR based on GPT entries
* halt:: Shut down your computer
+* hashsum:: Compute or check hash checksum
* help:: Show help messages
* initrd:: Load a Linux initrd
* initrd16:: Load a Linux initrd (16-bit mode)
@@ -3387,29 +3401,50 @@ you forget a command, you can run the command
@command{help}
* linux:: Load a Linux kernel
* linux16:: Load a Linux kernel (16-bit mode)
* list_env:: List variables in environment block
+* loadfont:: Load font files
* load_env:: Load variables from environment block
* loopback:: Make a device from a filesystem image
* ls:: List devices or files
+* lsfonts:: List loaded fonts
+* lsmod:: Show loaded modules
+* md5sum:: Compute or check MD5 hash
* normal:: Enter normal mode
* normal_exit:: Exit from normal mode
* parttool:: Modify partition table entries
* password:: Set a clear-text password
* password_pbkdf2:: Set a hashed password
* play:: Play a tune
+* probe:: Retrieve device info
* pxe_unload:: Unload the PXE environment
* read:: Read user input
* reboot:: Reboot your computer
+* regexp:: Test if regular expression matches string
+* rmmod:: Remove a module
* save_env:: Save variables to environment block
* search:: Search devices by file, label, or UUID
* sendkey:: Emulate keystrokes
* set:: Set an environment variable
+* sha1sum:: Compute or check SHA1 hash
+* sha256sum:: Compute or check SHA256 hash
+* sha512sum:: Compute or check SHA512 hash
+* sleep:: Wait for a specified number of seconds
* source:: Read a configuration file in same context
+* test:: Check file types and compare values
* true:: Do nothing, successfully
* unset:: Unset an environment variable
* uppermem:: Set the upper memory size
address@hidden * vbeinfo:: List available video modes
+* videoinfo:: List available video modes
@end menu
address@hidden [
address@hidden [
address@hidden Command @code{[} expression @code{]}
+Alias for @code{test @var{expression}} (@pxref{test}).
address@hidden deffn
+
+
@node acpi
@subsection acpi
@@ -3431,6 +3466,38 @@ Normally, this command will replace the Root System
Description Pointer
GRUB, but may be used by GRUB's EFI emulation.
@end deffn
+
address@hidden authenticate
address@hidden authenticate
address@hidden Command authenticate [userlist]
+Check whether user is in @var{userlist} or listed in the value of variable
address@hidden See @pxref{superusers} for valid user list format.
+If @samp{superusers} is empty, this command returns true. @xref{Security}.
address@hidden deffn
+
+
address@hidden background_color
address@hidden background_color
+
address@hidden Command background_color color
+Set background color for active terminal. For valid color specifications see
address@hidden file format, ,Colors}. Background color can be changed only when
+using @samp{gfxterm} for terminal output.
address@hidden deffn
+
+
address@hidden background_image
address@hidden background_image
+
address@hidden Command background_image address@hidden
@samp{stretch}|@samp{normal}] file]
+Load background image for active terminal from @var{file}. Image is stretched
+to fill up entire screen unless option @option{--mode} @samp{normal} is given.
+Without arguments remove currently loaded background image. Background image
+can be changed only when using @samp{gfxterm} for terminal output.
+
address@hidden deffn
+
+
@node badram
@subsection badram
@@ -3503,6 +3570,42 @@ load a defective boot loader, such as SCO UnixWare 7.1.
@end deffn
address@hidden clear
address@hidden clear
+
address@hidden Command clear
+Clear the screen.
address@hidden deffn
+
+
address@hidden cmosclean
address@hidden cmosclean
+
address@hidden Command cmosclean byte:bit
+Clear value of bit in CMOS at location @var{byte}:@var{bit}. This command
+is available only on platforms that support CMOS.
address@hidden deffn
+
+
address@hidden cmosdump
address@hidden cmosdump
+
address@hidden Dump CMOS contents
+Dump full CMOS contents as hexadecimal values. This command is available only
+on platforms that support CMOS.
address@hidden deffn
+
+
address@hidden cmostest
address@hidden cmostest
+
address@hidden Command cmostest byte:bit
+Test value of bit in CMOS at location @var{byte}:@var{bit}. Exit status
+is zero if bit is set, non zero otherwise. This command is available only
+on platforms that support CMOS.
address@hidden deffn
+
+
@node cmp
@subsection cmp
@@ -3553,8 +3656,24 @@ invoked with @option{-l}. This may change in the future.
@node crc
@subsection crc
address@hidden Command crc file
-Display the CRC32 checksum of @var{file}.
address@hidden Command crc arg @dots{}
+Alias for @code{hashsum --hash crc32 arg @dots{}}. See command
@command{hashsum}
+(@pxref{hashsum}) for full description.
address@hidden deffn
+
+
address@hidden cryptomount
address@hidden cryptomount
+
address@hidden Command cryptomount device|@option{-u}
uuid|@option{-a}|@option{-b}
+Setup access to encrypted device. If necessary, passphrase
+is requested interactively. Option @var{device} configures specific grub device
+(@pxref{Naming convention}); option @option{-u} @var{uuid} configures device
+with specified @var{uuid}; option @option{-a} configures all detected encrypted
+devices; option @option{-b} configures all geli containers that have boot flag
set.
+
+GRUB suports devices encrypted using LUKS and geli. Note that necessary
modules (@var{luks} and @var{geli}) have to be loaded manually before this
command can
+be used.
@end deffn
@@ -3700,6 +3819,29 @@ is shut down using APM.
@end deffn
address@hidden hashsum
address@hidden hashsum
+
address@hidden Command hashsum @option{--hash} hash @option{--keep-going}
@option{--uncompress} @option{--check} file address@hidden dir]|file @dots{}
+Compute or verify file hashes. Hash type is selected with option
@option{--hash}.
+Supported hashes are: @samp{adler32}, @samp{crc64}, @samp{crc32},
address@hidden, @samp{crc24rfc2440}, @samp{md4}, @samp{md5},
address@hidden, @samp{sha1}, @samp{sha224}, @samp{sha256}, @samp{sha512},
address@hidden, @samp{tiger192}, @samp{tiger}, @samp{tiger2}, @samp{whirlpool}.
+Option @option{--uncompress} uncompresses files before computing hash.
+
+When list of files is given, hash of each file is computed and printed,
+followed by file name, each file on a new line.
+
+When option @option{--check} is given, it points to a file that contains
+list of @var{hash name} pairs. File hash and file name are separated by
+single @key{SPACE} or @key{TAB}, one pair on a line. Option @option{--prefix}
+may be used to give directory where files are located. Hash verification
+stops after the first mismatch was found unless option @option{--keep-going}
+was given.
address@hidden deffn
+
+
@node help
@subsection help
@@ -3818,6 +3960,16 @@ block.
@end deffn
address@hidden loadfont
address@hidden loadfont
+
address@hidden Command loadfont file @dots{}
+Load specified font files. Unless absolute pathname is given, @var{file}
+is assumed to be in directory @samp{$prefix/fonts} with
+suffix @samp{.pf2} appended. @xref{Theme file format,,Fonts}.
address@hidden deffn
+
+
@node loopback
@subsection loopback
@@ -3851,6 +4003,31 @@ name syntax}), then list the contents of that directory.
@end deffn
address@hidden lsfonts
address@hidden lsfonts
+
address@hidden Command lsfonts
+List loaded fonts.
address@hidden deffn
+
+
address@hidden lsmod
address@hidden lsmod
+
address@hidden Command lsmod
+Show list of loaded modules.
address@hidden deffn
+
+
address@hidden md5sum
address@hidden md5sum
+
address@hidden Command md5sum arg @dots{}
+Alias for @code{hashsum --hash md5 arg @dots{}}. See command @command{hashsum}
+(@pxref{hashsum}) for full description.
address@hidden deffn
+
+
@node normal
@subsection normal
@@ -3936,7 +4113,7 @@ to generate password hashes. @xref{Security}.
@node play
@subsection play
address@hidden Command play file | tempo [pitch1 duration1] [pitch2 duration2]
...
address@hidden Command play file | tempo [pitch1 duration1] [pitch2 duration2]
@dots{}
Plays a tune
If the argument is a file name (@pxref{File name syntax}), play the tune
@@ -3952,6 +4129,15 @@ a rest.
@end deffn
address@hidden probe
address@hidden probe
+
address@hidden Command probe address@hidden var]
@option{--driver}|@option{--partmap}|@option{--fs}|@option{--fs-uuid}|@option{--label}
device
+Retrieve device information. If option @option{--set} is given, assign result
+to variable @var{var}, otherwise print information on the screen.
address@hidden deffn
+
+
@node pxe_unload
@subsection pxe_unload
@@ -3980,6 +4166,26 @@ Reboot the computer.
@end deffn
address@hidden regexp
address@hidden regexp
+
address@hidden Command regexp address@hidden [number:]var] regexp string
+Test if regular expression @var{regexp} matches @var{string}. Supported
+regular expressions are POSIX.2 Extended Regular Expressions. If option
address@hidden is given, store @var{number}th matched subexpression in
+variable @var{var}. Subexpressions are numbered in order of their opening
+parentheses starting from @samp{1}. @var{number} defaults to @samp{1}.
address@hidden deffn
+
+
address@hidden rmmod
address@hidden rmmod
+
address@hidden Command rmmod module
+Remove a loaded @var{module}.
address@hidden deffn
+
+
@node save_env
@subsection save_env
@@ -4172,6 +4378,43 @@ arguments, print all environment variables with their
values.
@end deffn
address@hidden sha1sum
address@hidden sha1sum
+
address@hidden Command sha1sum arg @dots{}
+Alias for @code{hashsum --hash sha1 arg @dots{}}. See command @command{hashsum}
+(@pxref{hashsum}) for full description.
address@hidden deffn
+
+
address@hidden sha256sum
address@hidden sha256sum
+
address@hidden Command sha256sum arg @dots{}
+Alias for @code{hashsum --hash sha256 arg @dots{}}. See command
@command{hashsum}
+(@pxref{hashsum}) for full description.
address@hidden deffn
+
+
address@hidden sha512sum
address@hidden sha512sum
+
address@hidden Command sha512sum arg @dots{}
+Alias for @code{hashsum --hash sha512 arg @dots{}}. See command
@command{hashsum}
+(@pxref{hashsum}) for full description.
address@hidden deffn
+
+
address@hidden sleep
address@hidden sleep
+
address@hidden Command sleep address@hidden address@hidden count
+Sleep for @var{count} seconds. If option @option{--interruptible} is given,
+allow @key{ESC} to interrupt sleep. With @option{--verbose} show countdown
+of remaining seconds.
address@hidden deffn
+
+
@node source
@subsection source
@@ -4185,6 +4428,74 @@ will not be shown immediately.
@end deffn
address@hidden test
address@hidden test
+
address@hidden Command test expression
+Evaluate @var{expression} and return zero exit status if result is true,
+non zero status otherwise.
+
address@hidden is one of:
+
address@hidden @asis
address@hidden @var{string1} @code{==} @var{string2}
+the strings are equal
address@hidden @var{string1} @code{!=} @var{string2}
+the strings are not equal
address@hidden @var{string1} @code{<} @var{string2}
address@hidden is lexicographically less than @var{string2}
address@hidden @var{string1} @code{<=} @var{string2}
address@hidden is lexicographically less or equal than @var{string2}
address@hidden @var{string1} @code{>} @var{string2}
address@hidden is lexicographically greater than @var{string2}
address@hidden @var{string1} @code{>=} @var{string2}
address@hidden is lexicographically greater or equal than @var{string2}
address@hidden @var{integer1} @code{-eq} @var{integer2}
address@hidden is equal to @var{integer2}
address@hidden @var{integer1} @code{-ge} @var{integer2}
address@hidden is greater than or equal to @var{integer2}
address@hidden @var{integer1} @code{-gt} @var{integer2}
address@hidden is greater than @var{integer2}
address@hidden @var{integer1} @code{-le} @var{integer2}
address@hidden is less than or equal to @var{integer2}
address@hidden @var{integer1} @code{-lt} @var{integer2}
address@hidden is less than @var{integer2}
address@hidden @var{integer1} @code{-ne} @var{integer2}
address@hidden is not equal to @var{integer2}
address@hidden @address@hidden @code{-pgt} @address@hidden
address@hidden is greater than @var{integer2} after stripping off common
non-numeric @var{prefix}.
address@hidden @address@hidden @code{-plt} @address@hidden
address@hidden is less than @var{integer2} after stripping off common
non-numeric @var{prefix}.
address@hidden @var{file1} @code{-nt} @var{file2}
address@hidden is newer than @var{file2} (modification time). Optionally
numeric @var{bias} may be directly appended to @code{-nt} in which case it is
added to the first file modification time.
address@hidden @var{file1} @code{-ot} @var{file2}
address@hidden is older than @var{file2} (modification time). Optionally
numeric @var{bias} may be directly appended to @code{-ot} in which case it is
added to the first file modification time.
address@hidden @code{-d} @var{file}
address@hidden exists and is a directory
address@hidden @code{-e} @var{file}
address@hidden exists
address@hidden @code{-f} @var{file}
address@hidden exists and is not a directory
address@hidden @code{-s} @var{file}
address@hidden exists and has a size greater than zero
address@hidden @code{-n} @var{string}
+the length of @var{string} is nonzero
address@hidden @var{string}
address@hidden is equivalent to @code{-n @var{string}}
address@hidden @code{-z} @var{string}
+the length of @var{string} is zero
address@hidden @code{(} @var{expression} @code{)}
address@hidden is true
address@hidden @code{!} @var{expression}
address@hidden is false
address@hidden @var{expression1} @code{-a} @var{expression2}
+both @var{expression1} and @var{expression2} are true
address@hidden @var{expression1} @code{-o} @var{expression2}
+either @var{expression1} or @var{expression2} is true
address@hidden table
address@hidden deffn
+
+
@node true
@subsection true
@@ -4207,6 +4518,25 @@ Unset the environment variable @var{envvar}.
This command is not yet implemented for GRUB 2, although it is planned.
+
address@hidden
address@hidden vbeinfo
address@hidden vbeinfo
+
address@hidden Command vbeinfo [[WxH]xD]
+Alias for command @command{videoinfo} (@pxref{videoinfo}). It is available
+only on PC BIOS platforms.
address@hidden deffn
address@hidden
+
+
address@hidden videoinfo
address@hidden videoinfo
+
address@hidden Command videoinfo [[WxH]xD]
+List available video modes. If resolution is given, show only matching modes.
address@hidden deffn
+
@node Internationalisation
@chapter Charset
GRUB uses UTF-8 internally other than in rendering where some GRUB-specific
@@ -4307,7 +4637,7 @@ Identifiers containing non-ASCII may work but aren't
supported.
Only the ASCII space characters (space U+0020, tab U+000b, CR U+000d and
LF U+000a) are recognised. Other unicode space characters aren't a valid
field separator.
address@hidden tests <, >, <=, >=, -pgt and -plt compare the strings in the
address@hidden (@pxref{test}) tests <, >, <=, >=, -pgt and -plt compare the
strings in the
lexicographical order of unicode codepoints, replicating the behaviour of
test from coreutils.
environment variables and commands are listed in the same order.
@@ -4765,8 +5095,8 @@ Installing to the whole disk device is normally more
robust.
@item
Check that GRUB actually knows how to read from the device and file system
containing @file{/boot/grub}. It will not be able to read from encrypted
-devices, nor from file systems for which support has not yet been added to
-GRUB.
+devices with unsupported encryption scheme, nor from file systems for which
+support has not yet been added to GRUB.
@end itemize
--
tg: (475ef5e..) u/cmd-doc (depends on: master)
signature.asc
Description: PGP signature