Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Problem with grub and XP

  1. #1
    Join Date
    Sep 2008
    Beans
    25

    Problem with grub and XP

    Hi! I don't know if anyone has already posted something like this, but i searched and i didnt find this exact problem.

    I have been a ubuntu user for some months but recently i decided to install Windows Xp in an empty partition.

    After installing XP GRUB didn't show up, but i found out in some site that you can restore grub by booting with the ubuntu CD. I did so, and now GRUB is the default boot-loader.

    The problem is that i want to add a XP entry to GRUB, and i'm having some problems doing so.

    From what i know about GRUB, i would have to modify /boot/grub/menu.lst and add some code with the XP entry

    Code:
    Disk /dev/sda: 250.0 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xff620747
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1       10444    83886080    7  HPFS/NTFS
    /dev/sda2   *       10444       13055    20971520    7  HPFS/NTFS -> XP
    /dev/sda3           13055       28067   120586240    7  HPFS/NTFS
    /dev/sda4           28068       30401    18747855    5  Extended
    /dev/sda5           28068       30298    17920476   83  Linux
    /dev/sda6           30299       30401      827316   82  Linux swap / Solaris
    Windows XP is installed on sda2, therefore i would have to add something like this to menu.lst:

    Code:
    title		Microsoft Windows XP SP3
    rootnoverify	(hd0,1)
    savedefault
    makeactive
    chainloader	+1
    ...right? because sda2 -> hd0,1


    But it doesn't work !(says something a missing NTLDR)

    Obviously I'm doing something wrong, but i'm a newbie in linux so i'm kind of lost.....

    Help please!!

    cumpz

  2. #2
    Join Date
    Nov 2005
    Location
    Cary IL
    Beans
    325
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Problem with grub and XP

    Have you tried the super grub boot loader it is a must have for dual triple quad boot
    http://www.cyberciti.biz/tips/super-...inux-boot.html

  3. #3
    Join Date
    Sep 2008
    Beans
    25

    Re: Problem with grub and XP

    Quote Originally Posted by nacho32 View Post
    Have you tried the super grub boot loader it is a must have for dual triple quad boot
    http://www.cyberciti.biz/tips/super-...inux-boot.html
    Isn't that a bootable disk? I mean, it may be useful, but i don't want to recover to the cd every time i want to boot windows.... or can it change the grub permanently?

  4. #4
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Problem with grub and XP

    Quote Originally Posted by hiKen View Post
    Code:
    Disk /dev/sda: 250.0 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xff620747
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1       10444    83886080    7  HPFS/NTFS
    /dev/sda2   *       10444       13055    20971520    7  HPFS/NTFS 
    /dev/sda3           13055       28067   120586240    7  HPFS/NTFS
    /dev/sda4           28068       30401    18747855    5  Extended
    /dev/sda5           28068       30298    17920476   83  Linux
    /dev/sda6           30299       30401      827316   82  Linux swap / Solaris
    It looks to me like the crux of your problem is a partitioning issue; your start/stop points for the partitions above are on exactly the same cylinder, meaning they overlap. From Ubuntu, try the following:
    Code:
    sudo apt-get install testdisk
    sudo testdisk
    After starting testdisk with the above command, choose "no log", select HDD and "proceed", "Intel", "Analyze", and see what it shows for your HDD and what errors it might give. Please post the output of that screen.

  5. #5
    Join Date
    Sep 2008
    Beans
    25

    Re: Problem with grub and XP

    Code:
    TestDisk 6.8, Data Recovery Utility, August 2007
    Christophe GRENIER <grenier@cgsecurity.org>
    http://www.cgsecurity.org
    
    Disk /dev/sda - 250 GB / 232 GiB - CHS 30402 255 63
         Partition               Start        End    Size in sectors
    * FAT32 LBA                0   1  1 12160 254 37  195366376 [FD_BETA9SR2]
    P HPFS - NTFS          13054  75 14 28066 149 51  241172480 [DADOS]
    P Linux                28067   0  1 30297 254 56   35841008
    L Linux Swap           30298   1  1 30400 254 47    1654616
    (I don't know what this means)

    What do you think?

  6. #6
    Join Date
    Nov 2005
    Location
    Cary IL
    Beans
    325
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Problem with grub and XP

    Quote Originally Posted by hiKen View Post
    Isn't that a bootable disk? I mean, it may be useful, but i don't want to recover to the cd every time i want to boot windows.... or can it change the grub permanently?
    yes it can correct problems

  7. #7
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Problem with grub and XP

    Quote Originally Posted by hiKen View Post
    Code:
    TestDisk 6.8, Data Recovery Utility, August 2007
    Christophe GRENIER <grenier@cgsecurity.org>
    http://www.cgsecurity.org
    
    Disk /dev/sda - 250 GB / 232 GiB - CHS 30402 255 63
         Partition               Start        End    Size in sectors
    * FAT32 LBA                0   1  1 12160 254 37  195366376 [FD_BETA9SR2]
    P HPFS - NTFS          13054  75 14 28066 149 51  241172480 [DADOS]
    P Linux                28067   0  1 30297 254 56   35841008
    L Linux Swap           30298   1  1 30400 254 47    1654616
    (I don't know what this means)

    What do you think?
    Something definitely seems to be wrong, because testdisk is not showing sda1 and sda2, but instead shows that FAT32 partition above that doesn't quite include the entire disk space used by sda1 and sda2.

    Go back into testdisk and proceed to the point where you get the screen above, and then do "proceed", "n" to find Vista partitions, hit enter and select "search!" so it does a deeper search which will take a while. After it is done with its deeper search, please post the output.

  8. #8
    Join Date
    Mar 2008
    Beans
    4,714
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Problem with grub and XP

    hiKen, it does look like there is something wrong with the partition table. Try caljohnsmith's advice.

    Also, your problem has some resemblance to this one: http://ubuntuforums.org/showthread.php?t=838469
    especially when you say the NTLDR is missing.

    Perhaps try meierfra.'s instructions in post #16: http://ubuntuforums.org/showpost.php...2&postcount=16
    It will place a copy of NTLDR in your Windows partition.

    Where he says
    Code:
    sudo mount /dev/sda1 /windows
    instead type
    Code:
    sudo mount /dev/sda2 /windows
    since sda2 is your Windows partition.
    Last edited by unutbu; September 5th, 2008 at 06:19 PM.

  9. #9
    Join Date
    Sep 2008
    Beans
    25

    Re: Problem with grub and XP

    Quote Originally Posted by caljohnsmith View Post
    Something definitely seems to be wrong, because testdisk is not showing sda1 and sda2, but instead shows that FAT32 partition above that doesn't quite include the entire disk space used by sda1 and sda2.

    Go back into testdisk and proceed to the point where you get the screen above, and then do "proceed", "n" to find Vista partitions, hit enter and select "search!" so it does a deeper search which will take a while. After it is done with its deeper search, please post the output.
    Sorry

    The output I posted is from after Testdisk analyses the partitions:

    This is what I get from Intel>Analyse :

    Code:
    TestDisk 6.8, Data Recovery Utility, August 2007
    Christophe GRENIER <grenier@cgsecurity.org>
    http://www.cgsecurity.org
    
    Disk /dev/sda - 250 GB / 232 GiB - CHS 30401 255 63
    Current partition structure:
         Partition                  Start        End    Size in sectors
    
     1 P HPFS - NTFS              0  32 33 10443 117 42  167772160
     2 * HPFS - NTFS          10443 117 43 13054  75 13   41943040 [XP]
     3 P HPFS - NTFS          13054  75 14 28066 149 51  241172480 [DADOS]
     4 E extended             28067   0  1 30400 254 63   37495710
     5 L Linux                28067   1  1 30297 254 63   35840952
       X extended             30298   0  1 30400 254 63    1654695
     6 L Linux Swap           30298   1  1 30400 254 63    1654632
    
    
    
    
    *=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
    [Proceed ]  [ Backup ]
                                Try to locate partition
    In the other post I posted what happens after "[Proceed]"

    Although, I don't have the "N" option in that screen, only have A (add partition); L (load backup); T (change type); P (list files)

  10. #10
    Join Date
    Mar 2008
    Beans
    4,714
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Problem with grub and XP

    What do you get when you type
    Code:
    sudo fdisk -lu
    This will show you the partition table with Start and End numbers given in sectors. Maybe your partition table is okay, but the partitions do not end at cylinder boundaries.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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