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

Thread: grub2 problem

  1. #1
    Join Date
    Mar 2012
    Beans
    124

    grub2 problem

    hi
    i have installed windows 7 then Ubuntu , all works find so far
    after i installed windows xp , the grub2 got deleted ofc and windows xp was booting directly , so i repaired my grub


    {
    1 sudo mount /dev/sdXY /mnt

    2 sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys

    3 sudo chroot /mnt

    4 grub-install /dev/sdX

    5 grub-install --recheck /dev/sdX

    6 update-grub

    7 exit && sudo umount /mnt/dev && sudo umount /mnt/dev/pts && sudo umount /mnt/proc && sudo umount /mnt/sys && sudo umount /mnt
    }

    grub2 is back and when choosing windows 7 it boot to windows xp
    so i made windows 7 repair from windows 7 install
    now i can log to windows 7 and ubuntu
    the big problem that windows xp not detected :S
    i thought it will be detected when repair windows 7 boot , or at leats when i choose windows 7 from grub it will gave me 7 and xp
    to choose (like normal windows boot )
    i tried grub customizer,

    i don't know how to add the windows xp entry to grub2

    [IMG]

    Uploaded with ImageShack.us[/IMG]

    ty
    Last edited by abdorefky; May 22nd, 2013 at 01:51 PM.

  2. #2
    Join Date
    Jun 2006
    Location
    Nux Jam
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: grub2 problem

    that script should fix that issue:

    https://help.ubuntu.com/community/Boot-Repair

  3. #3
    Join Date
    Mar 2012
    Beans
    124

    Re: grub2 problem

    i tried the automatic fix , but it just removed the memory test entries

    http://paste.ubuntu.com/1682735/

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: grub2 problem

    Grub does not use boot flag, but Windows needs it on the partition you boot from if directly booting Windows. You have boot flag on sda3, it should be on sda2 as that is the Windows boot partition(but see below if repairing XP first).

    Windows only boots from the one primary partition with the boot flag. And since Windows only boots from one partition grub can only find one install of Windows and then from Windows you should get the choice to boot either Windows.

    But installing XP after Windows 7 creates issues as XP is not 7 aware. You have to repair 7 and use 7 to boot and update its BCD to include both.
    You may be able to move boot files for XP to the XP partition, do XP repairs (with boot flag on that partition then) and then grub may be able to boot from that.

    Windows Boot files:
    WinXP
    /boot.ini /ntldr /NTDETECT.COM
    Vista/7 (with 7 the first two files are usually in a separate 100MB boot partition)
    /bootmgr /Boot/BCD /Windows/System32/winload.exe


    To get each MS to have its own boot loader make a second primary NTFS partition and set its boot flag on, then install the 2nd product in it. Multibooters, Pictures here worth 1000+ words
    http://www.multibooters.co.uk/multiboot.html
    A user who installed two windows & it worked to boot from grub directly
    http://ubuntuforums.org/showthread.php?t=1271600
    Another user who disconnected and used a second drive
    http://ubuntuforums.org/showthread.php?t=1334346


    Then Boot-Repair or a sudo update-grub may find both Windows installs.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #5
    Join Date
    Mar 2012
    Beans
    124

    Re: this is boring

    i have read some on sites you send ,
    i removed all flag's
    re installed windows xp because repair required password ;/
    again . i got 3 options now
    1 : windows 7 ( its acully windows xp )
    2 : ubuntu
    3 : advanced ubuntu options

    why does windows xp boot installed on windows 7 partition ....
    if i went to repair windows 7 , the xp will be gone

    now ,, how to install the xp boot on its partition ?

    thx for help

  6. #6
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,560
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: grub2 problem

    First, MS combines the boot files for more than one version, unless you move the boot flag BEFORE you start the second install. Which means it's best to have the partition ready and with the boot flag set. And it has to be primary.

    In that case the installer should put the boot files on its own partition (because the boot flag is there).

    If the boot files are combined, grub2 will never show two separate entries. There will always be only one, whether it's called XP or 7.

    If you are not moving the boot flag before installing the second windows version, and windows bootloader doesn't create a dual boot option, this is up to windows. Grub2 and ubuntu have nothing to do with it, grub2 only passes the boot process to the windows boot files.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  7. #7
    Join Date
    Mar 2012
    Beans
    124

    Re: grub2 problem

    what is the MS
    i had no flags befor install windows xp ,
    after windows xp installed the flag was on sda3
    and bootloader read the boot from sda2
    how come ,,
    and why go install the bootloader on sda2 .....

    anyway, here is the new bootrepair report
    http://paste.debian.net/236767/

    if i repaired windows 7 boot it will give the report i sent earlier
    i have noticed that there is no boot files on sda 2 or 3 . lol .

    allright iam going to repair xp with boot flag on sda3
    next repair windows 7 with boot flag on sda2
    last restore grub ,
    hope that work
    really thx for helping

  8. #8
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,560
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: grub2 problem

    MS = Microsoft

    You are right, there are no boot files for XP or 7. They were probably on another partition during install, that you later deleted. For windows boot files it doesn't matter on which partition you install the OS, it matters where the boot flag is. It can even put them on another disk without you knowing anything.

    Later you remove that disk and find that your windows doesn't boot.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  9. #9
    Join Date
    Mar 2012
    Beans
    124

    Re: grub2 problem

    i have added new entry from grub customizer
    and it detected the xp , but ntldr is missing
    and that was easy to fix
    but how to access the safemode or the f8 list that i can use on normal startup

    is there a program that shows me , where is the basic boot (grub)
    stored and the pointers to the other boot's partitions , with easy descreption ?

  10. #10
    Join Date
    Mar 2012
    Beans
    124

    Re: grub2 problem

    i guess its time for this great article
    http://www.multibooters.co.uk/multiboot.html

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
  •