Any way to repair grub in partition other than MBR.
I have ubuntu installed in sda1 and ubuntu's grub is in mbr.
Ubuntu's grub will chainload any other distro's grub installed in their respective partition. Just install Debian in sda2 and somehow Debian's grub is not installed. Is there any way that I can install/repair Debian's grub into sda2 partition without affecting - Ubuntu's grub (in mbr). - Debian's installation (ie. without reinstalling Debian) Thanks in advance for help. |
Sure, you can install Grub to the boot sector of the Debian partition while you are in Ubuntu:
Code:
sudo grub |
Quote:
|
Quote:
Code:
title Debian Grub Menu |
What about command;
Code:
grub-install /dev/sda What about when you want to install GRUB on the floppy disk?Would you then use "s" or "h"? |
Quote:
Code:
grub-install --root-directory=/mounted_sda2_partition /dev/sda2 Quote:
|
So,I've made my point.The thing is,I know that I made Lapsus Memoriae and I was wrong and you were right about "h" but also I was right about "s" for what I had in mind,also,as I've said within the question,GRUB can use "f" and now that you've confirmed that GRUB can use "s" and "f" I believe that we understand each other.That said,just to clarify,I didn't need your explanation for "How GRUB works" I just wanted you to say that GRUB can use "s" and "f".
Hope that this little discussion of ours will make some things clearer for someone. ;) |
Do you have any particular reason for chainloading grub to grub ? I mean, in most cases you don't have to, in fact it's senseless. Just tell it where the kernels are and it'll boot them, no need for chainloading.
|
Quote:
When the second (or fifth, ...) distro ships a new kernel they will update their config file. You will see it automatically. Stops people wondering why they aren't seeing that upate when they neglected to continually update their manual config. |
Quote:
|
Quote:
Grub will boot just a kernel, it doesn't really need anything else, just the HDD and partition and the path to the kernel. So, I don't get what you're saying. |
...and what if we have a line in /boot/grub/menu.lst for OS that we want to add to GRUB that looks like this;
Code:
kernel /boot/vmlinuz root=/dev/hda1 |
Quote:
if today debian's kernel is 2.6.26-1-686, the manually updated (not-debian) grub will be pointing to it. However, if tomorrow there's a new kernel 2.6.28.1-686, an update will only cause an update to debian's own grub menu, in my case hidden in debian's own boot partition (not inside mbr). The original (not debian's) grub at mbr will not be updated automatically. Chainloading will thus solve this "problem" of "not seeing that update". Hope I get this right :) |
You could update the second Linux's grub in it's own MBR, and then copy it's stanza from the second menu.lst to the main MBR's menu.lst file. You could keep the chainloading stanza for insurance. Hopefully you will be able to boot directly instead of chainloading.
|
Way too hard @jschiwal - I have dozens of systems, and I also build my own kernels.
@alan_ri has the right idea - except that as I said, I have so many kernels, that little kludge ain't gunna fly. But this is Linux - enough choices to satisfy everyone. |
All times are GMT -5. The time now is 05:36 PM. |