LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting up a /boot sector after windows and linux are installed? (https://www.linuxquestions.org/questions/linux-newbie-8/setting-up-a-boot-sector-after-windows-and-linux-are-installed-621959/)

lifeforce4 02-18-2008 05:12 AM

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

Zmyrgel 02-18-2008 05:33 AM

Use ext2 or ext3.

syg00 02-18-2008 06:06 AM

Ext2 - no point in a journal. Rarely gets updated, and uses (wastes in this case) space.

lifeforce4 02-18-2008 08:47 PM

Thank you for the answers and advice. That helped.

Kyle

UMG:Chicken_Soüp 02-19-2008 12:35 AM

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

jay73 02-19-2008 12:52 AM

Why do you need a boot partition? You can install GRUB on your / partition providing it isn't xfs.

lifeforce4 02-19-2008 05:36 AM

Quote:

Originally Posted by jay73 (Post 3062146)
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

syg00 02-19-2008 02:48 PM

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.

monsm 02-19-2008 03:50 PM

Quote:

Originally Posted by syg00 (Post 3062905)
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).

jay73 02-19-2008 04:03 PM

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.

johnsfine 02-19-2008 04:43 PM

Quote:

Originally Posted by jay73 (Post 3062985)
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?

lifeforce4 02-19-2008 04:47 PM

Quote:

Originally Posted by monsm (Post 3062973)
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 (Post 3062985)
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


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