Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to grub and having issues doing some simple usage tests.

from the grub command line I run

insmod hashsum

I have several partitions mounted, we'll be using msdos2 for this example ...

md5sum -p ./msdos2

The command executes seemingly without error ... however I can't see the resulting hash.

I've tried several things including echo

echo md5sum -p ./msdos2

... but all I get is an error saying invalid parameter '-p'

So ... how can I run the md5sum and see the hash from the grub command line?

A little update: md5sum (hd0, part1)/ gives me a non valid file, as its a folder. However, is there a way to run hashsums directly on a partition or do you have to use a .c file to create a .mod file that opens the device using (grub_device_open) then call hashsum on that?

share|improve this question

migrated from stackoverflow.com Aug 12 '11 at 12:53

This question came from our site for professional and enthusiast programmers.

... but all I get is an error saying invalid parameter '-p'

-p isn't a valid parameter, just use md5sum ./msdos2

share|improve this answer
    
-p is a prefix for the base directory for hash list (from help md5sum) ... using your recommendation you get the error invalid file name ... – lostdev Aug 11 '11 at 15:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.