LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 01-20-2007, 09:47 PM   #1
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Rep: Reputation: 16
Multibooting with GRUB


I know there have been many GRUB questions in the past, but the answers and tutorials out there are too overwhelming to understand for a mere mortal like me...perhaps somebody might know the answers.

Do you only get access to GRUB after installing Linux?

I've heard in some places that Windows should be installed before Linux, and in other cases people saying that it is the other way around. What's the truth of this matter? (My guess is that it's Linux first because then otherwise how do you access GRUB to set everything up?)

Why have I sometimes seen menu.lst entries that omit the command root - doesn't it always need to be there?

If you have SCSI disks as opposed to IDE, what changes? Because isn't hda in Linux refer to the first IDE and sda refer to the first SCSI? But GRUB seems only to use hda0, hda1, etc...

P.S. I'd like to dual-boot RHEL 4 and Windows 2003 Server.

Last edited by veeruk101; 01-20-2007 at 09:52 PM.
 
Old 01-20-2007, 10:43 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by veeruk101
I know there have been many GRUB questions in the past, but the answers and tutorials out there are too overwhelming to understand for a mere mortal like me...perhaps somebody might know the answers.

Do you only get access to GRUB after installing Linux?
Pretty much, yes.
Quote:
I've heard in some places that Windows should be installed before Linux, and in other cases people saying that it is the other way around. What's the truth of this matter? (My guess is that it's Linux first because then otherwise how do you access GRUB to set everything up?)
Usually Windows is installed first. (That is how you buy the PC right?) When linux is installed, it overwrites the windows boot manager - installing GRUB to the MBR. If you've been reading around, you'll have seen lots of dual-boot howto's which assume windows is already installed. In fact, this is the easiest way to get a dual boot setup.
Quote:
Why have I sometimes seen menu.lst entries that omit the command root - doesn't it always need to be there?
It is certainly a good idea - can you point out these examples and their contexts please?
Quote:
If you have SCSI disks as opposed to IDE, what changes? Because isn't hda in Linux refer to the first IDE and sda refer to the first SCSI? But GRUB seems only to use hda0, hda1, etc...
Actually, GRUB has it's own disk numbering system with (hd0,0) for hda1 and so on. GRUB does not distinguish between ide and scsi drives.
http://www.gnu.org/software/grub/man...onvention.html
Quote:
P.S. I'd like to dual-boot RHEL 4 and Windows 2003 Server.
This can be done - and you won't need to worry about the finer points. Win2003S is already installed, and the RHEL installer (anaconda) will handle the rest.

Relax - just do it...

Last edited by Simon Bridge; 01-20-2007 at 10:46 PM.
 
Old 01-20-2007, 11:52 PM   #3
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Original Poster
Rep: Reputation: 16
Thanks for those answers, it helps.

Could you explain what to do once Windows is already installed? Usually Windows is installed onto one full unpartitioned disk...you'd then have to partition the disk yourself...wouldn't that destroy the data on the disk/partition containing Windows (or whatever OS is currently on the disk)? I'm under the impression that that whatever's on a disk when you try to repartition has an almost sure chance of getting messed up, no?

(Does Anaconda take care of the above case by somehow magically not corrupting what's currently on the unpartitioned Windows disk? If so, that's pretty cool!)

At what stage would you partition the Windows installation? Before or after popping in the Linux installation CD?

Now if you only get access to GRUB after installing Linux, and you pop the Linux installation CD into the computer that already has Win on it, at what stage would you configure all the GRUB stuff...? It seems like you'd need GRUB to do all that, but you only get GRUB after Linux is installed, right?

What's the diff between backing up 512 bytes of the MBR vs only 446? I understand the latter bit is the partition tables, but why do some tutorials recommend not backing up that part too? When would you back up and restore one vs the other?

Is it necessary to back up each boot sector of every partition, or just the MBR?

Thanks.
 
Old 01-21-2007, 12:52 AM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by veeruk101
Thanks for those answers, it helps.

Could you explain what to do once Windows is already installed? Usually Windows is installed onto one full unpartitioned disk...you'd then have to partition the disk yourself...wouldn't that destroy the data on the disk/partition containing Windows (or whatever OS is currently on the disk)? I'm under the impression that that whatever's on a disk when you try to repartition has an almost sure chance of getting messed up, no?

(Does Anaconda take care of the above case by somehow magically not corrupting what's currently on the unpartitioned Windows disk? If so, that's pretty cool!)
It is cool!

With an existing windows install, you have to resize the windows partition. Anaconda can do the resizing for you (using a gui too) but, to avoid losing data, you need to make sure that windows occupied only the very beginning of the partition. So, before doing anything with the linux install media, you have to defrag your disk.

Quote:
At what stage would you partition the Windows installation? Before or after popping in the Linux installation CD?
Quite a few people use parted (from knoppix or ubuntu live CDs) or the commercial "Partition Magic" to resize the windows partition. This is done before you do anything with the linux installation media.

However - there is nothing intrinsically wrong with letting anaconda handle this.

That said: whatever you choose to do - always backup important data before attempting to manipulate partitions.

Quote:
Now if you only get access to GRUB after installing Linux, and you pop the Linux installation CD into the computer that already has Win on it, at what stage would you configure all the GRUB stuff...? It seems like you'd need GRUB to do all that, but you only get GRUB after Linux is installed, right?
Anaconda will ask you which boot manager you want (GRUB is the default) and where you want to install it (MBR is the default). It will handle the grub configuration for you - including adding the entry for your windows partition to boot.
Quote:
What's the diff between backing up 512 bytes of the MBR vs only 446? I understand the latter bit is the partition tables, but why do some tutorials recommend not backing up that part too? When would you back up and restore one vs the other?
You don't need to backup the MBR
Quote:
Is it necessary to back up each boot sector of every partition, or just the MBR?
In linux, we usually backup the /home directory by default - this usually contains all your personal stuff. Quite a few people backup /usr as well. People worried about non-bootable configurations will sometimes backup their /boot. This contains everything needed to boot - so if you should suddenly have a non-bootable computer, you just copy it back.

windows fixboot and linux grub-install will recover MBR fine.

Last edited by Simon Bridge; 01-21-2007 at 01:04 AM.
 
Old 01-21-2007, 01:46 AM   #5
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Original Poster
Rep: Reputation: 16
Thanks again for your respose.

Now if you theoretically wanted to install Linux before Windows (even though the other option's easier, I just wanna know for learning purposes), what changes in what you've mentioned? I ask because I have a completely empty computer that I'm going to start off with only Linux (and would like to add on Windows later only if I absolutely end up having to).

Let me see if I have the process right:

1) Pop in the Linux CD
2) During installation, create two partitions (one for each OS that may eventually be installed)
3) Finish installation having set GRUB to install on MBR
4) Pop in the Windows CD and install to the other partition

Is this where things can go wrong? Because even though I've set GRUB to be the boot loader, windows overwrites the MBR with its own right? So what would be the process (in basic terms) of replacing whatever Windows puts there with GRUB again?

If I were to overwrite the Windows entry in the MBR with GRUB, would there be no loader for Windows to delegate to (because Windows' loader was the MBR itself)? Or do OSs always install something in their own boot sector regardless of whether they put something in the MBR?

Or (dare I ask? could we just do away with GRUB and use whatever Windows puts in the MBR to delegate to the Linux boot sector just as GRUB does for Windows)?

Thanks! (I know that knowing the answers to some of these questions aren't necessary to get things working, but I'd really like to learn about how some of these things work)
 
Old 01-21-2007, 05:23 AM   #6
varun_shrivastava
Member
 
Registered: Jun 2006
Distribution: Ubuntu 7.04 Feisty
Posts: 79

Rep: Reputation: 15
Always install windows first on 1st primary partion
than install linux on 2nd primary partion, make sure that u do not install linux
on MBR (u can but problem is that if in future u reinstall or repair your windows, it will overwrite the MBR and your linux boot info is lost)

now after installing linux, make the 2nd partion active ie the one containing linu
the advantage in installing linux after windows is that grub automatically detects windows OS and configures itself to show two OS in its bootloader page
 
Old 01-21-2007, 08:01 PM   #7
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Original Poster
Rep: Reputation: 16
Does it matter whether I create the extended partitions using Windows or Linux? Also, what must be on a primary partition and what can be on an extended partition? (e.g. Linux, Windows, Linux swap, and whatever else I might need?)
 
Old 01-21-2007, 08:16 PM   #8
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Since you said you have an empty computer, I suggest that you download the GParted LiveCD, and use that to partition your disk. Create one partition for Windows, this must be a primary partition. Make the rest of the disk an extended partition, and in that create one logical partition for / and one for swap. Swap should be 2x your RAM. This is quite easy using the GParted LiveCD - it is all GUI.

Then install Windows to the partition that you created for it.

Then insert the Linux install disk, and it will boot to the Anaconda installer. Install Linux to the partition you created for it, and tell it to use the partition you created for swap as swap space.

Anaconda will detect Windows, and set up GRUB appropriately. You can use Windows Boot Loader, but it is much easier to use GRUB.

Only Windows must be installed to a primary partition, Linux can be installed to either Primary or Logical.

I hope this helps
--Ian
 
Old 01-21-2007, 08:53 PM   #9
Hitboxx
Senior Member
 
Registered: Mar 2006
Location: India
Distribution: Fedora
Posts: 1,562
Blog Entries: 3

Rep: Reputation: 61
Quote:
Swap should be 2x your RAM
Only if you have less than 1GB RAM else, 256mb should suffice.(which will be hardly used anyways)
 
Old 01-21-2007, 09:42 PM   #10
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Original Poster
Rep: Reputation: 16
IBall, thanks for the detailed answer.

What's the difference between using Linux or Windows' partitioning capabilities (e.g. Anaconda or the partition screen on the Windows install) vs a separate program like GParted LiveCD that you've mentioned? Isn't partitioning a simple enough task that it doesn't matter?

Edit: Also, could somebody please explain how LVM fits into this whole concept of partitioning and multibooting? Is LVM just a Linux but not Windows concept? It seems you can only work with LVM on a currently installed Linux, so could it not be used as a partition on which another OS would be installed?

So confusing!

Last edited by veeruk101; 01-21-2007 at 09:52 PM.
 
Old 01-22-2007, 03:58 AM   #11
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
I don't know about LVM. AFAIK, it is a Linux concept, and not necessarily supported by all distros.

I have a preference for a separate utility. GParted tends to be more powerful than the built in partitioner in many distro's installer. You have more options with GParted, IMO. GParted will let you resize and move partitions, which I don't think most distros will let you do.

--Ian
 
Old 01-25-2007, 04:07 AM   #12
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
An interesting set of advice - I'm sorry I was offline so long now.
Quote:
Originally Posted by varun_shrivastava
make sure that u do not install linux on MBR
Presumably you mean this advice for GRUB. A better reason than given for not installing GRUB to the MBR is that some installations of windows seem to check the MBR to make sure the windows bootloader is there - assuming the absence of the windows bootloader is evidence of a virus attack. Restoring the bootloader is a routing part of reinstalling windows these days and trivial. Anyway - it is more likely that windows will be dumped completely or relegated to an old box.

Quote:
Originally Posted by IBall
I suggest that you download the GParted LiveCD, and use that to partition your disk.
The various versions of the "Parted" partition manager are used as the installation partition tool (eg. anaconda). There is no special reason to use an external tool on a blank disk. However - there are myriad opinions on this.

Sometimes an installer doesn't have access to your hardware, or the access is funny (I had fun with breezy installs to SATA HDDs). In this case, another distribution of parted may have more up-to-date drivers.

Note: It is preferable to use Open Source partitioning tools simply because they are simply better written. They are also written with your exact purpose in mind: dual booting. MS has no commercial reason to enhance their partition tools to allow other OSes to compete with theirs.

Quote:
Originally Posted by veeruk101
Is LVM just a Linux but not Windows concept?
Googling "define LVM":
Quote:
Logical volume management (LVM) is a hard disk drive partitioning scheme that is designed to be more flexible than normal physical partitioning. In particular, logical volume management software allows for changes in the size of individual volumes without a hard reboot of the computer, and in some cases while the filesystem on the volume is being actively used.
The Logical Volume Manager (LVM) is a linux thing - but Logical Volume Management is not. Generally, MS doesn't use it. Some folk use it as a kind of substitute for RAID0. You don't need to worry about it.

At this stage, you will learn more from the doing than from the talking.
Go for it!
Enjoy.
 
  


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
I'm multibooting and something has changed about disk order in GRUB, I think, help... brjoon1021 Linux - Distributions 13 12-09-2006 03:05 AM
Multibooting: I need some GRUB tips, thanks... brjoon1021 Linux - Newbie 3 10-06-2006 06:23 PM
Lack of understanding the "grub" setup and multibooting. Orn Linux - Newbie 1 09-20-2006 11:01 AM
multibooting simcox1 Mandriva 4 07-13-2005 11:36 AM
Multibooting How-To RodimusProblem LinuxQuestions.org Member Success Stories 3 02-22-2005 06:06 AM

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

All times are GMT -5. The time now is 09:38 PM.

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