[SOLVED] Editing the grub2 boot menu in a dual boot machine
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Editing the grub2 boot menu in a dual boot machine
I would be grateful if someone would help with this:
I have a dual boot machine that is running Windows XP and Ubuntu 10.04. It was previously Win XP/Ubuntu 9.10, but for various reasons I did a 'clean' install of Ubuntu 10.04 and having done so I ended up with a machine that was unbootable unless I "jumped through a lot of hoops".
I used the Windows 'fixmbr' facility and am now able to boot it either into Windows or Ubuntu. However, I want the boot menu to default to Windows like it did before, instead of to Ubuntu because someone else uses the machine.
The literature says that grub.cfg cannot be edited but that it can be modified by the addition of a file called /etc/grub.d/40_custom into which one can copy parts of 'menu.lst'
What exactly must I put into this file to make the boot menu default to Windows? I am beginning to think it might be easier to install Ubuntu 9.04, edit menu.lst and then upgrade to 10.04. I have another machine which is also dual boot and which I upgraded to 10.04 and didn't have any problems at all afterwards.
I should mention that Ubuntu and Windows are on separate hard drives
Use the "grub2" link in that article. Takes you to a very good overview. Describes exactly what you need - don't forget the update-grub afterwards.
Looks like a GUI is available for these sort of updates now - haven't looked at it.
Hi, if anyone is interested, I set the default OS to Windows by editing /etc/default/grub and changing 0 to 6 in the line "Grub default" and then using the command 'update-grub'. However, I now have another problem - a situation rather than a problem. Update manager has installed a new version of the Linux kernel so that I now have both the previous kernel and the latest one showing in the boot menu. While it is not a problem in itself I would like to remove the entries relating to the previous kernel so the the boot menu does not get longer and longer with every new release of the kernel. Anyone know how to do this? It is grub2 that I have so it is not a question of editing menu.lst as there isn't a menu.lst and deleting the unwanted lines.
Thanks for the information, grail. I have just one more question: in my /boot folder there are two sets of four files. One set ends in -2.6.32-21-generic and the other ends in -2.6.32-22-generic. The four files in each set are abi- config- system.map- and vmlinuz-. Should I delete all four files in the set ending with 2.6.32-21?
This is probably a very naive question but grub2 seems to have very steep learning curve especially when one is not a programmer