Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    [SOLVED] Windows partion != MBR: Grub issues

    Until recently, I had a dual boot setup with Windows XP and Debian Linux. I just replaced Debian with ArchLinux, but ... To make a long story short, I accidentally installed the Grub bootloader to the Windows partition instead of the MBR. I then quickly installed it to the MBR also, so presently Grub will load just fine and I can boot into Arch without issue. Whenever I try to boot into Windows, however, it chainloads back into the Grub bootloader, and returns me immediately to the Grub select-your-os screen.

    It seems I should somehow reinstall those first few bytes of the Windows partition, so that it can chainload properly again (it was working just fine before the mixup). However, every source I find on grub issues with Windows talks about fixing the MBR to eliminate grub, which is not what I'm looking to do.

    I've attached my menu.lst file, just in case it has issues I'm not seeing (note my windows partition is /dev/sda2).

    Any advice or suggestions are most welcome! Thank you in advance.


    # Config file for GRUB - The GNU GRand Unified Bootloader
    # /boot/grub/menu.lst

    # Linux Grub
    # -------------------------
    # /dev/fd0 (fd0)
    # /dev/sda (hd0)
    # /dev/sdb2 (hd1,1)
    # /dev/sda3 (hd0,2)

    # general configuration:
    timeout 5
    default 0
    color light-blue/black light-cyan/blue

    # boot sections follow
    # each is implicitly numbered from 0 in the order of appearance below
    # TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.

    # (0) Arch Linux
    title Arch Linux
    root (hd0,4)
    kernel /vmlinuz26 root=/dev/disk/by-uuid/ceece5b9-a5de-4332-98a9-d5c00ad3ebb2 ro
    initrd /kernel26.img

    # (1) Arch Linux
    title Arch Linux Fallback
    root (hd0,4)
    kernel /vmlinuz26 root=/dev/disk/by-uuid/ceece5b9-a5de-4332-98a9-d5c00ad3ebb2 ro
    initrd /kernel26-fallback.img

    # (2) Windows
    title Windows
    rootnoverify (hd0,1)
    chainloader +1

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    NH, USA
    can you still access your files on your windows partition through linux so you know that it is ok?

  3. #3
    Linux User
    Join Date
    Dec 2007
    Idaho USA
    If you installed grub to the XP partition , then XP files will not be assessable, it overwrites the Bios Parameter Block (BPB), part of the Volume boot record (VBR). The only time the BPB is written is during format and no MS program will rewrite it. There is also some boot code in the VBR and it can be rewritten from XP's Recovery Consoles 'fixboot' command.

    If the partition was formatted by MS Windows program, not re-sized or moved, then recovery is very good. The program to use is "testdisk" , be sure to read the how to use FIRST and paying attention to -recover XP boot record- , it will be in the advanced menu of testdisk.

    When MS formats NTFS partition it writes a backup volume boot record on the very last sector of partition, on a fat32 partition the backup is normally at sector #6. 'testdisk' will use the back up copy to replace the main VBR.
    some reading on volume boot record Partition Boot Sector. Master Boot Record. FAT32, FAT16.

    For testdisk see post #2 by ozar

    If XP files are assessable then you have a different problem.

  4. $spacer_open
  5. #4
    That was my problem exactly. I wound up rewriting the partition table with testdisk as well as fixing the ntfs boot sector, so I had to touch up /etc/fstab to make the partition numbers line up again with the new table, but now everything works!

    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts