Page 6 of 7 FirstFirst ... 4567 LastLast
Results 51 to 60 of 68

Thread: HOW TO: Recover Windows MBR using Ubuntu LIVE CD

  1. #51
    Join Date
    May 2007
    Beans
    1,276

    Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD

    Hi John,
    Thanks so much for writing in to help me. I actually have just now gotten the solution, and everything is fine. The solution actually came from a post on another thread which you yourself wrote. So I have to thank you profoundly for your generosity and expertise. If you are interested to see what transpired, please see this thread, where I had described everything in detail and ultimately received reference to your link which solved the problem. Here is the thread link:

    http://ubuntuforums.org/showthread.php?t=1153560

    Someone in page 3 of the above thread gave reference to your post, which solved the problem for me. I have to apologize as well, for posting my problem in two places, for I was desperate and under time pressure to solve the problem

    Thanks again for all your help!

  2. #52
    Join Date
    May 2009
    Beans
    1

    Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD

    hi guys,

    I have similar problem and I thought I was going to sort it pretty easy, but somehow I cant do it.

    here is the thing:

    I had two hdds in my pc

    sda - ntfs boot partion for windows xp
    sdb - ntfs data storage

    then I added third hdd and installed debian lenny on it so:

    sdc - ext3 debian lenny part. , swap part. and fat32 data storage

    during lenny installation installer wrote grub bootloader into sda mbr. everything was just fine, until my third (sdc) hdd stopped working. now I cannot boot windows from sda - grub error 21 (maybe 22, dont remember exactly)


    I tried to restore previous win xp mbr in sda but with no succes.

    I tried:

    windows install cd - fixmbr, fixboot - nothing. repairing my windows installation - nothing.

    from ubuntu live cd -
    Code:
    sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda1
    still nothing - I always get the same error - grub error 21 (22)

    here is my boot_info_script output:

    Code:
    ============================= Boot Info Summary: ==============================
    
     => Grub0.97 is installed in the MBR of /dev/sda and looks on boot drive #3 in 
        partition #1 for /boot/grub/stage2 and /boot/grub/menu.lst.
     => Windows is installed in the MBR of /dev/sdb
    
    sda1: _________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  Windows XP
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  Windows XP
        Boot files/dirs:   /boot.ini /ntldr /NTDETECT.COM
    
    sdb1: _________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  Windows XP
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  
        Boot files/dirs:   
    
    =========================== Drive/Partition Info: =============================
    
    Drive: sda ___________________ _____________________________________________________
    
    Disk /dev/sda: 20.0 GB, 20020396032 bytes
    255 heads, 63 sectors/track, 2434 cylinders, total 39102336 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0xcdbecdbe
    
    Partition  Boot         Start           End          Size  Id System
    
    /dev/sda1    *             63    39,086,144    39,086,082   7 HPFS/NTFS
    
    
    Drive: sdb ___________________ _____________________________________________________
    
    Disk /dev/sdb: 163.9 GB, 163928604672 bytes
    255 heads, 63 sectors/track, 19929 cylinders, total 320173056 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x54428459
    
    Partition  Boot         Start           End          Size  Id System
    
    /dev/sdb1                  63   320,159,384   320,159,322   7 HPFS/NTFS
    
    
    blkid -c /dev/null: ____________________________________________________________
    
    /dev/loop0: TYPE="squashfs" 
    /dev/sda1: UUID="CAD03311D03302ED" TYPE="ntfs" 
    /dev/sdb1: UUID="B420CECF20CE97AE" LABEL="DATA" TYPE="ntfs" 
    
    =============================== "mount" output: ===============================
    
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    tmpfs on /lib/modules/2.6.28-11-generic/volatile type tmpfs (rw,mode=0755)
    tmpfs on /lib/modules/2.6.28-11-generic/volatile type tmpfs (rw,mode=0755)
    tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
    varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
    varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
    udev on /dev type tmpfs (rw,mode=0755)
    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
    devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
    rootfs on / type rootfs (rw)
    /dev/sr0 on /cdrom type iso9660 (ro,noatime)
    /dev/loop0 on /rofs type squashfs (ro,noatime)
    fusectl on /sys/fs/fuse/connections type fusectl (rw)
    tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
    binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
    gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu)
    /dev/sda1 on /mnt/c type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
    
    
    ================================ sda1/boot.ini: ================================
    
    [boot loader]
    
    timeout=1
    
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    
    [operating systems]
    
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect 

    I hope you will help me guys, thank you very much.

    p.s. ssorry for english, I am czech.


  3. #53
    Join Date
    Jan 2009
    Beans
    16
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD

    Hello.

    I'm having quite the problem. I am shipping this computer off to my sister, and she refuses to use Ubuntu, so I'm putting windows back on it.

    It has a 320gb hard drive, split into two partitions. Originally, it was running windows, but some time ago I nyxed windows, installed Ubuntu on the smaller partition using ext3, and kept the larger partition with all the personal data intact as a NTFS partition.

    Now I want to put WinXP back on the smaller partition.

    Booted from CD, deleted the small swap partition Ubuntu uses, formatted that and the Ubuntu install partition into NTFS, which should have left me with two NTFS partitions, the large, backup partition never being touched. Install windows, blah blah.

    Reboot, and nothing happens. After the device listing, there is no GRUB errors, just a blinking cursor (can't type anything, ofc).

    So I boot into this 8.10 LiveCD, and, assuming it's a MBR problem, I type in:

    Code:
    ubuntu@ubuntu:~$ sudo apt-get install mbr
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    mbr is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    ubuntu@ubuntu:~$ sudo install-mbr -i n -p D -t 0 /dev/sda
    ubuntu@ubuntu:~$
    Reset, same problem.

    I try fixmbr from Windows recovery, which, by the way, boots me into D:/Windows... what? It should be C:/Windows, I thought. So I go back into LiveCD, and do:

    Code:
    ubuntu@ubuntu:~$ sudo fdisk -lu
    
    Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1           16065   102398309    51191122+   f  W95 Ext'd (LBA)
    /dev/sda2   *   102398373   625121279   261361453+   7  HPFS/NTFS
    /dev/sda5           16128   102398309    51191091    7  HPFS/NTFS
    This is where I get lost. Are those Start/Ends messed up? Shouldn't the boot be on sda5, which is the smaller partition? I don't even know what sda1 is.

    I also ran the bootinfoscript, in case it helps anyone figure this out. Here is the output:

    Code:
    ============================= Boot Info Summary: ==============================
    
     => Testdisk is installed in the MBR of /dev/sda
    
    sda1: _________________________________________________________________________
    
        File system:       Extended Partition
        Boot sector type:  -
        Boot sector info:  
    
    sda5: _________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  Windows XP
        Boot sector info:  According to the info in the boot sector, sda5 starts 
                           at sector 63.
        Mounting failed:
    $LogFile indicates unclean shutdown (0, 1)
    Failed to mount '/dev/sda5': Operation not supported
    Mount is denied because NTFS is marked to be in use. Choose one action:
    
    Choice 1: If you have Windows then disconnect the external devices by
              clicking on the 'Safely Remove Hardware' icon in the Windows
              taskbar then shutdown Windows cleanly.
    
    Choice 2: If you don't have Windows then you can use the 'force' option for
              your own responsibility. For example type on the command line:
    
                mount -t ntfs-3g /dev/sda5 sda5 -o force
    
        Or add the option to the relevant row in the /etc/fstab file:
    
                /dev/sda5 sda5 ntfs-3g force 0 0
    $LogFile indicates unclean shutdown (0, 1)
    Failed to mount '/dev/sda5': Operation not supported
    Mount is denied because NTFS is marked to be in use. Choose one action:
    
    Choice 1: If you have Windows then disconnect the external devices by
              clicking on the 'Safely Remove Hardware' icon in the Windows
              taskbar then shutdown Windows cleanly.
    
    Choice 2: If you don't have Windows then you can use the 'force' option for
              your own responsibility. For example type on the command line:
    
                mount -t ntfs-3g /dev/sda5 sda5 -o force
    
        Or add the option to the relevant row in the /etc/fstab file:
    
                /dev/sda5 sda5 ntfs-3g force 0 0
    
    sda2: _________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  Windows XP
        Boot sector info:  According to the info in the boot sector, sda2 starts 
                           at sector 63. But according to the info from fdisk, 
                           sda2 starts at sector 102398373.
        Mounting failed:
    $LogFile indicates unclean shutdown (0, 0)
    Failed to mount '/dev/sda2': Operation not supported
    Mount is denied because NTFS is marked to be in use. Choose one action:
    
    Choice 1: If you have Windows then disconnect the external devices by
              clicking on the 'Safely Remove Hardware' icon in the Windows
              taskbar then shutdown Windows cleanly.
    
    Choice 2: If you don't have Windows then you can use the 'force' option for
              your own responsibility. For example type on the command line:
    
                mount -t ntfs-3g /dev/sda2 sda2 -o force
    
        Or add the option to the relevant row in the /etc/fstab file:
    
                /dev/sda2 sda2 ntfs-3g force 0 0
    $LogFile indicates unclean shutdown (0, 0)
    Failed to mount '/dev/sda2': Operation not supported
    Mount is denied because NTFS is marked to be in use. Choose one action:
    
    Choice 1: If you have Windows then disconnect the external devices by
              clicking on the 'Safely Remove Hardware' icon in the Windows
              taskbar then shutdown Windows cleanly.
    
    Choice 2: If you don't have Windows then you can use the 'force' option for
              your own responsibility. For example type on the command line:
    
                mount -t ntfs-3g /dev/sda2 sda2 -o force
    
        Or add the option to the relevant row in the /etc/fstab file:
    
                /dev/sda2 sda2 ntfs-3g force 0 0
    
    =========================== Drive/Partition Info: =============================
    
    Drive: sda ___________________ _____________________________________________________
    
    Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x00000000
    
    Partition  Boot         Start           End          Size  Id System
    
    /dev/sda1              16,065   102,398,309   102,382,245   f W95 Ext d (LBA)
    /dev/sda5              16,128   102,398,309   102,382,182   7 HPFS/NTFS
    /dev/sda2    *    102,398,373   625,121,279   522,722,907   7 HPFS/NTFS
    
    
    blkid -c /dev/null: ____________________________________________________________
    
    /dev/sda2: UUID="9464D33964D31D34" TYPE="ntfs" 
    /dev/sda5: UUID="04A03FF9A03FF032" TYPE="ntfs" 
    /dev/loop0: TYPE="squashfs" 
    
    =============================== "mount" output: ===============================
    
    /proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    tmpfs on /lib/modules/2.6.27-7-generic/volatile type tmpfs (rw,mode=0755)
    tmpfs on /lib/modules/2.6.27-7-generic/volatile type tmpfs (rw,mode=0755)
    tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
    varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
    varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
    udev on /dev type tmpfs (rw,mode=0755)
    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
    devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
    rootfs on / type rootfs (rw)
    fusectl on /sys/fs/fuse/connections type fusectl (rw)
    /dev/scd0 on /cdrom type iso9660 (ro,noatime)
    /dev/loop0 on /rofs type squashfs (ro,noatime)
    tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
    binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
    gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu)
    Those mounting fail messages are what I get when I try to look at the contents of the partitions from the LiveCD GUI, as well.

    Any help would be great, I'm at a total loss for how to fix this.

  4. #54
    Join Date
    Oct 2009
    Location
    Hungary
    Beans
    6
    Distro
    Ubuntu 9.10 Karmic Koala

    Question Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD

    Hello,

    I'm trying to backup data from an old HDD.
    I get the same message all time from Testdisk program:
    "Stucture OK" && "Partition sector doesn't have the endmark 0xAA55" &&
    I had made Analyzing , BackupBS ... etc, but I cannot step forward
    I have googled many pice of advice (and I mixed them), but I still cannot solve the problem.
    So If somebody has any idea pls. tell me! I need data from that HDD.

    supesz

  5. #55
    Join Date
    Feb 2010
    Beans
    27

    Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD

    I tried running the fdisk function in the terminal. Here's what I got:

    Code:
    ubuntu@ubuntu:~$ sudo fdisk -lu
    
    Disk /dev/sda: 80.0 GB, 80000000000 bytes
    255 heads, 63 sectors/track, 9726 cylinders, total 156250000 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0xfd478bc7
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *          63   156232124    78116031    7  HPFS/NTFS
    
    Disk /dev/sdb: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x00055296
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1              63   967723469   483861703+  83  Linux
    /dev/sdb2       967723470   976768064     4522297+   5  Extended
    /dev/sdb5       967723533   976768064     4522266   82  Linux swap / Solaris
    What now?

  6. #56
    Join Date
    May 2010
    Beans
    1

    Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD

    Thanks sooo much for this!

  7. #57
    Join Date
    Oct 2008
    Location
    Bosnia and Herzegovina
    Beans
    118

    Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD

    Thank you.

    Works on Lucid too.

  8. #58
    Join Date
    Jan 2008
    Location
    France
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Question Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD

    Hi,
    does anyone know the difference between ms-sys and the "mbr" package which is still in repositories ?

    (see https://answers.launchpad.net/ubuntu...question/28349)

  9. #59
    Join Date
    Mar 2006
    Beans
    2,410

    Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD

    The ms-sys package from dapper still works flawlessly, even in maverick (I just tested it out).

    I've attached it here for convenience, but you can also easily look it up in packages.ubuntu.com

    To use it under maverick, boot into the live disk, then copy the ms-sys package over using a flash drive or download it from your email (whatever works for you), install it, and then in the terminal use the original instructions provided in the first post of this thread.

    aka...

    sudo ms-sys --mbr /dev/sdX (or whatever your drive is, to find that out type sudo fidsk -l)

    nb: Honestly now that I think about it, I have no use for either my gparted livecd or my super grub disk, i can do everything in an ubuntu live disk so why bother?
    Attached Files Attached Files
    Last edited by user1397; March 17th, 2011 at 02:14 AM. Reason: forgot to add attachment

  10. #60
    Join Date
    Sep 2010
    Beans
    10

    Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD

    Quote Originally Posted by inoxllor View Post
    Tested on Ubuntu 7.04; Ubuntu 7.10 and Linux Mint 4.0 Live CDs

    If want to restore Windows Bootloader and for some reason cannot use the windows installation cd, there is a simple way to do it:

    NOTE: make sure you have internet working.

    1) Boot with Ubuntu Live CD or Linux Mint Live CD


    2) On the terminal:

    sudo apt-get install ms-sys

    then

    ms-sys --mbr /dev/hdX

    NOTE: in my case the main windows xp system is located in hda1 so I used ms-sys --mbr /dev/hda

    3) Reboot.

    This should get your windows back.
    When I attempt to follow your instructions, I get the message below:

    ubuntu@ubuntu:~$ sudo apt-get install ms-sys
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Couldn't find package ms-sys
    ubuntu@ubuntu:~$ sudo fdisk -l

    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x9dc96e9e

    Device Boot Start End Blocks Id System
    /dev/sda1 1 4 32098+ de Dell Utility
    /dev/sda2 * 5 9725 78083932+ 7 HPFS/NTFS

    What am I doing wrong?

Page 6 of 7 FirstFirst ... 4567 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
  •