LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Install GRUB in MBR or /boot? (https://www.linuxquestions.org/questions/linux-enterprise-47/install-grub-in-mbr-or-boot-233614/)

kmlinux12 09-21-2004 09:40 PM

Install GRUB in MBR or /boot?
 
I'm confused whether I should choose windows or GRUB for the default boot loader.

RHEL recommends installing boot loader on MBR. It seems to suggest installing on MBR can handle booting linux and other os since when your machine boots, GRUB (or LILO) will present a boot prompt. You can then boot RHEL or any other operating system that you have congured the boot loader to boot.

I read many places not to do exactly that and install it in the /boot partition.

I don't have a floppy drive and have XP already installed on my PC with only a NTFS partition and do not plan to share partitions between xp and linux.

If I install GRUB in /boot how can i transfer the linux boot sector onto windows and refer it from boot.ini since I do not have a floppy drive and also do not have a VFAT shareable partition?

Whats the disadvantage of choosing the recommended MBR option and what option do I have if I want to install GRUB in /boot and then boot from the windows boot.ini,specially in the absence of a floppy drive and a VFAT shareable partition?

Thanks

ppuru 09-21-2004 09:48 PM

grub copies its support files and the grub menu file under /boot/grub.

To install grub on your MBR, as root, run

grub-install /dev/hdx (where x = a / b / c / d.)

kmlinux12 09-22-2004 07:37 AM

Where should I install it is the first question. In the MBR or /boot?

bigrigdriver 09-23-2004 03:24 AM

Whether or not you install grub (or lilo) to the MBR is a matter of personal choice. If you install to the MBR, you have a bootloader which will show you the installed OS's in a menu, and you select the one to boot into. If you choose to NOT install grub to the MBR, then you need an alternative method to boot the Linux partition, such as floopy, bootable cd, etc. Of course, those will only work as long as the media (disks) are good, and the drives still work.
Another method, seldom recommended but works great for me, is loadlin in the windows partition. There are howto's around which detail how to setup a folder in the windows partition, with a dos batch file, the loadlin executable, and a copy of the compressed kernel image from your Linux partition. To use it, when you turn on the computer, during POST (power on self test), you hold the control key (or whatever for xp) to get to the text menu, and boot into command-line mode in windows. Then navigate to the linux folder and run the batch file to launch Linux.

nonamenobody 09-23-2004 06:34 AM

>> what option do I have if I want to install GRUB in /boot and then boot from the windows boot.ini,specially in the absence of a floppy drive and a VFAT shareable partition?

In-order to boot GRUB from NTLoader (default windows bootloader), you need to make a copy of the boot sector where GRUB is installed. If you use Linux to do this (e.g. 'dd -bs 512 -count 1 if=/dev/bootPartition of=grub.img') you will need to find some way to copy it to your MS-Windows partition (do you have a network you could copy (email/ftp whatever) it across? can you put the harddisk in another machine?). If you have absolutely no means of copying the image from your Linux partition to you MS-Windows partition, you will need to make the image file in MS-Windows. Once you have a copy of the boot sector image on your MS-Windows partition, all you need to do is make the necessary changes to your 'boot.ini'.

I think installing GRUB to your MBR is likely to be the simplest option (it might be a good idea to backup your MBR first (it is always a good idea to have backup anyway)). If it fails, run MS-Windows XP's 'fixmbr' and go for the other option.

JrLz 09-23-2004 10:15 PM

maybe you can find some tools under Win
to extract the sector of your linux partition?
I haven't found that one, but I think those tools do exist

kmlinux12 09-24-2004 06:10 PM

Can I use a zip drive with linux get the file on a zip disk and then port it over on windows?

maxut 09-25-2004 01:47 AM

if your linux filesystem is ext2 or ext3, u can use explore2fs at windows side to get linux files.
http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm

good luck.


All times are GMT -5. The time now is 12:22 PM.