Help - Search - Members - Calendar
Full Version: bash: lilo: command not found
The Planet Forums > System Administration > General Support Questions
eLX
root@vasenol [/boot]# lilo -v -v
bash: lilo: command not found

root@vasenol [/boot]# service httpd restart
bash: service: command not found

WTH ? I noticed this when trying to update the kernel to the new version and do the lilo check.

What can i do to fix this ?
Gromit
1. How did you become root? Did you ssh in directly as root, or did you log in as another user and use the su command? The reason I ask is that if you just did "su" then you aren't really the root user. You would need to use "su -l" or simply "su -" to truly become root. If you aren't really root then you won't have access to certain commands.

2. If you really are root, are you sure that your server uses lilo and not grub?

That's all I've got...
amusive.com
QUOTE
Originally posted by Gromit
1.  How did you become root?  Did you ssh in directly as root, or did you log in as another user and use the su command?  The reason I ask is that if you just did "su" then you aren't really the root user.  You would need to use "su -l" or simply "su -" to truly become root.  If you aren't really root then you won't have access to certain commands.

2.  If you really are root, are you sure that your server uses lilo and not grub?

That's all I've got...


su does still make you the "real root" user. It just won't update your path to include scripts in various paths logging in as root would. The - does this.

However, you can just do:

whereis lilo

And that should show you where the lilo binary is.
eLX
Yes i logged in using "su" and not "su -", so that may have been the problem.
To use lilo i had to go to /sbin and perform the command. Well thanks for your help. icon_smile.gif
solokron
Hmmm.

root@webx [/var/spool/up2date]# lilo -v -v
-bash: lilo: command not found
root@webx [/var/spool/up2date]# whereis lilo
lilo:
root@webx [/var/spool/up2date]#

It is not on this server for some reason.

*Yes, I am logged in as root. Yes, I have checked /sbin
eth00
What version of redhat are you running? RHEL4 does not have lilo and instead runs grub.

The service command is weird, try running

/sbin/service httpd restart

and see if that works, it should at least find the service command. If it does not something weird may be going on and you may want to take a quick look around for exploits...


*edit* just to be sure you are running a redhat based distro, right ?
EV1S-Scott
Hi All,
A quick and easy way to see if you are running GRUB or LILO is to look at the first 512 bytes of your boot device. For example, on a server I have, my boot device is /dev/hda (your's might be /dev/sda). Here's how I can see I'm running GRUB:

CODE
[root@thomas ~]# head -c512 /dev/hda | strings

ZRrI

D|f1

GRUB

Geom

Hard Disk

Read

Error

ZUG     U

[root@thomas ~]#


I suggest you use a trick like this to see which boot loader you are currently using, and then try to edit its configuration file.

Thank you,

Scott O'Neil
Systems Support Specialist
scott [at] ev1servers.net
solokron
This is a newly provisioned server. It has RHEL4 so it uses grub instead.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.