LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-18-2008, 05:12 AM   #1
lifeforce4
Member
 
Registered: May 2003
Location: 2:16:840
Distribution: Slackware, CentOS, Arch, Debian
Posts: 169
Blog Entries: 1

Rep: Reputation: 32
Setting up a /boot sector after windows and linux are installed?


Right now I have the windows partition at the beginning of my HDD and Linux at the end. there is unallocated space between them. I use a floppy that has GRUB to dual boot my system. What I want to do is create a /boot partition and install GRUB on it so I can get rid of the floppy because I am starting to have problems with it(might be dying).

What format do I use for the /boot partition? It will be the first 50mb of my HDD.

Thank you,
Kyle
 
Old 02-18-2008, 05:33 AM   #2
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
Use ext2 or ext3.
 
Old 02-18-2008, 06:06 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Ext2 - no point in a journal. Rarely gets updated, and uses (wastes in this case) space.
 
Old 02-18-2008, 08:47 PM   #4
lifeforce4
Member
 
Registered: May 2003
Location: 2:16:840
Distribution: Slackware, CentOS, Arch, Debian
Posts: 169

Original Poster
Blog Entries: 1

Rep: Reputation: 32
Thank you for the answers and advice. That helped.

Kyle
 
Old 02-19-2008, 12:35 AM   #5
UMG:Chicken_Soüp
Member
 
Registered: Nov 2007
Location: Neptune, NJ (exit 100)
Distribution: Slack, Solaris, whatever I have space for
Posts: 32

Rep: Reputation: 16
Let the Windows boot loader remain in the MBR, make your linux partition bootable, and install GRUB in the superblock of the partition.

This link spells it out:

http://www.linux.com/feature/42788

Format the unused space as fat32 and use it to access files from both OS's

Sincerely,
Soup

Last edited by UMG:Chicken_Soüp; 02-19-2008 at 12:37 AM.
 
Old 02-19-2008, 12:52 AM   #6
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Why do you need a boot partition? You can install GRUB on your / partition providing it isn't xfs.
 
Old 02-19-2008, 05:36 AM   #7
lifeforce4
Member
 
Registered: May 2003
Location: 2:16:840
Distribution: Slackware, CentOS, Arch, Debian
Posts: 169

Original Poster
Blog Entries: 1

Rep: Reputation: 32
Quote:
Originally Posted by jay73 View Post
Why do you need a boot partition? You can install GRUB on your / partition providing it isn't xfs.
All the information I have read for dual booting and installing GRUB has been saying to leave the MBR(which I remember 5 years ago I actually changed). Instead create a boot partition and install GRUB on it. I am using ext3 for linux and NTFS for windows.
-
Right now this is how my system works...
Starts up and boots from my floppy(has GRUB).
Then I can select my windows or linux partition to boot.
(With out the floppy neither system will boot).

Now I am trying to set it up, to get rid of the floppy because the drive is going bad. Any other suggesttions would be great if you know an easier way of booting GRUB.

Thank you,
Kyle
 
Old 02-19-2008, 02:48 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Boot partition is o.k. - I use one on every system. Allows the boot code to be independent of the O/S code.
Update the MBR - all those issues went away years ago. Only Windows people say that now - there's no real reason not to.
Causes grief when you attempt to put a (Windoze) service pack on, but other than that is a better option.
You'll have to have working stage1 code (grub or ntldr) in the MBR or you'll be back to using floppies.

Last edited by syg00; 02-19-2008 at 02:55 PM. Reason: Replied to wrong thread - d'oh
 
Old 02-19-2008, 03:50 PM   #9
monsm
Member
 
Registered: Feb 2005
Location: London, UK
Distribution: Gentoo
Posts: 568

Rep: Reputation: 37
Quote:
Originally Posted by syg00 View Post
Boot partition is o.k.
I agree with that. Its ok but not strictly necessary. Benefit is marginal on a desktop system. If you have things you don't want to loose, take backup e.g. on DVD-RW.

NTLDR or Grub to the MBR, either one works. A partition for both OS to access is also good. Although you can leave them as NTFS these days if you like. Linux supports write access to it very well these days. I certainly haven't had any problems on mine (using ntfs-3g on linux).
 
Old 02-19-2008, 04:03 PM   #10
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Yes, a boot partition is OK but it is not really needed. It might be a good idea on a production server but otherwise, it doesn't really matter. I'm afraid you're a bit confused. If you want to preserve your windows bootloader in the MBR, then you should definitely not create a boot partition. Or you may but the point is that it still won't make your system bootable.
I'll explain why. GRUB comes in two parts: one part residing in your boot partition or wherever you place it (I suggested inside a boot directory on your / partition but that may as well be a home partition) AND a second part residing in the MBR or on a removable device such as a floppy. In other words, creating a boot partition won't help. You need both parts. If you have a working GRUB, that means that the second part of your GRUB is already installed in your boot directory. Creating a separate boot directory is simply going to move that second part but it still won't give you part 1 (a.k.a. "stage 1"). You'll still need a floppy unless you do overwrite your MBR.
Installing GRUB into your boot directory without also overwriting your MBR makes sense only when you already have a GRUB in the MBR you want to keep (for example, when you have another Linux that put its GRUB there). Unless, of course, you use windows the windows bootloader to load Linux. That is perfectly possible but it is less straightforward than doing it the other way round.

Last edited by jay73; 02-19-2008 at 04:04 PM.
 
Old 02-19-2008, 04:43 PM   #11
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by jay73 View Post
Yes, a boot partition is OK but it is not really needed.
I agree. I find it more convenient to have stage 2 of grub in the Linux root partition. For the discussion in this thread, that partition already exists without adding a new /boot partition. LiveCD's have taken away a lot of the old reasons for having a /boot partition.


Quote:
If you want to preserve your windows bootloader in the MBR, then you should definitely not create a boot partition. Or you may but the point is that it still won't make your system bootable.
Those decisions are independent:
A) Should grub stage 2 be in the existing Linux partition or in a new /boot partition.
B) Should the MBR contain grub's stage 1 or NTLDR's stage 1.

Quote:
I'll explain why. GRUB comes in two parts:
I haven't investigated enough to be sure, but I think it is three parts: Stage 1, stage 1.5 and stage 2.

Stage 2.:
Quote:
one part residing in your boot partition or wherever you place it (I suggested inside a boot directory on your / partition
Stage 1:
Quote:
a second part residing in the MBR or on a removable device such as a floppy.
Or anyplace else from which some other bootstrap component, such as NTLDR can load it.

The instructions linked above first installed grub onto a partition: Stage 2 into a directory in the filesystem on that partition and some grub stage into the partition boot sector. I don't know grub well enough to know if that was stage 1 or stage 1.5
Then the boot sector of the partition was copied into a file on the Windows partition. Then boot.ini was configured in Windows so that after NTLDR starts you can make a menu selection to tell NTLDR to hand control to that tiny stage of grub that was copied from the Linux partition boot sector.

That assumes the MBR is properly set to load NTLDR when you boot the hard drive.

If it isn't then something must be put in the MBR either to load NTLDR or to load grub or the floppy will still be needed.

Quote:
If you have a working GRUB, that means that the second part of your GRUB is already installed in your boot directory.
Is it? Or is it possible that all of grub is on the floppy?

Last edited by johnsfine; 02-19-2008 at 04:44 PM.
 
Old 02-19-2008, 04:47 PM   #12
lifeforce4
Member
 
Registered: May 2003
Location: 2:16:840
Distribution: Slackware, CentOS, Arch, Debian
Posts: 169

Original Poster
Blog Entries: 1

Rep: Reputation: 32
Quote:
Originally Posted by monsm View Post
I agree with that. Its ok but not strictly necessary. Benefit is marginal on a desktop system. If you have things you don't want to loose, take backup e.g. on DVD-RW.

NTLDR or Grub to the MBR, either one works. A partition for both OS to access is also good. Although you can leave them as NTFS these days if you like. Linux supports write access to it very well these days. I certainly haven't had any problems on mine (using ntfs-3g on linux).
Good point and yes I save my data and everything else on a completely different physical HDD. Also I have a Fat32 partition for if I ever do encounter problems with the NTFS. For somereason I cant get my linux to write to NTFS just read.

Quote:
Originally Posted by jay73 View Post
Yes, a boot partition is OK but it is not really needed. It might be a good idea on a production server but otherwise, it doesn't really matter. I'm afraid you're a bit confused. If you want to preserve your windows bootloader in the MBR, then you should definitely not create a boot partition. Or you may but the point is that it still won't make your system bootable.
I'll explain why. GRUB comes in two parts: one part residing in your boot partition or wherever you place it (I suggested inside a boot directory on your / partition but that may as well be a home partition) AND a second part residing in the MBR or on a removable device such as a floppy. In other words, creating a boot partition won't help. You need both parts. If you have a working GRUB, that means that the second part of your GRUB is already installed in your boot directory. Creating a separate boot directory is simply going to move that second part but it still won't give you part 1 (a.k.a. "stage 1"). You'll still need a floppy unless you do overwrite your MBR.
Installing GRUB into your boot directory without also overwriting your MBR makes sense only when you already have a GRUB in the MBR you want to keep (for example, when you have another Linux that put its GRUB there). Unless, of course, you use windows the windows bootloader to load Linux. That is perfectly possible but it is less straightforward than doing it the other way round.
Yes I am confused, I messed around with linux 5+ years ago and since then have forgotten. Now what you said makes more sense then anything else I have read. I was wondering because grump when I installed it pointed it to / the problem was I thought it was creating a backup floppy. When in reality it was going to use it as the boot device. I want to install it in the MBR like I had it a few years ago but back then I just had linux install it for me. This time I figured I have to do it manually since I have everything setup besides the MBR. How can I get the setup from my floppy on the MBR?

johnsfine: GRUB is not all on the floppy but what I want to do is get it to be in the MBR. This I have never done before, last thing I remember was reseting the MBR in windows because I removed my linux partition. This was back in 2002.

Thanks,
Kyle

Last edited by lifeforce4; 02-19-2008 at 04:53 PM. Reason: Recent post while I was typing.
 
  


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
Windows Overwrites the linux boot sector when i install it yubyub General 6 08-04-2006 09:43 PM
Setting up Dual Boot with Linux already installed Abomb Linux - Software 2 02-02-2006 07:38 AM
Installed GRUB on MBR or First Sector of boot zillah Fedora 6 06-16-2005 11:46 AM
Windows installation erased linux boot sector? xelt Linux - General 5 05-01-2005 01:35 PM
Add Fedora to Windows Boot Sector? alexgsummer Fedora 11 02-26-2005 09:16 AM

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

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