LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 10-15-2008, 12:41 PM   #1
abolishtheun
Member
 
Registered: Mar 2008
Posts: 183

Rep: Reputation: 31
dual booting, grub, /boot


I know this is a basic question but I've never really done it so I'm confused. How exactly do you install a second distribution on your machine? Say my current setup with centos is as follows:

Code:
100 mb   for /dev/sda1 mounted at /boot
2000 mb  for /dev/sda2 as swap
10000 mb for /dev/sda3 mounted at /
10000 mb of free space
When I install a second distribution, say ubuntu, I want to use the free space /dev/sda4 and mount it at root /. But where I mount /boot?

a) Do I somehow reuse the /dev/sda1 partition without reformatting it? (In which case, how do I get the initrd and vmlinuz and other files needed for ubuntu booting onto /dev/sda1?)

b) Or do I let /boot reside on /dev/sda4 with the rest of the file system? (In which case, I assume I manually make an entry for grub.conf in centos for ubuntu, using the appropriate root (hdX,Y)?)

c) something else? am I missing something basic?
 
Old 10-15-2008, 12:56 PM   #2
lcole
Member
 
Registered: Aug 2003
Location: Oregon
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 18
I would build a new /boot and / out of the free space.
Then depending on how you install grub either OS can be the main bootloader. If you install new grub in MBR the new OS to manage both and usually link to the old os automatically. Or install grub in /boot2 to have original /boot to manage both requiring your manual update manual update.
 
Old 10-15-2008, 01:00 PM   #3
jimbo1954
Member
 
Registered: Oct 2006
Location: High Wycombe, Bucks, UK.
Distribution: Debian and Fedora Core in equal measure
Posts: 264

Rep: Reputation: 33
You should just use the (in this case) Ubuntu installer as normal, and at the point when the partitioner starts up, tell it to use the largest free space, and it will use the available space and partition it correctly. It will then write the MBR and set up Grub so that you get a screen at boot time when you can select either of the installed OSes. This works OK with a "windows then linux" or a "linux then linux" install, but don't try "linux then windows" because the undisciplined mess that (IMHO) is windows may/will stomp all over the original OS
 
Old 10-15-2008, 01:21 PM   #4
abolishtheun
Member
 
Registered: Mar 2008
Posts: 183

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by lcole View Post
If you install new grub in MBR the new OS to manage both and usually link to the old os automatically.
My understanding is that the MBR is just 512 bytes of data on the first sector of the harddrive... is grub really installed *on* the MBR? or does it just point to the filesystem with grub installed? this would make sense to me because then you could have as many /boot partition as you wanted, as you two are suggesting...
 
Old 10-15-2008, 01:27 PM   #5
lcole
Member
 
Registered: Aug 2003
Location: Oregon
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 18
You are correct about the MBR. The MBR only points to and loads the initial boot loader. The initial bootloader must then know about all other OS on your system and link to their respective loaders.
 
Old 10-15-2008, 01:40 PM   #6
abolishtheun
Member
 
Registered: Mar 2008
Posts: 183

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by lcole View Post
You are correct about the MBR. The MBR only points to and loads the initial boot loader. The initial bootloader must then know about all other OS on your system and link to their respective loaders.
I'm starting to get a clear picture here... so if I just do a default install of ubuntu with the free space,
a) I'll have an MBR pointing to the ubuntu's bootloader (say at /dev/sda5). (is it alright for the initial bootloader to be installed on a logical partition?)
b) that initial bootloader will point to the vmlinuz's and initrd's and other files for ubuntu on /dev/sda5 (ie, on the same partition as the initial bootloader) and centos on /dev/sda1.

Is this correct?

Also, the final question is: how do I make the MBR point at a different initial bootloader? EDIT: I got this part down-- apparently you run /sbin/grub and run setup on the approrpiate partition...

Last edited by abolishtheun; 10-15-2008 at 02:27 PM. Reason: typo
 
Old 10-15-2008, 03:04 PM   #7
lcole
Member
 
Registered: Aug 2003
Location: Oregon
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 18
I think you've got it! Yes you can install /boot on a logical partition.
 
Old 10-15-2008, 03:30 PM   #8
abolishtheun
Member
 
Registered: Mar 2008
Posts: 183

Original Poster
Rep: Reputation: 31
Thanks for the help icole and jimbo. now if only grub wouldn't use its own nomenclature for partitions (hd0,0, etc....)... :-P
 
  


Reply



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
WinXP Fedora 8 Dual boot problem - XP booting - Don't see Grub loader gzero Linux - Newbie 7 02-28-2008 10:09 AM
Grub boot problem after dual booting any Linux with Vista aresgodofwar30 Linux - Newbie 10 02-08-2008 11:43 PM
Dual boot WinXP/Debian, grub error booting WinXP ChemBot Linux - General 5 02-22-2007 04:13 PM
"Error booting operating system" Repairing GRUB. SUSE 10.2 and XP dual boot Arma12 SUSE / openSUSE 11 01-28-2007 04:26 PM
Problems booting with GRUB on RH 7.3/ Win XP Dual Boot pasta4u2 Linux - Newbie 8 10-07-2002 10:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:16 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
Open Source Consulting | Domain Registration