LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   When I type "sudo grub" it says "command not found" in Ubuntu 9.10 Live CD. (http://www.linuxquestions.org/questions/linux-newbie-8/when-i-type-sudo-grub-it-says-command-not-found-in-ubuntu-9-10-live-cd-785766/)

msbstar 01-30-2010 02:11 AM

When I type "sudo grub" it says "command not found" in Ubuntu 9.10 Live CD.
 
Hello,

I am going to reinstall my GRUB bootloader and some one
said do the followings:
****************************
sudo grub

> root (hd0,0)

> setup (hd0)

> exit
*****************************

But when I type "sudo grub" in terminal it gives this error:

"sudo: grub: command not found"

Would you please help me in this problem?

With best regards,
Hassan

r3sistance 01-30-2010 02:15 AM

You probably don't have path set-up for sbin, try the following line

sudo /sbin/grub

msbstar 01-30-2010 02:20 AM

Hello r3sistance,

Thanks for your reply.

I did what you said and still I got the same result.

What should I do??

Best regards,
Hassan

r3sistance 01-30-2010 02:24 AM

Hi,

You could try doing a 'sudo find / -name "*grub"', or if you have locate and updatedb use those instead as they are more effeicent at searches. That should give you the path for the grub command, just ignore configuration files and directories like /boot/grub

msbstar 01-30-2010 02:36 AM

Hi,

I typed "locate grub" and it returned dozens of lines.
In none of them I could find "menu.lst" and "grub.conf".

I have no idea what has happened to my Ubuntu!!

r3sistance 01-30-2010 03:46 AM

I believe this has been answered in a different thread for you, however you likely should have used locate *grub as this will stop wildcard finds after the word grub.

Bratmon 01-30-2010 10:19 AM

Ubuntu 9.10 uses grub2.
https://help.ubuntu.com/community/Grub2

worm5252 01-30-2010 11:05 AM

grub.conf and menu.lst should be located in /boot/grub/

I am on Debian so this might help you since Ubuntu is Debian based.
Code:

jared@Sarah:~/Movies$ locate *grub
/boot/grub
/etc/alternatives/desktop-grub
/sbin/update-grub
/usr/lib/grub
/usr/sbin/grub
/usr/sbin/update-grub
/usr/share/bug/grub
/usr/share/doc/grub
/usr/share/doc/kernel-package/README.grub
/usr/share/images/desktop-base/desktop-grub
/usr/share/kernel-package/docs/README.grub
/usr/share/lintian/overrides/grub
/var/lib/dpkg/alternatives/desktop-grub

For me my grub command is located in /usr/sbin/grub


All times are GMT -5. The time now is 07:22 PM.