Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Multi-boot w/MS OS's
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
axslinger
n00b
n00b


Joined: 27 Apr 2002
Posts: 47
Location: Michigan

PostPosted: Sat Apr 27, 2002 5:01 pm    Post subject: Multi-boot w/MS OS's Reply with quote

Currently my system is set up to multi-boot between Win98 and XP. But I'm using the multi-boot system that was automatically installed installed by XP when I installed it after Win98. What would be the steps necessary to change over to Grub, remove the MS menu then install Gentoo? It's vitally important that I don't wipe out my current partitions. (I know, backup!). I will probably use Ghost to pull an image of my primary partition but would rather not have to use it.

Thanks,
Brian
Back to top
View user's profile Send private message
dArkMaGE
Apprentice
Apprentice


Joined: 20 Apr 2002
Posts: 152

PostPosted: Sat Apr 27, 2002 6:57 pm    Post subject: Reply with quote

okay just use the commands for installing grub found in the install guide:

Final steps: configure GRUB

The most critical part of understanding GRUB is getting comfortable with how GRUB refers to hard drives and partitions. Your Linux partition /dev/hda1 is called (hd0,0) under GRUB. Notice the parenthesis around the hd0,0 - they are required. Hard drives count from zero rather than "a", and partitions start at zero rather than one. So, /dev/hdb3 gets translated to (hd1,2), and /dev/hdd7 gets translated to (hd3,6). After you've gotten the feel for that, convert your boot and root partition names to the GRUB format and write them down. Now, it's time to install GRUB.

The easiest way to install grub is to simply type grub at your chrooted shell prompt:

Code listing 38

Code:
# grub


You'll be presented with the grub> grub command-line prompt. Now, you need to type in the right commands to install the GRUB boot record onto your hard drive. In my example configuration, I want to install the GRUB boot record on my hard drive's MBR (master boot record), so that the first thing I see when I turn on the computer is the GRUB prompt. In my case, the commands I want to type are:

Code listing 39

Code:
grub> root (hd0,0)
grub> setup (hd0)
grub> quit


Here's how the two commands work. The first root ( ) command tells GRUB the location of your boot partition (in our example, /dev/hda1 or (hd0,0) in GRUB terminology. Then, the second setup ( ) command tells GRUB where to install the boot record - it will be configure to look for its special files at the root ( ) location that you specified. In my case, I want the boot record on the MBR of the hard drive, so I simply specify /dev/hda (also known as (hd0)). If I were using another boot loader and wanted to set up GRUB as a secondary boot-loader, I could install GRUB to the boot record of a particular partition. In that case, I'd specify a particular partition rather than the entire disk. Once the GRUB boot record has been successfully installed, you can type quit to quit GRUB. Gentoo Linux is installed, but we need to create the /boot/grub/menu.lst file so that we get a nice GRUB boot menu when the system reboots. Here's how to do it.

Now, create the menu.lst file (nano -w /boot/grub/menu.lst), and add the following to it:

Code listing 40

Code:
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=My example Gentoo Linux
root (hd0,0)
kernel /boot/bzImage root=/dev/hda3

# Below needed only for people who dual-boot
title=Windows NT Workstation
root (hd0,5)
chainloader +1


Note: The menu.lst file should end in "lst" as in "list", not "1st" as in "first". Also, (hd0,0) should be written without any spaces inside the parentheses.

After saving this file, Gentoo Linux installation is complete. Selecting the first option will tell GRUB to boot Gentoo Linux without a fuss. The second part of the menu.lst file is optional, and shows you how to use GRUB to boot a bootable Windows partition.

Note: Above, (hd0,0) should point to your "boot" partition (/dev/hda1 in our example config) and /dev/hda3 should point to your root filesystem. (hd0,5) contains the NT boot loader.

Also, if you need to pass any options to the kernel, simply add them to the end of the kernel command. We're already passing one option (root=/dev/hda3), but you can pass others as well. In particular, you can turn off devfs by default (not recommended unless you know what you're doing) by adding the gentoo=nodevfs option to the kernel command.

Note: Unlike in earlier versions of Gentoo Linux, you no longer have to add devfs=mount to the end of the kernel line to enable devfs. In rc6 devfs is enabled by default.
Back to top
View user's profile Send private message
axslinger
n00b
n00b


Joined: 27 Apr 2002
Posts: 47
Location: Michigan

PostPosted: Sat Apr 27, 2002 7:25 pm    Post subject: Reply with quote

Thanks a bunch for the detailed info. I appreciate it and will use. But the problem is, there is no Linux yet. How do I install Grub without Linux being there?


Also,
Currently I have a C: partition which is FAT32 with Win98 on it (26GB). I also have a second partition (that I can't see from Win98) that has NTFS on it (about 15GB). I have plenty of drive space and also have Partition Magic so I can set them up any way I need to. What do you suggest?

Thanks again,
Brian
Back to top
View user's profile Send private message
crimson
Guest





PostPosted: Sat Apr 27, 2002 7:38 pm    Post subject: help with bootloading Reply with quote

I use windows 2000 and dual boot it with linux, so we have one thing in common: The windows boot loader. It stores the information about boot options in your windows root directory (c:\) under the name boot.ini .

I haven't used grub yet, but I'm sure it works about the same for lilo and grub. If you want to use the Windows Boot Loader you are currently using, set it up so it DOES NOT overwrite the MBR. Install it on your root (boot in this case?) partition /dev/hda2.

After this is set up you have to create a file that lets windows boot your linux partition. Here's how:

dd if=/dev/hda2 of=bootsect.lnx bs=512 count=1

You now have to copy the bootsect.lnx file to your c: partition, add an entry for Linux in your boot.ini and point it to that file. (instead of a physical location on your hard drive).

That was a bit brief, so heres a good link : http://www.enterprisedt.com/publications/dual_boot.html

I hope you get it working :).
Back to top
crimson
Guest





PostPosted: Sat Apr 27, 2002 7:41 pm    Post subject: ntfs Reply with quote

When I used NTFS with Mandrake, it's partition program didn't detect it right or let me resize it. I would definitely map out the partitions with Partition Magic first since you're using NTFS.
Back to top
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum