Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

add comment

1 Answer

... 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
add comment

Your Answer

 
discard

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