Re: [gentoo-user] grub over the top of Win XP
Glenn Enright wrote: On Wed, 07 Sep 2005 04:40, Mark Knecht wrote: The disk layout is like this (MBR) - Win XP /dev/hda1 - Win XP /dev/hda2 - extended partition /dev/hda5 - /boot /dev/hda6 - swap /dev/hda7 - / /dev/hda8 - /home grub root (hd0,4) grub setup (hd0) (Install GRUB in the MBR) grub quit Youve got the right idea, but hd0,4 is the logical holder for your linux partitions, not the boot partition that holds the grub files. So root is your /boot partition, ie hd0,5. /boot isn't hd0,5, its hd0,1 Christoph -- echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] grub over the top of Win XP
Mark Knecht wrote: The disk layout is like this (MBR) - Win XP /dev/hda1 - Win XP /dev/hda2 - extended partition /dev/hda5 - /boot /dev/hda6 - swap /dev/hda7 - / /dev/hda8 - /home Now, my question, where do I write grub? I believe it's into the MBR and not into partition 1, correct? If so I'd use: grub grub root (hd0,4) grub setup (hd0) (Install GRUB in the MBR) grub quit Is this correct? Not quite. At least you got the confusing numbering scheme right ;-) (hd0,4) would be your / partition. But grub expects the partition containing the grub installation files, which are located on /boot so it should be (hd0,2) Christoph -- echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] grub over the top of Win XP
Am Dienstag, den 06.09.2005, 21:40 -0700 schrieb Mark Knecht: Hi, OK, the target machine is now rebuilt. I decided since I had to rebuild both WinXP and Gentoo that I'd just put them on the same hard drive. The Gentoo install is complete right up to the point where I run grub and write it somewhere and I want to make sure I understand the right way to do this. The disk layout is like this (MBR) - Win XP /dev/hda1 - Win XP /dev/hda2 - extended partition /dev/hda5 - /boot /dev/hda6 - swap /dev/hda7 - / /dev/hda8 - /home Now, my question, where do I write grub? I believe it's into the MBR and not into partition 1, correct? If so I'd use: grub grub root (hd0,4) LOL! Now you gave the poor guy at least three different numbers. One thing is right though: find /boot within Grub's numbering scheme. Instead of GUESSING try the following: 1. Enter grub as usual 2. Enter root ( and press tab. Grub lists the available disks / partitions 3. Select the one you're think is right. At the end of the line e.g. root (hd0,1) add / and press tab again. Grub now list the directory content of that root partition. If you found what you were looking for you're done - else continue with step 2. grub setup (hd0) (Install GRUB in the MBR) grub quit Is this correct? Thanks, Mark -- Mit freundlichen Grüßen Heinz Sporn SPORN it-freelancing Mobile: ++43 (0)699 / 127 827 07 Email: [EMAIL PROTECTED] [EMAIL PROTECTED] Website: http://www.sporn-it.com Snail: Steyrer Str. 20 A-4540 Bad Hall Austria / Europe -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] grub over the top of Win XP
Christoph Gysin wrote: (hd0,4) would be your / partition. But grub expects the partition containing the grub installation files, which are located on /boot so it should be (hd0,2) stupid me, of course it should be (hd0,1) as mentioned in my other post. If you're confused now, go with Heinz's trial and error way ;-) Christoph -- echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] grub over the top of Win XP
On Wed, 07 Sep 2005 09:23:50 +0200, Heinz Sporn wrote: The disk layout is like this (MBR) - Win XP /dev/hda1 - Win XP /dev/hda2 - extended partition /dev/hda5 - /boot /dev/hda6 - swap /dev/hda7 - / /dev/hda8 - /home Now, my question, where do I write grub? I believe it's into the MBR and not into partition 1, correct? If so I'd use: Correct, and /dev/hda5 is (hd0,4) despite all the conflicting advice you've been given. All my boxes have /boot on hda5 and all use hd0,4 (well, except the iBook which uses that horrible yaboot thing, anyone who wants to start a grub vs. lilo flame war should be made to use yaboot). LOL! Now you gave the poor guy at least three different numbers. One thing is right though: find /boot within Grub's numbering scheme. Instead of GUESSING try the following: 1. Enter grub as usual 2. Enter root ( and press tab. Grub lists the available disks / partitions 3. Select the one you're think is right. At the end of the line e.g. root (hd0,1) add / and press tab again. Grub now list the directory content of that root partition. If you found what you were looking for you're done - else continue with step 2. Or, enter grub and type find /grub/grub.conf or find /grub/menu.lst and all will be clear. -- Neil Bothwick TROI : What am I sensing?? I'm sensing INCOMPETENCE, you pretentious bald pseudo-French dickweed! pgpeF9MlgPSUI.pgp Description: PGP signature
Re: [gentoo-user] grub over the top of Win XP
Neil Bothwick wrote: Correct, and /dev/hda5 is (hd0,4) despite all the conflicting advice you've been given. All my boxes have /boot on hda5 and all use hd0,4 (well, except the iBook which uses that horrible yaboot thing, anyone who wants to start a grub vs. lilo flame war should be made to use yaboot). Sorry for the confusing answers. I was pretty sure grub doesn't care wether your partions are primary or logical, giving each a number starting from 0. Appearantly this is *not* the case. From the docs: (hd0,1) Here, `hd' means it is a hard disk drive. The first integer `0' indicates the drive number, that is, the first hard disk, while the second integer, `1', indicates the partition number (or the PC slice number in the BSD terminology). Once again, please note that the partition numbers are counted from _zero_, not from one. This expression means the second partition of the first hard disk drive. In this case, GRUB uses one partition of the disk, instead of the whole disk. (hd0,4) This specifies the first extended partition of the first hard disk drive. Note that the partition numbers for extended partitions are counted from `4', regardless of the actual number of primary partitions on your hard disk. Hope this made things clearer now... Christoph -- echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] grub over the top of Win XP
Am Mittwoch, den 07.09.2005, 10:25 +0200 schrieb Christoph Gysin: Neil Bothwick wrote: Correct, and /dev/hda5 is (hd0,4) despite all the conflicting advice you've been given. All my boxes have /boot on hda5 and all use hd0,4 (well, except the iBook which uses that horrible yaboot thing, anyone who wants to start a grub vs. lilo flame war should be made to use yaboot). Sorry for the confusing answers. I was pretty sure grub doesn't care wether your partions are primary or logical, giving each a number starting from 0. Appearantly this is *not* the case. From the docs: Grub's a nasty hog, that's for sure (but still superior over Lilo IMHO). Another very important point to consider is that Grub looks at drive sequences from a BIOS perspective. Say you have disk 1 (primary IDE) and disk 2 (secondary IDE). When you boot Grub in sunshine mode it'll see disk 1 as hd0 and disk 2 as hd1. But if you jump into your BIOS and set disk 2 to your primary boot medium Grub will change it's perspective and match disk 2 to hd0. (hd0,1) Here, `hd' means it is a hard disk drive. The first integer `0' indicates the drive number, that is, the first hard disk, while the second integer, `1', indicates the partition number (or the PC slice number in the BSD terminology). Once again, please note that the partition numbers are counted from _zero_, not from one. This expression means the second partition of the first hard disk drive. In this case, GRUB uses one partition of the disk, instead of the whole disk. (hd0,4) This specifies the first extended partition of the first hard disk drive. Note that the partition numbers for extended partitions are counted from `4', regardless of the actual number of primary partitions on your hard disk. Hope this made things clearer now... Christoph -- echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED] -- Mit freundlichen Grüßen Heinz Sporn SPORN it-freelancing Mobile: ++43 (0)699 / 127 827 07 Email: [EMAIL PROTECTED] [EMAIL PROTECTED] Website: http://www.sporn-it.com Snail: Steyrer Str. 20 A-4540 Bad Hall Austria / Europe -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] grub over the top of Win XP
On 9/7/05, Heinz Sporn [EMAIL PROTECTED] wrote: Am Mittwoch, den 07.09.2005, 10:25 +0200 schrieb Christoph Gysin: Neil Bothwick wrote: Correct, and /dev/hda5 is (hd0,4) despite all the conflicting advice you've been given. All my boxes have /boot on hda5 and all use hd0,4 (well, except the iBook which uses that horrible yaboot thing, anyone who wants to start a grub vs. lilo flame war should be made to use yaboot). Sorry for the confusing answers. I was pretty sure grub doesn't care wether your partions are primary or logical, giving each a number starting from 0. Appearantly this is *not* the case. From the docs: Grub's a nasty hog, that's for sure (but still superior over Lilo IMHO). Another very important point to consider is that Grub looks at drive sequences from a BIOS perspective. Say you have disk 1 (primary IDE) and disk 2 (secondary IDE). When you boot Grub in sunshine mode it'll see disk 1 as hd0 and disk 2 as hd1. But if you jump into your BIOS and set disk 2 to your primary boot medium Grub will change it's perspective and match disk 2 to hd0. (hd0,1) Here, `hd' means it is a hard disk drive. The first integer `0' indicates the drive number, that is, the first hard disk, while the second integer, `1', indicates the partition number (or the PC slice number in the BSD terminology). Once again, please note that the partition numbers are counted from _zero_, not from one. This expression means the second partition of the first hard disk drive. In this case, GRUB uses one partition of the disk, instead of the whole disk. (hd0,4) This specifies the first extended partition of the first hard disk drive. Note that the partition numbers for extended partitions are counted from `4', regardless of the actual number of primary partitions on your hard disk. Hope this made things clearer now... Christoph -- echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED] -- Mit freundlichen Grüßen Heinz Sporn Hi Heinz, OK, the machine is up and dual booting so everything worked out fine. Thanks to all for your answers. What I suggested in my first email was correct. Before I did it I followed Neil's suggestion abut using the find command within grub. That did clarify things a bit and made me feel a bit better when I pulled the trigger. Anyway, I read all the responses this morning and had a good laugh. I guess I'm not the only one who has a question or two about how all of this is done! I must say that I'm appreciative of all the responses. As for the comment above about BIOS order, I think that's correct, but I tried an experiment on this machine and told it to boot from the second EDIE controller. That did not change the order grub saw the drives so I'm not sure every option in BIOS would fit your rule above, or maybe I still don't understand. As for grub rules I think I understand, it's these: 1) The order that the system sees hard drives is the order grub will enumerate them. For instance, in this system: /dev/hda - hard drive /dev/hdb - hard drive /dev/hdac - cdrom or this system: /dev/hda - hard drive /dev/hdc - cdrom /dev/hde - hard drive both produce the same results in grub: hd0 == /dev/hda hd1 == /dev/hdb or /dev/hde where the drives are numbered in the order Linux shows them. As for partition numbers it is my understanding that grub is always the /dev/hdX value minus 1. Beyond that I don't pretend to know anything. The one thing that always confuses me is the difference between placing grub in the MBR and placing it in a partition. It is my understanding that the MBR is a separate part of the drive structure, and is not part of any partition. Is this true? When we place an bootloader in the MBR that's what the system jumps to first? After that the bootloader in the MBR can transfer to either an operating system or to a second boot loader. I've done this where I had a copy of grub from Gentoo in the MBR, and then a copy of grub in a partition. Each copy had their own grub.conf file and managed it's own set of kernels, etc. However, what Windows does is a bit beyond me. I suppose it places it's own bootloader in the MBR. We then overwrite it, but then we have a command to jump to that OS. (chainloader +1 I suppose?) Anyway, confusing. Hey, emerge sync running now. Windows boots, Gentoo boots. All is good. this is my first dual boot machine that didn't use System Commander. Thanks much, Mark -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] grub over the top of Win XP
As posted on /. recently, On Wed, Sep 07, 2005 at 12:12:21PM -0700, Mark Knecht wrote: Beyond that I don't pretend to know anything. The one thing that always confuses me is the difference between placing grub in the MBR and placing it in a partition. It is my understanding that the MBR is a separate part of the drive structure, and is not part of any partition. Is this true? When we place an bootloader in the MBR that's what the system jumps to first? After that the bootloader in the MBR can transfer to either an operating system or to a second boot loader. I've done this where I had a copy of grub from Gentoo in the MBR, and then a copy of grub in a partition. Each copy had their own grub.conf file and managed it's own set of kernels, etc. However, what Windows does is a bit beyond me. I suppose it places it's own bootloader in the MBR. We then overwrite it, but then we have a command to jump to that OS. (chainloader +1 I suppose?) a good source for some basics on how bootloaders work and why we need them and what the heck MBR actually is: http://www-128.ibm.com/developerworks/library/l-bootload.html?ca=dgr-lnxw01LILOandGRUB W -- If your're scattering a fly off an elephant, you don't worry about the mass of the elephant. But since we're physicists, lets consider the alternate example. In this case, we scatter the elephant off the fly. ~DeathMech, S. Sondhi. P-town PHY 205 Sortir en Pantoufles: up 26 days, 23:48 -- gentoo-user@gentoo.org mailing list
[gentoo-user] grub over the top of Win XP
Hi, OK, the target machine is now rebuilt. I decided since I had to rebuild both WinXP and Gentoo that I'd just put them on the same hard drive. The Gentoo install is complete right up to the point where I run grub and write it somewhere and I want to make sure I understand the right way to do this. The disk layout is like this (MBR) - Win XP /dev/hda1 - Win XP /dev/hda2 - extended partition /dev/hda5 - /boot /dev/hda6 - swap /dev/hda7 - / /dev/hda8 - /home Now, my question, where do I write grub? I believe it's into the MBR and not into partition 1, correct? If so I'd use: grub grub root (hd0,4) grub setup (hd0) (Install GRUB in the MBR) grub quit Is this correct? Thanks, Mark -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] grub over the top of Win XP
On Wed, 07 Sep 2005 04:40, Mark Knecht wrote: Hi, OK, the target machine is now rebuilt. I decided since I had to rebuild both WinXP and Gentoo that I'd just put them on the same hard drive. The Gentoo install is complete right up to the point where I run grub and write it somewhere and I want to make sure I understand the right way to do this. The disk layout is like this (MBR) - Win XP /dev/hda1 - Win XP /dev/hda2 - extended partition /dev/hda5 - /boot /dev/hda6 - swap /dev/hda7 - / /dev/hda8 - /home Now, my question, where do I write grub? I believe it's into the MBR and not into partition 1, correct? If so I'd use: grub grub root (hd0,4) grub setup (hd0) (Install GRUB in the MBR) grub quit Youve got the right idea, but hd0,4 is the logical holder for your linux partitions, not the boot partition that holds the grub files. So root is your /boot partition, ie hd0,5. All this information can be found in your info files for grub, and by using your method, section 3.2 (Installing Grub Natively) -- Breaking up Microsoft isn't enough. What the court needs to do is start breaking kneecaps. -- The BSD Daemon, when asked by Humorix for his reaction to the proposed Microsoft two-way split -- gentoo-user@gentoo.org mailing list