mcc28x 0 Posted January 16, 2006 Hi I've just added another SATA disk to my system and before used to use Partman to switch between XP/Fedora, but this time I wanted to use Grub, alas with no success so far. The boot order in bios is set to HDD0 and then SCSI. My fdisk -l is: Disk /dev/hda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 1 13 104391 83 Linux /dev/hda2 * 14 1033 8193150 83 Linux /dev/hda3 1034 2308 10241437+ 83 Linux /dev/hda4 2309 14593 98679262+ 5 Extended /dev/hda5 2309 3583 10241406 83 Linux /dev/hda6 3584 3902 2562336 83 Linux /dev/hda7 3903 4157 2048256 83 Linux /dev/hda8 4158 14593 83827138+ 83 Linux Disk /dev/hdb: 60.0 GB, 60022480896 bytes 255 heads, 63 sectors/track, 7297 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hdb1 * 128 7297 57593025 c W95 FAT32 (LBA) /dev/hdb2 1 127 1020096 82 Linux swap / Solaris Partition table entries are not in disk order Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 9728 78140128+ 7 HPFS/NTFS Disk /dev/sdb: 163.9 GB, 163928604672 bytes 255 heads, 63 sectors/track, 19929 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 19928 160071628+ 7 HPFS/NTFS ###### My device map is: (fd0) /dev/fd0 (hd0) /dev/hda (hd1) /dev/hdb (hd2) /dev/sda (hd3) /dev/sdb ###### The version of XP I'm trying to boot is on /dev/sda This is my /etc/grub.conf: default=1 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Fedora Core (2.6.14-1.1653_FC4) root (hd0,0) kernel /vmlinuz-2.6.14-1.1653_FC4 ro root=LABEL=/ rhgb quiet initrd /initrd-2.6.14-1.1653_FC4.img title Windows XP map (hd0) (hd2) map (hd2) (hd0) rootnoverify (hd2,0) makeactive chainloader +1 #### All that happens if I select Windows XP is that the following is output to the screen: map (hd0) (hd2) map (hd2) (hd0) rootnoverify (hd2,0) makeactive chainloader +1 ...and I'm left at a flashing cursor. I've tried various suggestions, using a boot floppy & Grub's command line, which got me no further other than establishing grub can 'see' the drives as auto-completion works. Someone told me to miss out rootnoverify(hd2,0), which results in GRUB being printed to the screen and then stops. The XP drive boots okay if I change the boot order and skip grub. Any ideas anyone? Mark Share this post Link to post
danleff 0 Posted January 16, 2006 Three questions. 1. Where do you have grub installed? 2. Where is the installation if XP? 3. What was the original boot order that you had? If you change the boot order from sata to ide or the other way around, you change the drive designations, hence grub gets confused if it was installed when your original boot order was active. Share this post Link to post
mcc28x 0 Posted January 17, 2006 Originally posted by danleff: Quote: Three questions. 1. Where do you have grub installed? >>>>Grub is installed in the mbr og HDD0 - the fedora drive. 2. Where is the installation if XP? >>>>The XP installation is SATA1 - i.e. /dev/hd2 in device.map. 3. What was the original boot order that you had? Prior to adding the extra drive, I had in th bios - SATA, HDD0 and now I have HDD0, SATA. >>>>>Just before I installed the extra SATA drive I tested the above menu entry and switched the boot order and grub did boot xp >>>>>fine. This is why I now find it a little odd that although there is an extra drive, the configuration is almost the same, yet grub >>>>>cannot hand-off to the xp drive, or so it would seem... If you change the boot order from sata to ide or the other way around, you change the drive designations, hence grub gets confused if it was installed when your original boot order was active. I have reinstalled Grub for good measure (which reports no errors) but short of reinstalling fedora I'm completely stuck. Hopefully danleff you can give me some pointers? Thanks, Mark Share this post Link to post
danleff 0 Posted January 19, 2006 I'm iooking hard and deep at this thread. I myself just trashed my grub install, trying to open more disk space for my multiple OS' and deleted my grub, having to start from scratch. Your problem seems to be connected to switching your boot order. One must have a solid plan of attack to make sure that grub is configured properly. Your boot.ini file is located at sda1, which grub needs to reference. But then you switched the boot order from sata to ide. Grub, for sure is installed on the first ide hard drive at the MBR? If I am reading this correctly, your grub file is mismatched for the drive. I assume that you are editing grub at the boot menu, not the grub.conf or menu.lst file itself? This way you can easily try some commands and see how they work, before making them permenant. Try the following for Windows; title Windows XP chainloader (hd2,0) +1 No reverse mapping, makeactive or rootnoverify lines. I don't have grub installed via Fedora, which probably has different syntax...but let's see. Let me know what error messages that you get, if any. Share this post Link to post
mcc28x 0 Posted January 20, 2006 Originally posted by danleff: Quote: Grub, for sure is installed on the first ide hard drive at the MBR? Yes, this is correct. Quote: If I am reading this correctly, your grub file is mismatched for the drive. I assume that you are editing grub at the boot menu, not the grub.conf or menu.lst file itself? This way you can easily try some commands and see how they work, before making them permenant. Try the following for Windows; I follow your line of thought here. Quote: title Windows XP chainloader (hd2,0) +1 No reverse mapping, makeactive or rootnoverify lines. I don't have grub installed via Fedora, which probably has different syntax...but let's see. Let me know what error messages that you get, if any. Okay I did this with no joy, grub basically hung after printing the cursor to the screen. If I had installed grub with the boot order HDD0, SATA then for XP to boot the drives would need to be mapped etc - this seems quite logical. But.....I didn't so the original boot order was SATA, HDD0, so the SATA would have been the first drive and no mapping required. But this I have tested as above and no joy. Also Grub quite happily boots fedora with the above setup with root(hd0,0) etc.... Something is screwed but it is very difficult to understand what... I wonder what effect if any would be if I did root(0,0) and setup(hd0) in the grub shell? Mark Share this post Link to post
danleff 0 Posted January 20, 2006 OK, let's back up a little. Did you re-install grub after changing the boot designatio to ide first? If so, how did you reinstall Grub...via the command line? If so, what commands did you use? Also, there is a typo, I think, on my part. Try; title Windows XP chainloader (hd2,0)+1 (no space between chainloader (hd2,0) and +1) If that does not work, try; title Windows XP chainloader (hd0,0)+1 Let us know if you get any errors. if still nogo, try; title Windows XP map (hd0) (hd2) map (hd2) (hd0) chainloader (hd2,0)+1 Remember, changing the boot order also confuses the boot.ini file, which is set to look for the Windows start-up files on a specific drive. Changing the boot order in the bios can affect this as well. Share this post Link to post
mcc28x 0 Posted January 21, 2006 Originally posted by danleff: Quote: OK, let's back up a little. Did you re-install grub after changing the boot designatio to ide first? If so, how did you reinstall Grub...via the command line? If so, what commands did you use? Also, there is a typo, I think, on my part. Try; title Windows XP chainloader (hd2,0)+1 (no space between chainloader (hd2,0) and +1) ...results in flashing cursor... If that does not work, try; title Windows XP chainloader (hd0,0)+1 ...loading stage 1.5...Grub Loading, please wait...Error 18. Let us know if you get any errors. if still nogo, try; title Windows XP map (hd0) (hd2) map (hd2) (hd0) chainloader (hd2,0)+1 ...results in flashing cursor... Remember, changing the boot order also confuses the boot.ini file, which is set to look for the Windows start-up files on a specific drive. Changing the boot order in the bios can affect this as well. Here is my boot.ini [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn I reinstalled Grub with the IDE as 1st boot device. To do this I worked in a terminal window and issued grub-install /dev/hda. It would seem that grub cannot hand over to the ntldr, I'm considering a fresh install the way things are looking... Mark Share this post Link to post
danleff 0 Posted January 21, 2006 ...and there looks like your problem, the boot.ini file, which is pointing to the first drive on the system, as it was when you had sata as your first boot device. You have a couple of choices. 1. If you feel comfortable doing this, and have admin rights to your Windows installation, you can try editing the boot.ini, changing it to; boot loader] timeout=30 default=multi(0)disk(0)rdisk(2)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(2)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn Then use the reverse mapping scheme that you originally had, or my modified one without the norootverify etc... 2. Reinstall grub on sda, not sda1 and make sure that you change back the boot oder to sata first. 3. Reinstall Linux and install the grub bootloader to sda. What you choose to do depends on your level of comfort and the critical nature of your system, whether Windows is a critical mission system or not (you can afford to mess things up on the system). The last option being the easiest and probably the least risky. Share this post Link to post
mcc28x 0 Posted January 22, 2006 Originally posted by danleff: Quote: ...and there looks like your problem, the boot.ini file, which is pointing to the first drive on the system, as it was when you had sata as your first boot device. danleff, Just wanted to say thanks for your help, I now have XP and Fedora dual booting using Grub. The problem was undoubtedly caused by a mismatch between the bios boot order and grub. I've done a full reinstall with grub on /dev/sda and matched the boot order in grub to the bios. Once again, thanks. Mark Share this post Link to post
danleff 0 Posted January 22, 2006 No problem! I'm glad you got it sorted out. This thread was a bit difficult, as the boot order was switched somewhere in the process. I note to readers, there is no need to do this. Resist the urge to change the boot order when installing Linux. Then have fun! Remember (read my signature)... Share this post Link to post
fnx 0 Posted February 8, 2006 Originally posted by danleff: Quote: Resist the urge to change the boot order when installing Linux. Could you explain what you mean by changing the boot order ? Can you modify the boot order (for grub) without physically unplugging hardrive from a connection ? Thanks Share this post Link to post
danleff 0 Posted February 8, 2006 Let me clarify what seems to be a confusion. Quote: There is no need to change the boot order in the bios when installing Linux. Folks sometimes think that they need to change the boot order in the bios to a second hard drive that they have in the system when installing Linux to a second hard drive. When installing Linux, Grub will assign each drive in the system and identifier. Such as; Primary master drive = hda Primary slave drive = hdb Secondary master = hdc Secondary slave - hdd Say you have two drives in your system and you install Linux on the primary slave and XP is on the primary master, both on the first partition of each drive. You want to dual boot and install Grub in the MBR of the primary master. Windows XP = Primary master, or hda Linux = Primary slave, or hdb Grub will assign the drives in the /boot/grub/device.map file; (hd0).../dev/hda (hd1).../dev/hdb Grub starts the drive assignments at zero, not 1. title kernel (hd1,0)/boot/vmlinuz...... title Windows chainloader (hd0,0) +1 Where (hd0,0) is the primary master drive's first partition. Where (hd1,0) is the secondary salave drive's first partition. Depending on how you assigned partitions on your drives (primary partition vs. logical partitions), the second number may vary. In a hard drive with a combination of primary and logial partitions, primary partitions generally have lower number sequences and logial partitions are assigned higher number sequences. If you want to change the order that each OS boots by default, you change the default line in grub to tell it to boot whichever OS that you want to be the default OS to boot first; Default=0 Tells grub to boot the first entry OS in Grub, which in the above example is Linux. Default =1 tells grub to boot windows by default. There is no need to unplug drives from the system to boot a second drive in this senario. Unplugging drives or changing the boot order in the bios (which hard drive boots first) only confuses grub, which is set to boot in the order that the drives were originally set at when Linux was installed. Of course, there are complications if you make a mistake and set grub to install on the MBR of the second drive. Then Grub does not boot from hda, or the primary master. In this case, since grub is on the secondary slave drive, if you change the boot order in the bios to HDD1 rather than HDD0, grub is on the MBR of the second drive and you get the grub boot screen. This is why you need to take care and pay attention to what you tell Linux to do when installing a bootloader. All these things can be "fixed" by changing some commands in grub to reverse the drives in the system, but better to do it right first! Add raid or sata drives, or a pci raid controller card and things get a little more challenging. Share this post Link to post
ckeilah 0 Posted February 24, 2006 quote: Add raid or sata drives, or a pci raid controller card and things get a little more challenging. And this brings us to my odd little situation. I installed two new 300GB SATA Drives in my Shuttle. I partitioned the first one with 100GB for a new Linux install, 10GB swap, and 190GB NTFS partition (onto which I cloned my old ATA Windoze2000 bootable drive before removing it from the system entirely). So, now I have a lovely, bootable via GRUB, Linux system. I've managed to make it fully functional, but I just can't boot the Windoze partition to save my life. Could this be because it's beyond "the 1024 boundary"? Well, ok. If that's the case I can move things around, but where to move them, and how to best do it so as not to lose data? I'm feeling kind of like an idiot at this point. It's been a decade since I was hacking kernels and I could use a little hand holding. :-) PS: Did I hose myself by replacing Windoze's MBR with GRUB's MBR? Do I need to reinstall Windoze's MRB with "fdisk /mbr" or something? (fdisk /mbr doesn't seem to work from windoze2000's command prompt...) hrmmm.... Cheers! Share this post Link to post
danleff 0 Posted February 24, 2006 Well, let's see how to best respond to this situation... First, let me direct you to this article that may explain some things. What you have done, in effect, is reversed the designations of your partitions. I don't know how your drive partitions are being seen currently. In the best situation, you should have cloned the NTFS partition first for Windows 2000. The above article that I referenced may explain the issue somewhat. Let me ask the following; 1. There are no ide (pata) drives in the system currently? 2. What Linux distro and version are you running? 3. What is the bios set at to boot in order of drives and type of drives in the system. 4. What make and model motherboard is this that you have? 5. what utility did you use to "clone" the windows 2000 drive/partition? First, in terms of the actual boot order in the bios, what do you have. Also, is the system set to boot from any pata drive first, or sata first. In the bios, what is the designations of the drives being used for the bios to sense first... ide, scsi.... or scsi, ide....? Quote: I partitioned the first one with 100GB for a new Linux install, 10GB swap, and 190GB NTFS partition 10 gigs of swap space? This is way too much for normal use and a waste of space. How much memory is in this system? Quote: So, now I have a lovely, bootable via GRUB, Linux system. I've managed to make it fully functional, but I just can't boot the Windoze partition to save my life. Could this be because it's beyond "the 1024 boundary"? Well, yes and no. The MBR refers to the beginning of the hard drive. You have Grub on the beginning of the hard drive and XP further down on the hierarchy. Quote: Did I hose myself by replacing Windoze's MBR with GRUB's MBR? Do I need to reinstall Windoze's MRB with "fdisk /mbr" or something? (fdisk /mbr doesn't seem to work from windoze2000's command prompt...) You have grub on the MBR. If you installed Linux after Windows, you must use grub to boot into linux and Windows in a dual boot scenario. The fdisk /mbr is a dos function. Note the article (again) previously referred to. This command is usually done via a dos or Windows 98 boot disk (in dos mode). But, if you do this, then you forgo your ability to boot into Linux. But be aware,this technique does not always work. What would I do?...you may not like the answer. But first, can you post your grub.conf or menu.lst file contents? This will tell us something that may help. Then we can take it from there. Share this post Link to post
smaloney41 0 Posted March 19, 2006 Hi I have a similar situation to your first situation on this message. I have a mirrored set of serial drives sda and sdb with windows xp in a raid. I have a separate ide drive with linux on it. I have attempted to install fedora and mandriva linux on this set up. Both cleanly install with grub installed on the ide drive. Basically will not boot into the windows drive at all just hangs as your first user has pointed out. I did do the install with my bios set to boot order of cdrom then ide drive then serial drive and did not change that order and no improvement. It seems like there is no hope for this method and the only way I can possibly dual boot is to install grub onto my serial drive's mbr. I don't like this option as in the past it has corrupted my windows boot and I have not been able to repair the mbr if I want to go back to normal booting? I have also read multiple posts about using the windows bootloader to boot linux and have copied the bootsect.lnx file on to windows boot.ini file and have been unable to boot windows. thanks Sean Maloney Share this post Link to post
danleff 0 Posted March 19, 2006 Allow me to ask some questions. I don't know much about raid arrays, but what I do know, is that Linux and Windows handle things a bit differently. Quote: I did do the install with my bios set to boot order of cdrom then ide drive then serial drive and did not change that order and no improvement. What was the bios boot order when you had the pure raid array booting on the sata drives for Windows? Why do I ask? You noted; Quote: don't like this option as in the past it has corrupted my windows boot and I have not been able to repair the mbr if I want to go back to normal booting? Let me explain where I am going. In my bios, I have two settings for boot orders. One for the actual boot order of hardware (cdrom, floppy, hdo, hd1...) The other setting is what drives should be detected first, sata (scsi) or ide drives. The settings are; scsi, ide,raid (they are listed in order). If I pick scsi, then the sata drives are detected first. If I pick ide, then the primary master ide drive is detected first, as the boot drive. If you change any of these setings, then the logical boot order of the drives changes. Therefore, the Windows boot.ini file fails, as it was set up (when you installed Windows) to look for the Windows system files in a certain place, relative to the bios settings when Windows was originally installed. If I am totally wrong here with your setup, then I would think the issue is with the raid array and how grub sees it. If your system uses pure hardware raid, then the problem is handled one way. If the raid array is soft raid (as per the software provided by your motherboard company), then this is another issue. Quote: I have also read multiple posts about using the windows bootloader to boot linux and have copied the bootsect.lnx file on to windows boot.ini file and have been unable to boot windows. The same rules apply. If you use this method, you can't change the way that the bios detects the boot drive between installations. BTW, i think you mean that you copied the bootsect.lnx file to the root of the Windows drive and referenced it in the boot.ini, correct? Hopefully a raid user will be able to comment on this and give more useful information. BTW, what motherboard make and model is this? Share this post Link to post
smaloney41 0 Posted March 19, 2006 Originally posted by danleff: Quote: Allow me to ask some questions. I don't know much about raid arrays, but what I do know, is that Linux and Windows handle things a bit differently. Quote: I did do the install with my bios set to boot order of cdrom then ide drive then serial drive and did not change that order and no improvement. What was the bios boot order when you had the pure raid array booting on the sata drives for Windows? Why do I ask? You noted; I originally had to install windows without my ide drive installed. I then reinstalled my ide drive which has a small fat32 partition with the remainder of the drive for linux. I then installed linux. At that point I did change the boot order as I wanted grub on the ide drive not the windows drive so as not to alter my windows mbr. So I changed the boot order prior to installing linux. Quote: don't like this option as in the past it has corrupted my windows boot and I have not been able to repair the mbr if I want to go back to normal booting? Let me explain where I am going. In my bios, I have two settings for boot orders. One for the actual boot order of hardware (cdrom, floppy, hdo, hd1...) I have two separate bios. The first is the standard bios which detects cdrom/floppy/ide/. This bios allows me to set the boot order separately but I can't change the order things are detected. Then the bios for the raid comes up and detects my two sata drives. The other setting is what drives should be detected first, sata (scsi) or ide drives. The settings are; scsi, ide,raid (they are listed in order). If I pick scsi, then the sata drives are detected first. If I pick ide, then the primary master ide drive is detected first, as the boot drive. If you change any of these setings, then the logical boot order of the drives changes. Therefore, the Windows boot.ini file fails, as it was set up (when you installed Windows) to look for the Windows system files in a certain place, relative to the bios settings when Windows was originally installed. This may be the answer to my problem as the boot.ini file was set up without an ide drive in the system. the output includes: default=multi(0)disk(0)rdisk(0)partition(1)\windows [operating systems] multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Profesional"/fastdetect If I am totally wrong here with your setup, then I would think the issue is with the raid array and how grub sees it. If your system uses pure hardware raid, then the problem is handled one way. If the raid array is soft raid (as per the software provided by your motherboard company), then this is another issue. software raid array Quote: I have also read multiple posts about using the windows bootloader to boot linux and have copied the bootsect.lnx file on to windows boot.ini file and have been unable to boot windows. The same rules apply. If you use this method, you can't change the way that the bios detects the boot drive between installations. BTW, i think you mean that you copied the bootsect.lnx file to the root of the Windows drive and referenced it in the boot.ini, correct? yes Hopefully a raid user will be able to comment on this and give more useful information. BTW, what motherboard make and model is this? Asus A7N8X Deluxe PCB 2.0 Share this post Link to post
danleff 0 Posted March 19, 2006 I have the exact same motherboard. Try this. Change the Windows boot lines in grub to read something like; title Windows XP map (hd0) (hd1) map (hd1) (hd0) chainloader (hd,0)+1 You can do this from the grub boot screen, by pressing the "e" key on the keyboard after highlighting the Windows title line. You should see the total lines for Windows. You can add the map lines and edit the others by following the underscored directions. Push the return key to accept your changes on any given line. When you finish making the alterations that you need, hit the "b" key, which should try to boot the changes that you made. This way, you make the changes temporary to see how they work. Once you get the correct sequence that works, then you can add them to the /boot/grub/menu.lst file. Share this post Link to post
smaloney41 0 Posted March 20, 2006 Hi Tried numerous permutations of your fix and none seem to work. I think you meant to say chainloader (hd1,0)+1 Share this post Link to post
danleff 0 Posted March 20, 2006 Hmm...the rdisk value in the windows boot.ini should match the grub entry. Remember, using the map commands reverses the designation of the drives, so they match as if you booted off of the sata drive first. So, if your rdisk value is 0, then, chainloader (hd0,0)+1 My guess is the raid setup has something to do with this problem? What are the drive designations in the Fedora /boot/grub/device.map file? However, there are so many problems here with Fedora's grub (I use SuSE's grub on my system) I wonder what the issue is. Share this post Link to post
smaloney41 0 Posted March 20, 2006 no go with hd0,0 just hangs device map (fd0) /dev/fd0 (hd0) /dev/hda (hd1) /dev/sda (hd2) /dev/sdb by the way I had to add sda and sdb during grub installation. I have also tried copying linux.bin to the windows c drive and tried to boot that way. loaded the bootloader early in the drive on hda2. When I try to boot that way hangs at GRUB? I certainly could try SUSE again as I have multiple versions of linux. I read one fix which talks about installing fedora 4 with the windows drive unplugged but this referred to two ide drives without a raid. Share this post Link to post