Stop Microsoft
Operating Systems => Linux and UNIX => Topic started by: Siplus on 3 December 2002, 06:32
-
how can i uninstall lilo and install grub? i looked on my redhat cd1, but it only showed the package manager and there are no boot loaders in there. and, if i install grub now, will it still show my backed up kernal versions for linux?
like in lilo it has my kernal vers:
2.4.18-14
2.4.18-17.8.0 and
2.4.18-18.8.0
will grub let me switch between these (i don't know why i would need to, but i'm guessing that lilo put these in here for a reason)
-
You don't have to uninstall LILO. Just install GRUB which will overwrite the MBR to point to the GRUB loader. You can set up GRUB to boot between your different kernel versions just like LILO. Here's an example of my grub.conf:
As you can see I have 3 different Linux kernels and a Windows boot section. By not uninstalling LILO you can always revert back to it by running "# /sbin/lilo".
[ December 02, 2002: Message edited by: void main ]
-
umm, well i just installed grub, but when i reboot, it is still using lilo.
i extracted it using file roller (the nice
graphical unzip thing in GNOME),
and i see it in /etc (i think that's the directory), but nothing seemed to change
[ December 05, 2002: Message edited by: Siplus ]
-
try typing as root
grub-install /dev/drivewithmbr
replace drivewithmbr with whatever disk has the mbr. like /dev/hda or something
-
Before you configure GRUB to be your boot loader, make sure the GRUB configuration file is correct. You should find the grub.conf (or a link to grub.conf) in /etc/grub.conf. If it appears to be configured properly do as Chaos said and type:
# grub-install /dev/hda
Unlike LILO, this installation only has to be done once. You do not have to run the command again after modifying grub.conf. You certainly want to make a boot disk (and test the boot disk) before doing so. Just in case you have something wrong in the configuration file. See "man mkbootdisk" if your system has that utility.
[ December 05, 2002: Message edited by: void main ]
-
how does GRUB know when you change the .conf file? (i mean does it read it every time you start up?) (i suppose i just answered my own question, sorry!)
-
Yep, you just answered your own question. (http://smile.gif)
-
this seems kinda strange. i can type man mkbootdisk, but it doesn't recognise the command mkbootdisk. why would they include information about a command i do not have?
well, anyway. how do i create a linux boot disk if w/o using the command mkbootdisk?
-
Must be a RedHat specific command. I didn't see mention of what distro you were using and if you had I might have researched the particular advice before giving it.
-
well, i have redhat 8.0.....this is what i get:
-
ahh, try
/sbin/mkbootdisk
another redhack, for some odd reason redhat doesn't think that /sbin and /usr/sbin should be in roots path
-
"/sbin" and "/usr/sbin" *are* in root's path in RedHat. They are not in the normal user's path which if you notice he is logged in as a normal user because of the "$" prompt. And if you "su" from a normal user to root you are not going to get root's PATH or the rest of root's environment on any *NIX system. In order to do that you need to do a "su -" (notice the "-"). Now that does not explain why he didn't have the "man" page installed. To me that would indicate that he does not have the "mkbootdisk" RPM installed. If he does not he should install it from his RedHat CD.
To make a boot disk I would suggest this:
$ su -
(enter root's password)
# mkbootdisk --device /dev/fd0 2.4.18-14
If "2.4.18-14" is not your current running kernel version then use whatever version you are currently running. You can find out by typing "uname -r". Or just use that command as part of the mkbootdisk command like so:
# mkbootdisk --device /dev/fd0 `uname -r`
Notice the "`" is a left tick (or a starting single quote mark, or whatever the name is. I don't know what the "real" name is for that character).
[ December 05, 2002: Message edited by: void main ]
-
This is very funny....Cause I'm on RH8 and the mkbootdisk command works fine...I have not installed anything extra nor have changed the path variables. Maybe u need to login as root?
007
quote:
Originally posted by Siplus:
well, i have redhat 8.0.....this is what i get:
[/b]
-
quote:
Originally posted by void main:
Now that does not explain why he didn't have the "man" page installed. To me that would indicate that he does not have the "mkbootdisk" RPM installed. If he does not he should install it from his RedHat CD.
i'm sorry for the misunderstanding void, i said:
"i can type man mkbootdisk, but it doesn't recognise the command mkbootdisk.", what i ment to say was i can type
$man mkbootdisk
and i get the man file, but when i type
$mkbootdisk
it doesn't recognise the command
-
Then just follow the instructions in my previous note and you should be all set.
-
ok, now that i'm done asking about the boot disk, the command
#grub-install /dev/hda
does not work
-
You didn't put the "-" in the "su" command and the command is not found for the exact same reason your mkbootdisk command was not found. The command is in "/sbin" so you must either do an "su -" before running the command or use the full path "/sbin/grub-install".
-
ahhh.....thanks for your help void, and sorry for my constant questions....
-
quote:
Originally posted by Siplus:
ahhh.....thanks for your help void, and sorry for my constant questions....
No problem. That little "-" tidbit seems to be something that n00bs and many not-so-n00b people don't understand. It probably should be the very first item on a FAQ. I'll add it to my list to explain this and the differences in user and root environments, PATHs, etc. (http://smile.gif)