Page 2 of 7 FirstFirst 1234 ... LastLast
Results 11 to 20 of 68

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

  1. #11
    Join Date
    Nov 2008
    Beans
    7

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

    Hey guys, how`s going?

    I erased the Ubuntu partition using a Partition program (can't remember what, but it doesn't matter anyway), and got a problem with "stage1" of GRUB on (my 2nd) reboot (1st one was to apply the changes made on partitions).

    Now I need to recover Master Boot to load Windows XP (SDA) instead of GRUB, and was going nuts reading things about the ms-sys package (that I can't install using make/make install).

    So, I tried the first code caljohnsmith wroted:

    Code:
    sudo apt-get install syslinux
    sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
    And did not worked. Now it returns a message "PRESS A KEY TO REBOOT" instead of GRUB message.

    Anyone has a idea?

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

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

    How about first posting:
    Code:
    sudo fdisk -lu
    Also, when you did those commands you mention, did they return any errors?

  3. #13
    Join Date
    Nov 2008
    Beans
    7

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

    fdisk -lu returns this:

    Code:
    Disco /dev/sda: 41.1 GB, 41110142976 bytes
    255 heads, 63 sectors/track, 4998 cylinders, total de 80293248 setores
    Units = setores of 1 * 512 = 512 bytes
    Disk identifier: 0x00000000
    
    Dispositivo Boot Início Fim Blocos Id Sistema
    /dev/sda1   *          63    80292869    40146403+   7  HPFS ou NTFS
    And the commands you wrote about syslinux and other (I tried the second too, it didn't worked also), haven't return any error. It says something about recording a few bytes on mbr, if I remember.

    ps.: I'm typing from Live CD now, indeed.

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

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

    So was Windows working OK on that drive before you got rid of Ubuntu? It looks like you resized the Windows partition to use the full amount of space on that drive after you deleted the Ubuntu partitions, is that true? That might be your problem. But you don't remember which partition program you used? That could be an issue if you resized the Windows partition. And was Windows originally the first partition on that HDD?

    Also, does the following command return "Missing operating system":
    Code:
    sudo dd if=/dev/sda count=1 2>/dev/null | strings | grep -ie grub -ie "missing operating system"

  5. #15
    Join Date
    Nov 2008
    Beans
    7

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

    So was Windows working OK on that drive before you got rid of Ubuntu? It looks like you resized the Windows partition to use the full amount of space on that drive after you deleted the Ubuntu partitions, is that true? That might be your problem. But you don't remember which partition program you used? That could be an issue if you resized the Windows partition. And was Windows originally the first partition on that HDD?
    Yes, Windows was working great. I mean, I did resized the Win partition to 100% of disk, using Partition Table Doctor from EASEUS, and it already applied the changes. I erased the Ubuntu partition (REISERFS) and SWAP too, that's why I suspect am pretty sure GRUB is dead by now.

    Also, Windows wasn't the first partition on HD, but Ubuntu. Once I googled for GRUB conf to change this, but I haven't success.

    Also, does the following command return "Missing operating system":
    No, it doesn't. I'm pretty sure Windows is working fine, but I can't access it...

    One more thing, I found a lot of solutions for this problem, including using Windows XP CD (recover), but the *** here couldn't remember the password (if I ever setted one). I know there is one cd image that erases this pass, but the link was broken, so... I've looke for alternative solutions, and this one seems the better and faster.

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

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

    Quote Originally Posted by Sakae View Post
    Also, Windows wasn't the first partition on HD, but Ubuntu.
    That's unfortunately a big problem if Windows was not physically the first partition on the drive, and now it is. So did you move the Windows partition to use the free space at the beginning of the drive that was freed up when you deleted the Ubuntu partitions, your did you resize the beginning of the Windows partition to extend over that freed space at the beginning of the drive?

    How about posting the full output of the following commands, including the commands themselves (copy/paste the terminal session):
    Code:
    sudo apt-get install syslinux
    sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
    sudo dd if=/dev/sda count=1 2>/dev/null | strings | grep -ie grub -ie "missing operating system"

  7. #17
    Join Date
    Nov 2008
    Beans
    7

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

    That's unfortunately a big problem if Windows was not physically the first partition on the drive, and now it is. So did you move the Windows partition to use the free space at the beginning of the drive that was freed up when you deleted the Ubuntu partitions, your did you resize the beginning of the Windows partition to extend over that freed space at the beginning of the drive?
    No, Windows is physically the first partition on the drive; I resized the end of the Win partition to the end of the drive.

    It was: Win (30gb) / Ubuntu (9gb) / Swap (few mb), in that order. Now it's Windows all over the disk (that sucks huh? lol).

    How about posting the full output of the following commands, including the commands themselves (copy/paste the terminal session):
    Remember I'm in a Live CD now:

    Code:
    ubuntu@ubuntu:~$ sudo apt-get install syslinux
    Lendo lista de pacotes... Pronto
    Construindo árvore de dependências       
    Lendo estado da informação... Pronto
    Os pacotes extra a seguir serão instalados:
      mtools
    Pacotes sugeridos:
      floppyd
    Os NOVOS pacotes a seguir serão instalados:
      mtools syslinux
    0 pacotes atualizados, 2 pacotes novos instalados, 0 a serem removidos e 1 não atualizados.
    É preciso fazer o download de 557kB de arquivos.
    Após esta operação, 1253kB adicionais de espaço em disco serão utilizados.
    Quer continuar [S/n]? S
    Obtendo:1 http://archive.ubuntu.com hardy/main mtools 3.9.11-0ubuntu1 [204kB]
    Obtendo:2 http://archive.ubuntu.com hardy/main syslinux 2:3.53-1ubuntu2 [353kB]
    Baixados 557kB em 21s (25,9kB/s)                                               
    Selecionando pacote previamente não selecionado mtools.
    (Lendo banco de dados ... 98423 arquivos e diretórios atualmente instalados.)
    Descompactando mtools (de .../mtools_3.9.11-0ubuntu1_i386.deb) ...
    Selecionando pacote previamente não selecionado syslinux.
    Descompactando syslinux (de .../syslinux_2%3a3.53-1ubuntu2_i386.deb) ...
    Instalando mtools (3.9.11-0ubuntu1) ...
    
    Instalando syslinux (2:3.53-1ubuntu2) ...
    Code:
    ubuntu@ubuntu:~$ sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
    0+1 registros entrando
    0+1 registros saindo
    410 byte (410 B) copiados, 0,0256682 s, 16,0 kB/s
    Code:
    ubuntu@ubuntu:~$ sudo dd if=/dev/sda count=1 2>/dev/null | strings | grep -ie grub -ie "missing operating system"
    Missing operating system.
    On this third command, now it returns the error message. Praying to have a solution besides format my PC...

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

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

    OK, that's great it returned "Missing operating system", because that means you have the Windows MBR properly installed (quite ironic, isn't it?). How about rebooting and let me know how far you get booting Windows.

  9. #19
    Join Date
    Nov 2008
    Beans
    7

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

    Cal, it shows a black page with this message: PRESS A KEY TO REBOOT

    It's all.

    Funny history, I was putting my snickers to go to a lan house write you back. Got error on 1st boot of Live CD, and I was all worried about (because of my deadlines); turn off the computer and start heating water to make chimarrão (don't know the translation to english). So I come back and the Live CD works.

    Still stuck on Master Boot Record problem.

    ps.: Do you have Messenger? I really need to get this working today, all my files are on that partition.
    Last edited by Sakae; November 13th, 2008 at 05:19 PM.

  10. #20
    Join Date
    Aug 2005
    Beans
    795

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

    You should be able to use the live cd to at least access the files on the partition.

    If you have a win xp cd i think that is the easiest method. boot from the cd press R to get into recovery mode and type fixmbr when you get to a command prompt. beyond that Im no help.

Page 2 of 7 FirstFirst 1234 ... 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
  •