LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 01-30-2010, 03:11 AM   #1
msbstar
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.4
Posts: 122

Rep: Reputation: 16
Question 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
 
Old 01-30-2010, 03:15 AM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

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

sudo /sbin/grub
 
Old 01-30-2010, 03:20 AM   #3
msbstar
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.4
Posts: 122

Original Poster
Rep: Reputation: 16
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
 
Old 01-30-2010, 03:24 AM   #4
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
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
 
Old 01-30-2010, 03:36 AM   #5
msbstar
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.4
Posts: 122

Original Poster
Rep: Reputation: 16
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!!
 
Old 01-30-2010, 04:46 AM   #6
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
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.
 
Old 01-30-2010, 11:19 AM   #7
Bratmon
Member
 
Registered: Jul 2009
Location: 75.126.162.205:80
Distribution: Arch / Mint 17
Posts: 297
Blog Entries: 3

Rep: Reputation: 50
Ubuntu 9.10 uses grub2.
https://help.ubuntu.com/community/Grub2
 
Old 01-30-2010, 12:05 PM   #8
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX
Posts: 565

Rep: Reputation: 57
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the "data type" of an "unknown variable" in "C Language" ? Affair Programming 8 06-20-2009 01:30 PM
LFS6.3 livecd "ls : command not found" error after "su - lfs" rotu Linux From Scratch 2 06-19-2008 04:59 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
how do I get around the "submit passwd" prompt in ubuntu even if I use "sudo"? t3gah Linux - Distributions 1 02-22-2005 05:42 PM
<input type="button" disabled="true" > does not work in ns4.7 or 4.9 cybercop12us Programming 2 11-29-2002 09:31 AM


All times are GMT -5. The time now is 09:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration