Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm tempted to draw the conclusion that the configuration of a Linux system is pretty complicated, and even confusing. For one thing, the configutation files for one application/service seem to be located in several places.
Take GRUB. There is "/boot/grub/grub.conf", and there is "/etc/sysconfig/grub". Which file do I modify if I wish to mount my Linux disk onto another machine?
Originally posted by correro What if there is inconsistency between "/boot/grub/grub.conf" and "/etc/sysconfig/grub", regarding, say, where GRUB is located? Would it still work it out?
Could you be more specific? If you mean:
/etc/sysconfig/grub is a text file that reads:
Then look to see which one exists. Most likely both won't. If both do, try:
And see which one is running (if any).
Obviously this won't be true with grub, but I am just using the example of the file in question
I think the confusion is where grub is and where grub.conf is. Grub is going to be the actual binary file, or something along those lines. grub.conf is simply the configuration file that you edit for grub to use/look at when it is called.
Well GRUB actually is a bit complicated like that. I'm not nearly correct in this, but here's a simple idea on how it works:
Grub places a small file, containing very little in the MBR. Everything it actually needs to boot linux is on the hd of the linux partition. Everything it needs to boot win is on the win partition. It basically just contains symlinks, not much else. This is why you don't need to run grub after making changes to ensure they are fed to the MBR.
Bad, bad example, but works for simplicity's sake. For more info on how grub works, or just more accurate info, check out some of the links on google.com/linux It's actually quite interesting.
GRUB is located on hdb. However, you don't need grub to boot win, just need to tell your BIOS where win is (the small file grub placed on the MBR does this), then win will boot win.
Grub points to win, win in turn then boots. Grub points to linux, which then in turn points to your grub executable and boots.
It really does seem very confusing if you don't know how grub works, or how boot loaders work (not that I am an expert, I've just read quite a bit on how grub and bootloaders in general work). Really, I suggest at least checking out this how-to (doesn't really explain alot, but should give you a small idea, check out www.google.com/linux and search on grub for more info, if you are really interested it's worth the read): http://www.tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/
I'm starting to get the picture. Thanks for your patience, MasterC.
To follow up with the previous example, if GRUB is on hdb, and then I change the Linux disk to master (therefore hdb becomes hda), or change it to secondary master (hdb becomes hdc), will it still boot?
that will be what you want eventually but (i would assume) that you don't want to change anything until AFTER you swap the device. swap the drive over and when you go to boot change the command you actually use to boot with (press e) replacing any hd1's with hd0 and then boot it and it should boot fine. once you're comfortable with that then change the configuration file permanently.
i've actually only been on grub a short time myself and havne't tried swapping a drive though so you *might* need to reinstall grub again into the bootloader so that it will know where to look for the grub.conf.
Getting back to the original question, there is one rule that is universally applicable to Grub. ALWAYS edit /boot/grub/menu.lst. There may be other files that are linked to this file, and there may be distros that make use of a link to this file. But the only consistent, certain method of effecting changes in Grub behavior is to edit /boot/grub/menu.lst.
Why is that different from Lilo (/etc/lilo.conf)? Because Linux is not a monolithic, monopolistic set of software, there are bound to be differences. Yes, there are standards that many distros have chosen to subscribe to, but there are also multiple (sometimes) competing standards that will someday be settled, but for now just aren't.
There are also differences in how some software creators view some standards. For instance, one could make a case that since Grub actually (at least initially) runs outside Linux, it is really not a Linux configurable item and therefore doesn't have to be in /etc, and infact makes more sense to be in /boot. I don't know that the GNU folks have chosen that as their rationale, but it could make some sense.
These differences can be confusing, that much is true, but for the most part, such differences are the exception rather than the rule.