Netboot Mailing List (by thread)

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

Re: passwords and commandline options



George Shin writes:
 > Does anyone know how to use "md5sum" from the command line using stdin
 > as the input rather than giving it a filename?  The manpage (actually
 > Textinfo on md5sum) states that omitting filename or using '-' will
 > allow stdin as the input for "md5sum" to encrypt.  However, i'm not sure
 > how to escape out of the stdin once i'm done entering in the text.  Tried
 > Ctrl-C or Ctrl-Z but didn't work.  There must be a way to escape out so
 > that "md5sum" would show me the encrypted string.

"md5sum" reads all the data until it hits an end-of-file condition.

On UNIX you typically signal end-of-file for a terminal device by
pressing CTRL-D. Depending on how you configured your shell, one or
more (or even all) CTRL-D characters might be ignored.

Thus it is more reliable to not type in the data on your terminal, but 
to use the output from some other command. Usually you will do
something like this:

  echo -n Penguin | md5sum

 > If i create a file
 > with content being say "Penguin" and run "md5sum Penguin", i do get back
 > a finger print which by the way is different from the sample bootptab

When you created the file, you probably pressed return at the end of
the line. You ended up with one more (invisible) character in your
input file and md5sum computed the checksum for "Penguin<RETURN>". By
the way, the same problem occurs if you forget to pass "-n" when
calling "echo".

 > Hmmm, i'm not really clear here as to this "cmdline" parameter being
 > appended to the end of the "another" command line that gets passed to
 > the loaded image.  Are there "two" command line parameters?  In LILO
 > i know that you can pass arguments to kernel and one such argument
 > i use often is "mount root=/dev/sda1".  Is this the sort of argument
 > you can include in "cmdline" field?

Etherboot builds a kernel command line (that is the same thing that
you usually enter at LILO's prompt) by obtaining information from
different sources and concatenating all of it together. Part of this
information is the additional commandline that you specified when
building the image, some other part is the "cmdline" field in your
bootptab, and yet another one is the (optional) data that the user
types in interactively after picking an load image from the
menu.

There a few more sources for information, but you have very little
direct influence on it.

 > I'm trying to figure out how one would generate a single Linux boot
 > image file that can allow both X and non-X boot?  Do i need to rebuild
 > the Linux kernel?  I tried to do something similar with LILO also but
 > just couldn't figure out how.  I want to have an option to start
 > Linux at run-level 3 (non-X) and run-level 5 (xdm).  Any pointer to
 > proper HOWTO or etc would be appreciated.

Entering "5" or "3" in the "cmdline" field in your bootptab will give
you this behavior.


Markus

-- 
Markus Gutschke                         Internet: markus@infoscape.com
Infoscape, Inc                          Phone:    +1-415-537-3778
657 Mission Street, Suite 200
San Francisco, CA 94105

Disclaimer: The above message represents my personal opinion; It does
            not constitute an offical statement by Infoscape!

PGP signature



For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.