LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 06-29-2011, 12:20 PM   #1
simw
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Rep: Reputation: 0
Grub 1.99 and multi-booting Ubuntu 11.04 32 bit and Ubuntu 11.04 64bit


Hi

I had a 100GB hard drive with (originanlly) Windows XP and Ubuntu 10.10 64 bit. I tried to upgrade Ubuntu to 11.04 and it started going wrong. After failing to figure out the problem (to do with the ATI graphics card drivers I think) it stopped loading at all from grub - I think this may have been a grub problem rather than an Ubuntu problem though. Anyway, I decided to "fix" the problem by loading 11.04 from a CD (from linux user magazine). This worked fine but didn't want to overwrite my old distro, so I now have two versions of Ubuntu side by side with a new grub that was installed automatically from the live CD from linux user as part of the Ubuntu 11.04 install process.

Naturally Grub has recognised my pre-existing Ubuntu 64 OS and is offering to boot into it for me. Now that I have this set-up I would quite like to keep it so I can try and spot differences between the 32 and 64 bit versions. I am just wondering what will happen if I boot into the 64 bit OS. With the old 64 bit OS I messed around a little with Grub configurations and will want to do so again but I would rather start from a clean sheet with the new OS. In particular I don't want the grub settings to be changed each time I boot into the other OS, and I don't want to have to keep both grub configs mirroring each other. If I boot into the old OS I am afraid that it will try and amend the grub itself, or install a new grub to overwrite the current one or something. Do I perhaps need to disable grub-update in one of the OS's and if so is there some way of doing this? Any suggestions gratefully received. Please let me know if you would like me to post some info (e.g. partition stuff etc.).

Thanks
Sim
 
Old 06-29-2011, 12:50 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
What you can do is boot into the install that you do not want to control the grub on the MBR and open up synaptic and search for grub-pc.

With the drop-down menu you can select to reconfigure.

After verifying what partition this is,then choose to install grub to the PARTITION (PBR.)

Grub will complain and say that this is a bad idea and that it must use blocklists, but just say yes.
 
Old 06-29-2011, 01:30 PM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
If either of your linux installations is bootable, you can run
Quote:
update-grub
and it should find the other os
If it fails to find the other os, you can mount the other partions and run "update-grub" again and it will detect then.
From what I read you have Winsxp ubuntu32 & ubuntu64 are these on 1 hard drive? If they are you should post output of "fdisk -l", so someone can let you know if your partitions are right.

Last edited by EDDY1; 06-29-2011 at 01:33 PM.
 
Old 06-29-2011, 01:32 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Welcome to LQ.

Quote:
With the old 64 bit OS I messed around a little with Grub configurations and will want to do so again but I would rather start from a clean sheet with the new OS. In particular I don't want the grub settings to be changed each time I boot into the other OS, and I don't want to have to keep both grub configs mirroring each other. If I boot into the old OS I am afraid that it will try and amend the grub itself, or install a new grub to overwrite the current one or something. Do I perhaps need to disable grub-update in one of the OS's and if so is there some way of doing this? Any suggestions gratefully received. Please let me know if you would like me to post some info (e.g. partition stuff etc.).
When you install a distro, at some point during the installation you have the option of installing the first stage of grub either to the MBR (Master Boot Record) of the hard drive, or to the root partition of the distro. If you accept the default, each distro you install after that first one will install grub to the MBR The end result is that the last distro installed is the one that has it's first stage of grub (with pointer to the /boot directory and the Linux kernel) in the MBR.

Now, when you run grub-update on each distro, it will overwrite the MBR and change the pointer to the rest of grub from one distro to another. It will get very confusing quickly.

Solution: select one distro to be the Master, and the other distro as slaves (or think of it as one distro as a server and the others as clients). Install grub from the Master distro to the MBR (grub-install /dev/hd0 or some such command). The first stage of grub will point to the partition that contains the /boot directory of the Master distro. All other distros you install after the Master, be careful during installation to specify installin grub to the root partition instead of to the MBR. For all distros installed already (other than the Master), re-install grub to the root partition (something like grub-install /dev/hd0,1, grub-install /dev/hd0,2, etc depending on the partition number the distro is in).

With grub re-configured that way, when you run grub-update on each distro, the Master still has the MBR and the others will only update their grub in the root partitions and not affect the MBR.
 
1 members found this post helpful.
Old 06-29-2011, 04:23 PM   #5
simw
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Dear Bigrigdriver - thanks for the welcome and thanks for the brilliant advice - you have gleaned exactly what I would like to do! Now I just need to try and boot into the old OS and then get the re-install of grub performed successfully on the right partition. I'll give it a go (though perhaps not tonight) and will post back with how I get on.

p.s. thanks also to andrewthomas who I think is saying the same thing (with a handy gui tool for doing it) - but I didn't understand his suggestion properly until I had read Bigdriver's :-)
 
Old 06-29-2011, 04:33 PM   #6
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Quote:
Originally Posted by simw View Post
Dear Bigrigdriver - thanks for the welcome and thanks for the brilliant advice - you have gleaned exactly what I would like to do! Now I just need to try and boot into the old OS and then get the re-install of grub performed successfully on the right partition. I'll give it a go (though perhaps not tonight) and will post back with how I get on.

p.s. thanks also to andrewthomas who I think is saying the same thing (with a handy gui tool for doing it) - but I didn't understand his suggestion properly until I had read Bigdriver's :-)
Yeah, I guess I was a bit light on the details.

It is probably not a good idea to just blindly following advice that is not properly explained.
 
Old 06-29-2011, 05:25 PM   #7
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
In particular I don't want the grub settings to be changed each time I boot into the other OS, and I don't want to have to keep both grub configs mirroring each other. If I boot into the old OS I am afraid that it will try and amend the grub itself, or install a new grub to overwrite the current one or something
Grub doesn't make changes everytime you boot into different os, You can change which os is in control by issuing command "update-grub" from the linux-os that you want in control provided it has grub installed also.
 
Old 07-01-2011, 06:18 AM   #8
simw
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Eddy1

Thanks for this. Understood. I booted successfully into the 64 bit OS and no changes were made to the grub. I think though that if I allowed the system to do any auto-updating that involved the kernel being updated it would automatically do a grub-update. So my plan is still to attempt to install grub associated with the 64 bit OS on the partition where the OS itself is located. I haven't attempted that yet. I am assuming that I don't need to download grub again since I already have it (though synaptic package manager doesn't seem to suggest that it is for some reason - what would actually happen if I did download say grub-pc - would it automatically uninstall the version that came automatically with the distro?) - I just need to install it again on the specified partition. My only hesitation now is that I want to be exactly sure that I specify the right partition. Could someone maybe let me know the easiest way to confirm the name of the partition that a particular OS is loaded onto?

Thanks again for everyone's help.
 
Old 07-01-2011, 09:14 AM   #9
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Quote:
Originally Posted by simw View Post
I am assuming that I don't need to download grub again since I already have it (though synaptic package manager doesn't seem to suggest that it is for some reason - what would actually happen if I did download say grub-pc - would it automatically uninstall the version that came automatically with the distro?)
It will not reconfigure, just reinstall
Quote:
Originally Posted by simw View Post
- I just need to install it again on the specified partition. My only hesitation now is that I want to be exactly sure that I specify the right partition. Could someone maybe let me know the easiest way to confirm the name of the partition that a particular OS is loaded onto?

Thanks again for everyone's help.
The output of
Code:
cat /etc/fstab
or if that uses UUID's then
Code:
df -h
or
Code:
ls -al /dev/root
Then to install grub2 to the / partition.

You want to open Synaptic, then type grub-pc in the search box.

When it is in the list, click on the line containing the entry to select it and go to the package drop-down menu and choose to reconfigure.

The second screen should show you the GRUB install devices.

Just check the partition where your / is and choose to go on.
 
Old 07-01-2011, 10:33 AM   #10
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
It has been a while but you can choose where you want the boot loader "grub". When you get to where it tells you how much disc space is required then I believe the next window will give you three options.

Select the 'Manuel' button and then it will open to all your partitions. All you do there is click on the partition you want then click the button 'change'

I always format mine and select the ext4 file system

Then in the bottom select what you want. ( I make two partitions (/) (/home).
after that window it will open a window that at the bottom you will see boot loader. That is where you can select the partition to install.
 
Old 07-01-2011, 11:40 AM   #11
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Thanks for this. Understood. I booted successfully into the 64 bit OS and no changes were made to the grub. I think though that if I allowed the system to do any auto-updating that involved the kernel being updated it would automatically do a grub-update. So my plan is still to attempt to install grub associated with the 64 bit OS on the partition where the OS itself is located. I haven't attempted that yet. I am assuming that I don't need to download grub again since I already have it (though synaptic package manager doesn't seem to suggest that it is for some reason - what would actually happen if I did download say grub-pc - would it automatically uninstall the version that came automatically with the distro?) - I just need to install it again on the specified partition. My only hesitation now is that I want to be exactly sure that I specify the right partition. Could someone maybe let me know the easiest way to confirm the name of the partition that a particular OS is loaded onto?
My point is that as long as you have grub, even if it updates, you boot the os which you want to be in control and do a simple "update-grub" and it has control again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wacky mixed up boot loader: Multi-booting Vista, Ubuntu and PCBSD penguinquack *BSD 1 12-12-2010 11:35 AM
Can't Figure out how to edit the default GRUB boot order in Ubuntu 9.10 64 Bit xzillerationer Linux - Newbie 4 03-25-2010 07:53 PM
Check disk after booting Ubuntu (64-bit) srirohit Linux - Newbie 1 09-18-2008 09:24 AM
Grub, Ubuntu and HP Recovery (not booting) greeklegend Linux - General 4 06-03-2006 10:38 AM
Dual-booting Ubuntu using Grub fails tsalem Linux - Newbie 10 01-25-2005 10:47 PM


All times are GMT -5. The time now is 12:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration