I downloaded the compressed “findgrub301”, saved it in /home/bin/findgrub301. Then I extracted the file and gave “findgrub” (the other is “cfindgrub”) an executable permission as follows:
#chmod +x ~/bin/findgrub301/findgrub
However, when I ran findgrub, I got the following:
If 'findgrub' is not a typo you can use command-not-found to lookup the package that contains it, like this:
I would very much appreciate your help.
I found mistakes in the original instructions. Permission code for the file “findgrub” should read “u+x” instead of “+x” or “+u”
Hence, since the tar file was saved to and extracted in the directory called “~/bin/findgrub301”:
chmod u+x ~/bin/findgrub301/findgrub
To run findgrub…
Thanks caf4926. I will give this a try when I have more time.
But you still do not understand why a program residing in ~/bin can be executed by calling it’s name and why this does not work (and you have to provide the full path to it) when it is in ~/bin/findgrub301.
@ hcvv: There’s enough blame to go around, but you don’t need to sound so patronizing. I did very carefully read the script and the posts of please-try-again and other contributors.
The problem is that ~/bin/findgrub301 is not in the path but ~/bin is or should be. So you can add the new directory to the path variable or simply put the executable in ~/bin. As you found you can also change the default directory and run it there or specify the full path to the program script.
I think that this is what hcvv is referring to.
Thank you for explaining the problem I ran into and pointing out the solutions. Had I seen the entire script of version 3.0.1 I would have copied it directly into ~/bin.
My apology. No harm intended!
I applogize when you think I blamed you. That was not my intention. But you were so joyfull in explaining that your problem was solved, while it was clear to me that it wasn’t because you did not understand why something in* ~/bin* is executed when called by name and something in* ~/bin/somedir* isn’t. And I guessed that that was what you were after.
Thus I tried to trigger you into asking more. Because I found out that many people are satisfied when something “works” instead of when something is “solved”. In that case I could have spared the time.
I see that #gogalthorp took the time and effort to try to explain to you what I should have told you. I sincerely hope that you now understand
. what making a file executable (for the owner/group/world) means (you did use the *chmod, *but did you understand why?);
. what the PATH environment variable contains and how it influences the way you can call an executable file.
Please come back when you want more information.
This archive http://unixversal.com/linux/openSUSE/findgrub301.tgz contains 2 files, findgrub and cfindgrub, the colored version of findgrub, that includes escape sequences, which would get lost by copying/pasting. That’s why I packed the files in a .tgz archive. You can install findgrub in two ways.
- by dowloading and extracting this archive in a directory in your PATH, such as /usr/bin, /usr/local/bin or ~/bin. It’s a good habit to put self compiled programs or scripts in /usr/local/bin or in your user ~/bin. You might have to create these directories (and make sure there are in your PATH).
tar -xvzf findgrub301.tgz
zypper ar [noparse]http://download.opensuse.org/repositories/home:/please_try_again/openSUSE_11.4/[/noparse] PTA
zypper refresh -r PTA
zypper in updategrub
Thank you for your detailed answer. This is very helpful. Can you add this part to the post regarding findgrub version 3.0.1 in your original post entitled “Looking for Grub…”?
Have a nice day!
Done. Looking for Grub and Windows bootloader in all partitions. - Page 8
Make sure you use the latest version though (3.1 and not 3.0.1)!