Re: Fedora Core 2/Windows XP dual boot: selecting Linux doesn't work



Enrique Perez-Terron wrote:

> This seems to show that NTLOADER is doing the right thing, it is
> loading the file and running its contents. I would believe it loads
> it the into the right place in memory too. What could it be that went
> wrong??

No idea. I also messed around with LILO, but without more success than
I had with grub (all I got was "LI 99 99 99 ..." on my screen). So I
decided to do a completely fresh install.

At the beginning of the installation, I get (and previously got every
time) the following warning:

"Unable to align partitions probably. This probably means that another
partitioning tool generated an incorrect partition table, because it
dodn't have the correct BIOS geometry. It is safe to ignore, but
ignoring may cause (fixable) problems with some boot loaders."

I opted to remove all partitions and format the entire disk, so I
hardly believe this warning has anything to do with the problem, but I
thought I'd mention it, just in case it means something to you.

I repeated the steps I described earlier. As I did before, I had the
Fedora CD install the boot loader in /dev/hdc1. As before, I had to
change device.map and grub.conf, because grub had got hd0 and hd1 mixed
up.

I copied the file stage1, and the first 512 bytes of /dev/hdc1 for
future reference, and ran "grub-install --debug /dev/hdc1". This was
the output:

grub> root (hd1,0)
Filesystem type is extfs, partition type 0x83
grub> setup --stage2=/boot/grub/stage2 --prefix=/grub (hd1,0)
Checking if"/grub/stage1" exists...yes
Checking if"/grub/stage2" exists...yes
Checking if"/grub/e2fs_stage1_5" exists...yes
Running "embed /grub/e2fs_stage1_5 (hd1,0)"...failed (this is not
fatal)
Running "embed /grub/e2fs_stage1_5 (hd1,0)"...failed (this is not
fatal)
Running "install --stage2=/boot/grub/stage2 /grub/stage1 (hd1,0)
grub/stage2 p /grub/grub.conf "...succeeded
Done.
grub> quit

That failed embedding worries me a bit, but it's not supposed to be
fatal...
I copied the first 512 bytes of /dev/hdc1 again and rebooted to XP.

> Hey, could you do "od -t x1 linuxboot.bin" ? I want the byte at
> offset 0x40 into the file, that is 0100 octal. This byte is initialized
> to 0xff in the stage1 file, but patched to 0x81 in your setup, to
> say "we are booting from disk (hd1)."

I use WinHex for this kind of work. Very convenient, allows you to
compare files, search for stuff, etc.

Indeed, in stage1 the 0x40 byte is 0xff. In the boot record as Fedora
had created it, the 0x40 byte is 0x80. That makes sense, because it had
the idea that hdc was (hd0). In the boot record as it was created with
my modified device.map and grub.conf, the 0x40 had changed back to
0xff. That at least explains why I can't boot, but it remains to find
out why this happens.

> Also, the four bytes starting
> at offset 0x44 should be the (little-endian) 32-bit number indicating
> what sector to read off said drive. It should point suitably into
> the first partition. I would expect something like 64 (0x40),
> since the first partition starts in sector 63 (1-based).

In the original BR these bytes were 0x41, 0xa8, 0x01, 0x00. In the BR
created with my device.map and grub.conf they are 0x41, 0xb0, 0x01,
0x00. Not quite the 0x40 you were expecting.

I made a bold dash and manually changed that 0xff at offset 0x40 to
0x81. But of course, this didn't help: "GRUB Hard Disk Error".

> I hope you find the time to try it, and post the final part of the
> output, so we could all have a chance to learn. After all, you
> don't reinstall grub in new configurations every day.

See above. I hope it's of some use to you!

--
Garmt de Vries.

.



Relevant Pages

  • Re: Howto fix grub after converting to reiserfs
    ... The initial load of grub is done by the BIOS, which reads the boot sectors for additional information for the boot process. ... If you still have problems, and can come up with a small bit of additional disk space, near the beginning of the disk, create a separate partition for /boot and format it as ext3, move all the files from your existing subdirectory into this new partition, edit the menu.lst file to remove all references to '/boot', edit fstab to do a mount of this partition on /boot, and reboot. ... it will perform a full install presuming the Stage 2 or Stage 1.5^10 is in its final install location. ... 0, Filesystem type is fat, partition type 0x16 ...
    (Debian-User)
  • fixing grub : mbr fix when windows install after linux
    ... "There is not a boot manager screen at all, ... windows but GRUB boot window does not appear. ... "I forgot to install GRUB, I didn't install GRUB in the MBR, I chose ... Fedora but that was not an active primary partition". ...
    (comp.os.linux.misc)
  • Re: Dual boot problem
    ... The install went smoothly but when the computer restarted it ... went straight into Windows XP and the Grub Bootloader did not appear! ... One produced the same problem) For some reason the Grub bootloader had ... install GRUB on the first track on the partition where I installed ...
    (comp.os.linux.setup)
  • Re: Howto fix grub after converting to reiserfs
    ... First, to rephrase a bit of what shell says the problem is, highly simplified. ... The initial load of grub is done by the BIOS, which reads the boot sectors for additional information for the boot process. ... If you still have problems, and can come up with a small bit of additional disk space, near the beginning of the disk, create a separate partition for /boot and format it as ext3, move all the files from your existing subdirectory into this new partition, edit the menu.lst file to remove all references to '/boot', edit fstab to do a mount of this partition on /boot, and reboot. ... it will perform a full install presuming the Stage 2 or Stage 1.5^10 is in its final install location. ...
    (Debian-User)
  • GRUB Loading Stage2Read Error
    ... gives an error "GRUB Loading stage2Read Error". ... even tried a complete re-install with the default Fedora ... Fedora 2 32-bit install on it from my old system, ... The partition maps as reported from fdisk are: ...
    (comp.os.linux.setup)