RestoreUbuntu_XP_Vista_7Bootloader - Community Ubuntu Documentation

Embed Size (px)

Citation preview

  • 8/13/2019 RestoreUbuntu_XP_Vista_7Bootloader - Community Ubuntu Documentation

    1/4

  • 8/13/2019 RestoreUbuntu_XP_Vista_7Bootloader - Community Ubuntu Documentation

    2/4

    3/2/2014 RestoreUbuntu/XP/Vista/7Bootloader - Community Ubuntu Documentation

    https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader

    XP

    Boot on your Windows XP installation CD or XP Recovery console. You will get to a

    part where it asks if you want to repair or recover. To do so, press "r". If prompted, enter

    your Windows XP administrator password. This will leave you at at a command line, so

    type in the following two commands:

    fixboot

    fixmbr

    Then type

    exit

    Then remove your XP cd. If everything has gone well, you should come to your XP

    bootloader.

    Windows Vista or 7 or 8

    First boot on your Windows Vista/7/8 installation DVD.

    If you have one of the many OEM computers that didn't come with a Windows

    installation disk, you can get the same effect with a Windows repair disk, which you can

    download(eg Win7-32bit, Win7 64bit) or createfrom another Windows Vista/7/8

    computer (see this page for Win7 and Make your own Windows repairCD, and

    Windows 8 UEFI repair USB must be FAT32, other Win8 guide). When you get to the

    Regional settings, select your Location/Keyboard setting then click next. On the nextpage, click on "Repair your computer." On the next page, if it finds your Windows

    installation, make sure it is UNSELECTED before clicking next. Then click on

    "Command prompt". From there, type in the following 2 commands:

    bootrec.exe /fixboot

    bootrec.exe /fixmbr

    Now close the two windows and click "Restart." Take out your Windows DVD and

    hopefully, you will be left with your Windows bootloader.

    How to partially fix the Windows

    bootloader using an Ubuntu CD

    Note:these methods will work on Legacy firmwares (not UEFI), if Windows boot files

    are not broken, and if the boot sector of the Windows boot partition is healthy. In other

    cases, you will need a Windows installation or repair disc as described above.

    http://www.eightforums.com/tutorials/2855-system-repair-disc-create-windows-8-a.htmlhttp://social.msdn.microsoft.com/Forums/en-US/samsungpcgeneral/thread/e7ed293e-b565-44ee-a536-166dddf32205http://forums.techarena.in/guides-tutorials/1114725.htmhttp://windows.microsoft.com/is-IS/windows7/Create-a-system-repair-dischttp://freakshare.com/files/56apzmkl/CyberNetNews.com_Windows_7_64-bit_Repair_Disc.iso.htmlhttp://freakshare.com/files/o2db6v0s/CyberNetNews.com_Windows_7_32-bit_Repair_Disc.iso.htmlhttp://www.bleepingcomputer.com/forums/topic270018.html
  • 8/13/2019 RestoreUbuntu_XP_Vista_7Bootloader - Community Ubuntu Documentation

    3/4

    3/2/2014 RestoreUbuntu/XP/Vista/7Bootloader - Community Ubuntu Documentation

    https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader

    Via the Boot-Repair graphical tool

    Run Boot-Repair from a liveCD, click "Advanced options", tick "Restore MBR", click "Apply".

    This will automatically restore a generic syslinux MBR, and set the boot flag on the Windows

    boot partition. This will also tell you if the Windows bootsector needs repair (see this tutorial).

    Via command lines

    1. Boot from the live CD (or live USB) of any recent version of Ubuntu and choose Try

    Ubuntu to get to the live desktop

    2. Check that the partition from which Windows boots has the 'boot' flag. For XP and Vista,

    this is normally the main C: partition. Windows 7 usually (but not always) has a separate boot

    partition of 100-200 MB in size with the partition label SYSTEM. There are also more exotic

    configurations where two versions of Windows have been installed to the same hard drive, or

    where the main Windows partition is a logical one. In these cases there will be a single primary

    partition with the Windows boot files which needs to be marked as active, and you will need to

    identify which this is. Once you have done so, open Gparted and see if boot is listed under the

    flags column for that partition. If not, highlight the partition and go to Partition menu Manage

    Flags, tick the tick-box for boot and then close that window and close Gparted.

    3. Both methods below assume that the boot drive is designated /dev/sda in Ubuntu. This is

    almost always so, but with some unusual BIOS configurations where there is more than one hard

    drive, the boot drive may be other than /dev/sda. In such cases you will need to adjust the

    command appropriately.

    https://help.ubuntu.com/community/BootSectorFixhttps://help.ubuntu.com/community/Boot-Repair
  • 8/13/2019 RestoreUbuntu_XP_Vista_7Bootloader - Community Ubuntu Documentation

    4/4

    3/2/2014 RestoreUbuntu/XP/Vista/7Bootloader - Community Ubuntu Documentation

    https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader

    If internet connectivity available, open a terminal and run these commands:

    sudo apt-get install lilo

    sudo lilo -M /dev/sda mbr

    If no Internet connection: recent versions of Ubuntu include the file /usr/lib/syslinux/mbr.bin

    which is 440 bytes in length and simply needs to be written to the beginning of the mbr with this

    terminal command. WARNING! Be very careful with this command and check for typos beforerunning it.

    sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda

    4. Now reboot, remove the Ubuntu CD and you should reboot straight into Windows.

    See also

    Thread for discussion about this wiki page

    RestoreUbuntu/XP/Vista/7Bootloader (terakhir disunting 2013-07-31 19:14:01 oleh

    yannubuntu @ localhost[127.0.0.1]:yannubuntu)

    https://launchpad.net/~yannubuntuhttp://ubuntuforums.org/showthread.php?t=2012409