Any help on how to make GRUB refresh the list of partitions/systems? I posted this question here, no answer:
http://ubuntuforums.org/showthread.p...75#post7647675
Any help on how to make GRUB refresh the list of partitions/systems? I posted this question here, no answer:
http://ubuntuforums.org/showthread.p...75#post7647675
Abdus, each time you install an Ubuntu distribution and allow it to install grub, it scans your system for operating systems and writes a GRUB menu.lst which lists a boot option for each OS found.
The same would be true of most major Linux distros (Fedora, SUSE, etc).
So if you allow the last Linux distro to install GRUB to the MBR, you should be all set.
GRUB would read the /boot/grub/menu.lst in that last Linux distro's partition and you should see a boot option for each OS on your system.
If you want to regenerate the /boot/grub/menu.lst, then the command you looking for is
If you can not boot Ubuntu directly but can boot from a LiveCD, then you can generate the menu.lst by doing the following:Code:sudo update-grub
Boot from the Ubuntu LiveCD
Open a terminal (Applications>Accessories>Terminal). Type
Change sda5 to the correct name for your Linux root partition. If you have multiple Linux OSes installed, you must name the Linux root partition that is controlling the boot process. Usually that would be the last OS you installed.Code:sudo mount /dev/sda5 /mnt
Then type:
Code:cd /mnt sudo mount --bind {/,}proc sudo mount --bind {/,}sys sudo mount --bind {/,}dev sudo chroot /mnt grep -v rootfs /proc/mounts > /etc/mtab update-grub
I understand that, thank you. However it would feel much more safe to have the MBR managed only by one OS, i.e. my Ubuntu Jaunty, which is my main system, and the only one for everyday use. The other systems (windowses, linuxes) are just auxiliary, for testing purposes, and I don't want to let them manage my MBR for more than a few minutes reuired to restore it.
This command did not reread the partitions/systems anew, it just restored the menu as it was before.
After installing auxiliary OS's I restore my GRUB using the Ubuntu alternative installation CD, using the menu there ("install GRUB" or similar). This procedure works, however it just restores previous config instead of rereading patitions/systems anew. Would doing what you suggested by the GRUB console reread those?
Thanks for help!
Last edited by Abdus; July 21st, 2009 at 11:22 AM.
Ah, I see. I think the Ubuntu installer has some kind of script to detect partitions containing operating systems and then generate the appropriate boot stanzas in menu.lst. I don't know enough about the Ubuntu installer to tell you how to rip out that script so that you may run it independently.
There is no GUI for doing this either, as far as I know.
However, it is not really very hard to edit the menu.lst manually.
While booted into your main Linux OS (Jaunty), mount the last installed Linux distro at, say, /mnt:
(again change sda? to the appropriate name).Code:sudo mount /dev/sda? /mnt
Then open an editor with root privileges:
and open your "controlling" menu.lst. (Click the "Open" button and open /boot/grub/menu.lst.)Code:gksu gedit /mnt/boot/grub/menu.lst
Near the bottom of /mnt/boot/grub/menu.lst will be boot stanzas for each of your other operating systems. You can simply copy those stanzas and paste them into Jaunty's menu.lst.
That is an excellent tip, unutbu, thank you for it, I'll try it with no doubt! Are you sure that partitions UUIDs are same in both the linuxes on my machine though?
PS. I still find it unbelieevable that so well established and already old app as GRUB has no "rread" option. Amazing, isn't it?
this is it. thank you. u rock!!!
:/ anyone know how to fix my problem? frmo the previous page
July 27,
A vista update seems to have eaten part of my grub. Anyway, with this post and the help of others, I got it working again.
If the original submitter still reads, adding how to find the (hdx,y) would help. The "find /boot/grub/stage1" is not working on my installation. I had to do : find "/grub/stage1" . Searching for /boot/grub/stage1 resulted in an Error 15 : File not found.
I suppose any combination of
/boot/stage1
/boot/grub/stage1
/grub/stage1
/stage1
might return something.
Bookmarks