FAQ   Search   Memberlist  
Profile    Log in to check your private messages    Register    Log in
Editing grub to run 2 distros?

 
Post new topic   Reply to topic    BLAG Forum Index -> support
View previous topic :: View next topic  
Author Message
geoff
PostPosted: Wed Mar 09, 2005 3:15 am    Post subject: Editing grub to run 2 distros? Reply with quote

just installed Blag 30000 and it's wonderful. Blag is the best kept secret in Linux.
How, when and what do I do to run Fedora Core 3 alongside Blag on the same drive. I left space for it and I've read alot of stuff about editing the grub on the second distro which will give me a dual boot start up screen so I have a choice of booting into either. There is no Windows on the machine.
I'm a relative newbie and would appreciate simple terminology to do do this as I've tried it from reading the technical books and ended up only being able to boot into the second distro.
Hoping you can help me understand this better. Then one day Ill maybe learn how to be able to boot into a choice of 2 drives!
Thanks

jebba
PostPosted: Wed Mar 09, 2005 3:24 am    Post subject: Reply with quote

Try adding something like this to your /etc/grub.conf:

Code:
title BLAG (2.6.10-1.770_FC3)
        root (hd0,2)
        kernel /vmlinuz-2.6.10-1.770_FC3 ro root=/dev/hda3
        initrd /initrd-2.6.10-1.770_FC3.img

title Fedora Core 3 (2.6.9-1.681_FC3)
        root (hd0,6)
        kernel /vmlinuz-2.6.9-1.681_FC3smp ro root=/dev/hda8
        initrd /initrd-2.6.9-1.681_FC3.img


You will need to change:
vmlinuz-XXX to your kernel versions
root (hd0,0)
and root=/dev/foo depending upon your partitioning setup.

Note, you can add this to the /end/ of the grub.conf. You don't have to replace what's in there already, so you don't break things and lock yourself out.

-Jeff

jebba
PostPosted: Wed Mar 09, 2005 3:28 am    Post subject: Reply with quote

Oh, also, if you haven't installed FC3 yet, you should be able to do it side-by-side in it's installer.

It may get a bit confused though, cuz it will say LABEL=/ or something...

If you haven't installed FC3 yet...you might as well just save the space for music. ;)

-Jeff

geoff
PostPosted: Wed Mar 09, 2005 3:52 am    Post subject: Reply with quote

Thanks Jebba,
Yes I suppose it's a bit redundant putting FC3 alongside Blag
:)
It's just that I want to be able to do it. It doesn't matter which distro. I just like to fiddle with things as a sort of hobby.
I know it's a stupid question but do I edit the grub on Blag or the second distro to pick up Blag?

I've tried a lot of different distros but Blag works better than any of the more well known names.

Regards
geoff[/u][/b]

jebba
PostPosted: Wed Mar 09, 2005 6:34 am    Post subject: Reply with quote

geoff wrote:
Thanks Jebba,
Yes I suppose it's a bit redundant putting FC3 alongside Blag
:)
It's just that I want to be able to do it. It doesn't matter which distro. I just like to fiddle with things as a sort of hobby.


Gotcha. If you want to explore GNU/Linux distros, I recommend to try these:

Gentoo: if you want to explore compiling all the applications on your distro. This can be a bit complex and resource intensive, but gentoo implements it very well.

Ubuntu: a relatively recent distro which is based on debian. Debian itself is a very stable huge community based distro, which is excellent (especially in server environments).

Knoppix, or any of the LiveCDs. Another nice live cd, which is epecially media-based, is dynebolic.

If you want to explore a Free OS outside of the Linux realm, see OpenBSD. "Only one remote hole in the default install, in more than 8 years!" It's an extremely clean OS, with an exception firewall, but NetBSD appears to have the best cryptoFS of the Free OSes.

Guest
PostPosted: Wed Mar 09, 2005 9:51 am    Post subject: Reply with quote

Thanks for all the feeback Jebba,
It's a long learning curve and I've only known about Linux for 4 months. I wouldn't go back for anything.
You didn't answer one little point about which distro to edit the Grub.conf. Is it the existing Blag or on the other distro I install next?
I don't install second grub to the MBR do I?
Do I say no to installing the second Grub anywhere?
I hope this all makes sense?
Thanks for your patience
Regards
geoff :oops:

jebba
PostPosted: Wed Mar 09, 2005 6:23 pm    Post subject: Reply with quote

Anonymous wrote:
You didn't answer one little point about which distro to edit the Grub.conf. Is it the existing Blag or on the other distro I install next?
I don't install second grub to the MBR do I?
Do I say no to installing the second Grub anywhere?


You can use the grub installed by the subsequent OS or the one installed by blag. If the "next" OS you install detects blag it may add both OSes to grub automatically. I think it will vary from distro to distro, but they should detect it. Or during the next install you should be able to add it manually.

So, in sum, you can do it either way. Probably easiest to use the grub from your next OS install.

-Jeff

Guest
PostPosted: Thu Mar 10, 2005 4:49 am    Post subject: Reply with quote

Anonymous wrote:

You didn't answer one little point about which distro to edit the Grub.conf. Is it the existing Blag or on the other distro I install next?
I don't install second grub to the MBR do I?
Do I say no to installing the second Grub anywhere?


Well, it all depends. When you installed distro A, you probably told it to install Grub in MBR, so your system boots. So basically, yo've got this little bit of code sitting in MBR, and in partition that belongs to your distro A, there is a config file in /boot/grub/menu.lst. The bit of code in MBR refers to that config file, and all is peachy.

OK, so now you're installing distro B, and it asks you about installing bootloader... and you've got a choice. You can go ahead and install new bootloader. This will put a new bit of code in MBR, that will refer to /boot/grub/menu.lst of the distro you've just installed, distro B. This one probably doesn't know anything about distro A (well, maybe it detected its presence, but let's assume it didn't). So you have to tell it about distro A, by making appropriate entry in its config file - in other words, in /boot/grub/menu.lst of distro B.

Or, you can tell distro B NOT to install its bootloader. In this case, your old grub is left sitting in MBR, and it is still pointing to menu.lst file in distro A. It doesn't know anything about distro B you've just installed, so you have to tell it, by booting into distro A and changing its menu.lst accordingly.

Actually, you might have a third option: tell distro B to install bootloader, but in root partition rather than in MBR. What does that mean? Well, when the system boots, it will look in MBR, it will find your old Grub (from distro A) in there, and boot accordingly. So why bother installing new grub in root partition? Just because this is an easy way of finding out what entry distro B needs - see what got written in menu.lst of distro B, and simply copy it to menu.lst in distro A! It's just an easy way of making sure you'll have all those "append " and "initrd" and what-not entries your new distro needs to boot properly...

ferrix
PostPosted: Thu Mar 10, 2005 5:35 am    Post subject: continued, now registered :) Reply with quote

... and if after reading the above you'd still like to know what to do, well, I'll tell you :) I think the easiest course of action is to install the new bootloader. But first of all, before you start installing the new distro, write down (on paper) the contents of your existing menu.lst. THEN install the new distro, and install its new bootloader. Then you can modify its menu.lst with entry for the old distro, and you're good to go. This is the easiest way because you don't have to figure anything out - it's all done for you by the respective installers. The correct entry for your distro A was made by your old installer way back, and the entry for distro B was made by its installer as well; all you have to do is copy and paste. Plus, doing it this way saves you a reboot or two.
jebba
PostPosted: Thu Mar 10, 2005 7:54 am    Post subject: Reply with quote

Wow. Thanks for that explanation--very clear & covered it all.

One thing I'd like to point out that the grub configuration file can vary from distro to distro. In BLAG & FC3, & many others it's /boot/grub/grub.conf. There is also a symlink from there to /etc/grub.conf

In other distros (such as Debian & it's derivatives) the file is /boot/grub/menu.lst. The file has the same function.

You can re-install the MBR with the OS you are booted into with `grub-install /dev/hda`, for example. When you update the grub config file, you don't have to re-run grub-install (unlike lilo). You just need to run it if you want to change which grub config file is authroritative.

Happy trails & let us know what you find interesting in other distros. :)

-Jeff

geoff
PostPosted: Thu Mar 10, 2005 10:56 am    Post subject: I couldn't have said it better mysef Reply with quote

well I couldn't have said it at all :shock:
you guys are wonderful.
This info will kep me going for a long time.
I might ask another question of the forum later when I feel more confident
thanks
geoff

Display posts from previous:   
Post new topic   Reply to topic    BLAG Forum Index -> support
Page 1 of 1

Protected by Anti-Spam ACP