Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My 10.04 system (OS-1) got into a tangle the other day, so I installed a second, dual-boot 10.04 (OS-2), so that I could trouble-shoot the hung system...

In case it is relevant to my question, I'll mention that since I got OS-1 working again, it has shown a few battle wounds from its ordeal (.. actually the ordeal was mine ... trying to figure it all out ;) ... I lost some custom settings, but not all.

(For the curious: the hangup was caused by rsync writing 600 GB to OS-1's 320 GB drive.. The destination drive was unmounted at the time, and rsync dutifully wrote directly to /media/usb_back; filling it to capacity... I have since, ammended my script :)

Because the dual-boot MBR was prepared by OS-2, it is first on the grub list.. However, I want OS-1 to be the default OS to boot...

From OS-1, I tried two methods to change the grub-menu's defaule OS. eg.

  1. Directly editing /etc/default/grub (then update-grub)

  2. Running 'Startup Manager' (then update-grub)

Neither of these methods had any effect... so I started OS-2, and tried method 1... It worked!

Why can I not change the grub menu from OS-1? .. or if it can be done, How?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The problem is that you currently have two Ubuntu installations, each with their own grub.cfg, but only one grub installation. When you boot your computer, grub loads and reads the grub.cfg from OS #2. To make it so that grub reads from OS #1's grub.cfg you need to install grub from within OS #1. In addition you want to make sure that OS #2 is not configured to install grub on upgrades, or else it will overwrite OS #1's grub again.

These instructions assume that you only have one hard drive, /dev/sda:

First boot OS #1 and run sudo grub-install /dev/sda (note that this should not be a partition like /dev/sda1). Then boot OS #2 and run sudo dpkg-reconfigure grub-pc, this will ask a few questions. For the first and second question leave the option at its default value (the first will likely be blank, this is normal). For the third question, "GRUB install Devices", make sure that no install devices are selected (you can toggle whether a device is selected with the space bar, and move between devices with the arrow keys). You will be asked to confirm that you really want to continue without installing grub, select yes.

share|improve this answer
    
Thanks Jordan.. That was well explained.. I've run the commands, and everything went smoothly... grub is back under the control of OS-1... (the grub "mystery" is starting to be less mysterious :) –  Peter.O Jan 4 '11 at 6:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.