View previous topic :: View next topic |
Author |
Message |
kettle n00b
Joined: 31 Oct 2004 Posts: 21
|
Posted: Fri Nov 05, 2004 4:53 am Post subject: dual boot with grub |
|
|
I need a little help with Grub, I've read the documentation but I find it a little confusing. I would like to Dual boot between XP and a new Gentoo install. Below is my partition sceme:
/dev/hda1 * NTFS
/dev/hda5 reiserfs
/dev/hda6 swap
/dev/hda7 fat32
Windows XP is installed on the NTFS partition and Gentoo is installed on the reiserfs partition. Can anyone help me configure Grub properly? |
|
Back to top |
|
|
slycordinator Advocate
Joined: 31 Jan 2004 Posts: 3065 Location: Korea
|
Posted: Fri Nov 05, 2004 5:17 am Post subject: |
|
|
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
Where the configuration files say (hd0,0) change it to (hd0,4) since that's where your boot record is located.
And the windows entry root needs to be changed to (hd0,0).
After that use the information from the section marked "Alternative: Setting up GRUB using manual instructions" |
|
Back to top |
|
|
kettle n00b
Joined: 31 Oct 2004 Posts: 21
|
Posted: Fri Nov 05, 2004 5:21 am Post subject: |
|
|
what about the root=/dev/hda3 after my kernel, does this follow Grub's pattern as in mine should be root=/dev/hda4 or does it follow lilo's as in root=/dev/hda5 ? |
|
Back to top |
|
|
donjuan l33t
Joined: 11 May 2004 Posts: 760 Location: At Uni
|
Posted: Fri Nov 05, 2004 5:33 am Post subject: |
|
|
It would be root=/dev/hda5 for you. It doesn't follow grub's pattern since that is an option that you are passing to the kernel, not grub. _________________ Command-line ACCEPT_KEYWORDS is considered harmful, use the package.* files.
The Stage 1 on 3 Install |
|
Back to top |
|
|
kettle n00b
Joined: 31 Oct 2004 Posts: 21
|
Posted: Fri Nov 05, 2004 6:06 am Post subject: |
|
|
Please forgive me I've been banging my head for a couple days and I'm just hoping to get a working computer up soon. What should my fstab look like?
Currently I have:
Code: |
/boot/hda5 /boot reiserfs noauto,noatime,notail 1 1
/dev/hda5 / reiserfs noatime 0 0
/dev/hda6 none swap sw 0 0
/dev/cdroms /cdrom0 iso9660 noauto,ro 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
|
Second question:
when installing grub do I use:
Code: | grub-install --root-directory=/boot /dev/hda | or does this change? |
|
Back to top |
|
|
kettle n00b
Joined: 31 Oct 2004 Posts: 21
|
Posted: Fri Nov 05, 2004 7:00 am Post subject: |
|
|
Now I'm confused. I tried installing Grub by hand with
grub> root (hd0,4)
grub> setup (hd0)
grub> quit
after rebooting I only get the grub prompt.
Does anyone have any ideas? |
|
Back to top |
|
|
donjuan l33t
Joined: 11 May 2004 Posts: 760 Location: At Uni
|
Posted: Fri Nov 05, 2004 8:27 am Post subject: |
|
|
It probably needs to be root (hd0,4)/boot since your boot directory is actually a directory on your root partition. Those instructions are for if you have a separate boot partition.
About fstab, I usually change the iso9660 to auto and the options from noauto,ro to noauto,user,ro so that you can mount it as a user. Though you'll probably actually want to look into ivman for automounting later.
Edit: About that boot line in fstab, get rid of it since you have boot as a directory on your root partition. Also, change the last zero on the line for /dev/hda5 to a 1 so it gets checked on boot. You can put notail as an option on that line also if you want.
And check the cdrom line again. To make sure you're doing everything right in fstab look at the handbook: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8
I know it may seem long and complicated but really it's the best way to figure out this stuff and get things done the quickest. After you've checked against it then ask us
So it should look like this:
Code: | /dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0 |
You may want to make sure that the directory /mnt/cdrom exists. _________________ Command-line ACCEPT_KEYWORDS is considered harmful, use the package.* files.
The Stage 1 on 3 Install |
|
Back to top |
|
|
kettle n00b
Joined: 31 Oct 2004 Posts: 21
|
Posted: Fri Nov 05, 2004 5:06 pm Post subject: |
|
|
Thank you for all your help, it seems that Grub is now installed properly. However when I choose to boot Gentoo all I get is a colorful display. Gentoo seems to actually be booting and running I just can't see it. I'm thinking it's because I've used "video=vesafb" in grub.conf. I am using a 2.6 kernel.
I promise I'm reading the documentation and the Grub manual, there are some parts that I just don't understand. As for the CD-ROM portion, I'm not too concerned with since this a laptop with a docking bay which I don't plan on using at all.
I was reading through the Gentoo handbook and I'm beginning to question this:
Code: |
# mount /dev/hda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/hda1 /mnt/gentoo/boot
|
Since I'm installing everything on hda5 do I still need to mount both /mnt/gentoo and /mnt/gentoo/boot ? If not which one should I mount?
Last edited by kettle on Sun Nov 07, 2004 2:12 am; edited 1 time in total |
|
Back to top |
|
|
donjuan l33t
Joined: 11 May 2004 Posts: 760 Location: At Uni
|
Posted: Fri Nov 05, 2004 10:37 pm Post subject: |
|
|
In your case no, you don't have to mount /mnt/gentoo/boot since your boot doesn't lie on a separate partition. Also you don't have to bother making the boot directory every time, just the times you start over after reformatting your partition. So by this point when you boot off the LiveCD you should just be mounting your root partition:
Code: | # mount /dev/hda5 /mnt/gentoo |
Try getting rid of that "video=vesafb" for now in your grub.conf. Just stick with the basics since this is your first time installing Gentoo.
I understand how this can be confusing. I think it's confusing for most people the first time they install Gentoo. I just wanted to make sure you were reading the manual to save us both some time _________________ Command-line ACCEPT_KEYWORDS is considered harmful, use the package.* files.
The Stage 1 on 3 Install |
|
Back to top |
|
|
kettle n00b
Joined: 31 Oct 2004 Posts: 21
|
Posted: Sun Nov 07, 2004 3:31 am Post subject: |
|
|
donjuan, slycordinator thank you so for helping me install Gentoo!
I still have a problem, it appears that Windows XP won't boot, it just goes to the Grub prompt but with out any ">" it just says GRUB and nothing else and there's no way for me to type anything.
Here's my Grub.conf
Code: |
default 0
timeout 7
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
title=Gentoo
root (hd0,4)
kernel /boot/kernel-2.6.7 root=/dev/hda5
title=Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1
|
|
|
Back to top |
|
|
donjuan l33t
Joined: 11 May 2004 Posts: 760 Location: At Uni
|
Posted: Sun Nov 07, 2004 3:44 am Post subject: |
|
|
OK, so your grub.conf looks like it's fine. It seems like I may have told you to setup grub wrong. Do it like it says in the manual and see if that fixes the problem:
Code: | grub> root (hd0,4)
grub> setup (hd0)
grub> quit |
Edit: changed this post because it appears that what I originally had posted here was wrong. _________________ Command-line ACCEPT_KEYWORDS is considered harmful, use the package.* files.
The Stage 1 on 3 Install
Last edited by donjuan on Sun Nov 07, 2004 4:36 am; edited 1 time in total |
|
Back to top |
|
|
kettle n00b
Joined: 31 Oct 2004 Posts: 21
|
Posted: Sun Nov 07, 2004 4:17 am Post subject: |
|
|
I'm sorry, I re-read my post and it seems I wasn't clear enough. Gentoo boots fine from Grub. However, when I select Windows XP from the Grub menu I just get the Grub promt thing sans ">" I'm not sure what this indicates, I'm thinking it may mean I've erased Windows XP? That's no problem since everything is backed up on the extra partition and another computer. |
|
Back to top |
|
|
slycordinator Advocate
Joined: 31 Jan 2004 Posts: 3065 Location: Korea
|
Posted: Sun Nov 07, 2004 4:37 am Post subject: |
|
|
kettle wrote: | I'm sorry, I re-read my post and it seems I wasn't clear enough. Gentoo boots fine from Grub. However, when I select Windows XP from the Grub menu I just get the Grub promt thing sans ">" I'm not sure what this indicates, I'm thinking it may mean I've erased Windows XP? That's no problem since everything is backed up on the extra partition and another computer. |
It looks like you have messed up your XP partition.
Perhaps you accidentally once typed "root (hd0,0)" when installing grub, thereby making grub go to your windows partition which would make windows unbootable.
Your entry looks correct to me so I'm guessing something's wrong with the windows partition.
My windows boots up fine and my entry is similar
Code: |
title Windows XP
rootnoverify (hd0,0)
chainloader +1
|
|
|
Back to top |
|
|
donjuan l33t
Joined: 11 May 2004 Posts: 760 Location: At Uni
|
Posted: Sun Nov 07, 2004 4:42 am Post subject: |
|
|
I just edited my post because after reading the grub manual it seems like what I originally posted was wrong. Though something you might try is getting rid of the makeactive line. I don't have it, and since you have the NTFS partition marked as active it's something to try. All your spelling looks correct so I don't know what else could be wrong.
Your post was fine I just got a bit sidetracked. _________________ Command-line ACCEPT_KEYWORDS is considered harmful, use the package.* files.
The Stage 1 on 3 Install |
|
Back to top |
|
|
kettle n00b
Joined: 31 Oct 2004 Posts: 21
|
Posted: Sun Nov 07, 2004 6:13 am Post subject: |
|
|
Actually I think what you had previously grub> root (hd0,4)/boot was correct, or at least that's what worked for me. |
|
Back to top |
|
|
donjuan l33t
Joined: 11 May 2004 Posts: 760 Location: At Uni
|
Posted: Sun Nov 07, 2004 6:17 am Post subject: |
|
|
Well if it did work then I guess you can keep doing it, but from what I got out of the Grub manual you're not supposed to do it that way. I think it probably just ignored the "/boot" part. _________________ Command-line ACCEPT_KEYWORDS is considered harmful, use the package.* files.
The Stage 1 on 3 Install |
|
Back to top |
|
|
kettle n00b
Joined: 31 Oct 2004 Posts: 21
|
Posted: Mon Nov 08, 2004 4:18 pm Post subject: |
|
|
Again thank you so much, I'm succesfully running Gentoo w KDE and loving it! I'll just reinstall XP then Grub. |
|
Back to top |
|
|
donjuan l33t
Joined: 11 May 2004 Posts: 760 Location: At Uni
|
Posted: Wed Nov 10, 2004 7:14 am Post subject: |
|
|
If you haven't already re-installed Windows, you might want to try the recovery consoule to avoid some trouble. Apparently there's a fixmbr program that will fix your Windows boot problem. You'll just need to re-setup Grub afterwards. Somebody else who had this problem fixed it using that: https://forums.gentoo.org/viewtopic.php?p=1735085#1735085
The only reason he didn't have to re-setup Grub was because he had Windows and Gentoo on different physical harddrives. _________________ Command-line ACCEPT_KEYWORDS is considered harmful, use the package.* files.
The Stage 1 on 3 Install |
|
Back to top |
|
|
|