Difference between revisions of "Talk:How to setup boot loaders"
(→Interferences with BIOS) |
Piccobello (Talk | contribs) (Using Grub to boot Windows) |
||
Line 64: | Line 64: | ||
4) grub doesnt pass thru the force-lba to stage 2 | 4) grub doesnt pass thru the force-lba to stage 2 | ||
+ | |||
+ | == Using Grub to boot Windows == | ||
+ | |||
+ | |||
+ | I managed to do it without messing the hidden partition up, see [[User:Piccobello]]. |
Revision as of 16:15, 28 November 2006
Why does the article say that LILO/GRUB occopy the "MBR or boot sector" while NT Boot Loaded occupies both? You can boot Windows with a GRUB MBR or GRUB with a Windows MBR, so I don't see why the latter is true.
(BTW, sory for the misflag, last edit wasn't "minor".)
--Thinker 09:10, 1 Oct 2005 (CEST)
There might be a better expression for that. What it should say is that NTLDR will always install to the partitions boot sector. You can't just install NTLDR to the MBR (as you can do with grub and lilo). Since it installs to the boot sector, you will also have to install something into the MBR that runs that boot sector. If you just install Windows that boot code kind of also belongs to the NT boot loader. Hence, to have an NT boot loader running, you need to have boot code in both the MBR and the boot sector. Wyrfel 14:13, 1 Oct 2005 (CEST)
Interferences with BIOS
When I got a new PC (Gericom Phantom 31100 with AMD Sempron) the first thing was to add Linux to the preinstalled Windows XP.
Here what happended to me: Booting from Linux install disk and starting installation: Everything fine but what I didnt know: Geometry as reported from disk was different to geometry on disk. The Windows XP somehow assumed that number of heads is 255 while the disk reported 63. Additionally the BIOS reported "LBA off" (AMI-Bios 8.00.12 allows only [AUTO] for hard disk recognition and I found no chance to set that using BIOS menu).
The result: Neither Linux nor Windows was anymore bootable, Windows not even from Recoverty Disk !!!!. By bad luck I even lost the original MBR in my helpless attempts to fix that using different bootloader configurations. The best I could archieve: Using the force-lba option in GRUB made the stage 1 loadable but not stage 2. And asking for help thru helpline of manufacturer: No answer till today (3 weeks from now).
But I found some hints on Linux pages about: Windows takes number of heads from partition table and refuses to boot in that case. So a applied the suggested fix
> sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda
Warning: HDIO_GETGEO says that there are 16 heads
Disk /dev/hda: 193821 cylinders, 255 heads, 63 sectors/track Old situation: Warning: The partition table looks like it was made for C/H/S=*/16/63 (instead of 193821/255/63). For this listing I'll assume that geometry. Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/hda1 * 0+ 79191 79192- 39912736+ 7 HPFS/NTFS /dev/hda2 79192 81271 2080 1048320 82 Linux swap /dev/hda3 81272 193820 112549 56724696 83 Linux /dev/hda4 0 - 0 0 0 Empty New situation: Units = sectors of 512 bytes, counting from 0 Device Boot Start End #sectors Id System /dev/hda1 * 63 79825535 79825473 7 HPFS/NTFS /dev/hda2 79825536 81922175 2096640 82 Linux swap /dev/hda3 81922176 195371567 113449392 83 Linux /dev/hda4 0 - 0 0 Empty Warning: partition 1 does not end at a cylinder boundary sfdisk: I don't like these partitions - nothing changed. (If you really want this, use the --force option.)
and using --force made me happy: Both, Linux and Windows now bootable.
Summary: There a propably 4 problem areas / errors
1) BIOS tells lba=off for a ATA disk which has LBA=yes after autodedect In my opinion a bios error
2) grub-install produces (and overwrites) an MBR which is based on what the disk reports and not on original partition table
3) Windows XP boot terminated when a completly unnecessary check (number of heads when using LBA) fails
4) grub doesnt pass thru the force-lba to stage 2
Using Grub to boot Windows
I managed to do it without messing the hidden partition up, see User:Piccobello.