Changing grub default boot order
Jim Byrnes
jf_byrnes at comcast.net
Sun Mar 31 17:48:54 UTC 2013
On 03/30/2013 11:25 PM, Basil Chupin wrote:
> On 31/03/13 00:38, Jim Byrnes wrote:
>> On 03/29/2013 10:51 PM, Basil Chupin wrote:
>>> On 29/03/13 02:47, Jim Byrnes wrote:
>>>> I upgraded from 10.04 to 12.04 by installing 12.04 on a different hard
>>>> drive and dual booting. Now I would like to make 12.04 (sdb) the
>>>> default. This link [1] suggests using grub-customizer [2]. Does
>>>> anyone have any experience with this app?
>>>>
>>>> [1]
>>>> http://askubuntu.com/questions/100232/how-do-i-change-the-grub-boot-order
>>>>
>>>>
>>>> [2]
>>>> http://www.howtogeek.com/howto/43471/how-to-configure-the-linux-grub2-boot-menu-the-easy-way/
>>>>
>>>>
>>>>
>>>> Thanks, Jim
>>>>
>>>
>>> I have read all the replies you received to your question. However, as
>>> you correctly point out when the next time you have an ugrade to the
>>> kernel or whatever you will strike hassles. So let's get this sorted out
>>> now instead of later. How about you provide us with:
>>
>> Basil,
>>
>> I think it is solved now by changing GRUB_DEFAULT=0 to
>> GRUB_DEFAULT=14. I think this should survive updates as 10.04 is at
>> the top of the menu and there will be no more updates to it. Thus sdb1
>> (12.04) will always be a position 14. To be complete I will provide
>> the info you requested.
>
> Hi Jim,
>
> I will leave responding to the rest of your message until after you give
> us the answer to this questions, and the reason why I am asking this is
> because that figure of 14 you set for the GRUB_DEFAULT is just plain
> wrong - or at least it is just plain zanny :-) . I expect this figure to
> be no more than 2.
Zanny or not, it works. I'll explain below how I arrived at it.
> So, could you please output to (a) file(s) and then upload the results
> to something like picpaste (and give us the URL(s)). The outputs will be
> a bit big which is why I am suggesting posting them on picpaste
> [http://picpaste.com/ ].
>
> The first thing to determine is whether you have really used grub
> (legacy) or grub2 for 10.04 (12.04 would definitely have grub2). To find
> out which is being used in 10.04 go to /boot and see if it has /grub
> and/or /grub2. If there is /boot/grub2 then it is most likely that you
> are using grub2 - in which case please output the contents of the file
> grub.cfg ( /boot/grub2/grub.cfg ) and upload it to picpaste, please.
>
Boot Info Script 0.61 says:
=> Grub2 (v1.97-1.98) is installed in the MBR of /dev/sda and looks at
sector 1 of the same hard drive for core.img. core.img is at this
location and looks in partition 1 for /boot/grub.
My note: this is 10.04
=> Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at
sector 1 of the same hard drive for core.img. core.img is at this
location and looks for (,msdos1)/boot/grub on this drive.
My note: this is 12.04Ba
> If you could then do same for the 12.04 installation and put up the
> result on picpaste.
>
> While you are in this /boot directory, have a look at how many versions
> of System.map, initrd, and vmlinuz files you have there. Each set of
> those corresponds to a version of a kernel which was was used in that OS
> (10.04) - and this is where I suspect that number 14 comes from. But
> let's confirm my hypothesis :-) .
>
> BC
>
Basil,
Tax return time is rapidly approaching here in the US and as usual I
have be procrastinating far to long. I just discovered that my return is
far more complex this year than it ever has been in the past. As a
result I don't have the time to provide all the info you requested about
a problem that I consider solved. How ever as you were kind enough to
take an interest in it I will provide some explanation.
I have multiple kernels on both hard drives. Based some info I found on
the net I simply started counting a 0 at the first entry in the boot
menu. When I reached the line I wanted to boot from it was 14. I
plugged that in as GRUB_DEFAULT=14 and it worked. I have rebooted
multiple times and it has automatically booted to 12.04 each time. I
tested and I can manually select 10.04 and boot to that also, so I think
I am OK now.
Thanks, Jim
More information about the ubuntu-users
mailing list