I deleted (rm -r) boot partitions for windows on sda2. How to recover?

I’m using opensuse 12.1. By my mistake I deleted *rm -r /media/BDEDrive/ ** on sda2 what was loader for windows.
Now by chosing windows on startup i get no mbr press ctrl+alt+del.
Exist a way how to create contens of BDEDrive back to use again windows?
my fdisk -p
Device Boot Start End Blocks Id System
/dev/sda1 2048 851695615 425846784 7 HPFS/NTFS/exFAT
/dev/sda2 974575616 976771119 1097752 7 HPFS/NTFS/exFAT
/dev/sda3 * 851695616 974575615 61440000 f W95 Ext’d (LBA)
/dev/sda5 851697664 855910399 2106368 82 Linux swap / Solaris
/dev/sda6 855912448 974575615 59331584 83 Linux

thank you for help

On 2013-04-11, slymak <slymak@no-mx.forums.opensuse.org> wrote:
>
> I’m using opensuse 12.1. By my mistake I deleted rm -r
> /media/BDEDrive/
* on sda2 what was loader for windows.
> Now by chosing windows on startup i get no mbr press ctrl+alt+del.
> Exist a way how to create contens of BDEDrive back to use again
> windows?
<SNIP>

To my knowledge (and unfortunately experience!), `rm -r’ is about as irreversible as it gets short of zero-formatting. I
used it yesterday inadvertantly but fortunately I had a backup in /tmp/ !

There are tools around to retrieve `permanently deleted’ files but I’m not going to recommend that especially since 12.1
is nearly EOL. I’d suggest:

  1. Repair Windows MBR (e.g. http://www.tomshardware.co.uk/win7-windows-7-mbr,news-33163.html ).
  2. Upgrade to openSUSE 12.3.

I’m also slightly confused why your bootloader appears to be in /media/, but guess you have your reasons or I’m
misunderstanding…

ad 1) Repair MBR by Windows. I’m don’t think they let me choose repair mbr on sda2. I think Windows simply remove GRUP boot loader from sda3 and set bootloader into sda what doesn’t allow me run Suse. Now I have oposite scenario but I need both. I didn’t find solution for my case on Tomhardsware tutorial.

ad 2) point I don’t need upgrade SUSE my 12.1 works still well

to your question why win bootloader appear in /media . Yes it was my mistake I formated SD card containg two partitions and during that operation I mount also sda2 as /media/DBEDRIVE what I thought it belong to the SD card…

On 2013-04-11, slymak <slymak@no-mx.forums.opensuse.org> wrote:
>
> ad 1) Repair MBR by Windows. I’m don’t think they let me choose repair
> mbr on sda2.

I think I’m misunderstanding you. Partition’s don’t have their own MBR, only a fixed storage device has an MBR and only
one. And yes, within Window’s repair system, you can flag sda2 as the active partition (using DISKPART).

> I think Windows simply remove GRUP boot loader from sda3
> and set bootloader into sda what doesn’t allow me run Suse.

Windows repair does not remove GRUB but bypasses it. Once you have a bootable Windows, then it is trivial to find GRUB
(and recover it even if it was deleted) to allow you to boot into Windows and Linux (e.g. using a Live version).

> Now I have
> oposite scenario but I need both. I didn’t find solution for my case on
> Tomhardsware tutorial.

That tutorial only makes Windows bootable. In an unbootable `dual-boot’ system, I find it easier to make Windows
bootable THEN openSUSE since Linux is Windows-aware (and not vice versa). But if you think it’s easier the other way
round, then that’s up to you.

> ad 2) point I don’t need upgrade SUSE my 12.1 works still well

Well, you can proceed along those lines as long as you don’t expect community support after EOL.

> to your question why win bootloader appear in /media . Yes it was my
> mistake I formated SD card containg two partitions and during that
> operation I mount also sda2 as /media/DBEDRIVE what I thought it belong
> to the SD card…

… use that a learning experience while upgrading to openSUSE 12.3… ?

On 2013-04-11 12:36, slymak wrote:
> I’m using opensuse 12.1. By my mistake I deleted rm -r
> /media/BDEDrive/
* on sda2 what was loader for windows.
> Now by chosing windows on startup i get no mbr press ctrl+alt+del.
> Exist a way how to create contens of BDEDrive back to use again
> windows?

Delete a file in Linux is permanent. You might, however, try tools like
“photorec” or “testdisk” might recover them. There are also third party
tools (shareware).

The mbr itself of that disk was not affected by a command to remove files.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On Thu, 11 Apr 2013 10:36:03 +0000, slymak wrote:

> Exist a way how to create contens of BDEDrive back to use again windows?

Restore from backup or reinstall Windows. That’s the only solution.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Thu, 11 Apr 2013 13:41:46 +0000, flymail wrote:

>> ad 2) point I don’t need upgrade SUSE my 12.1 works still well
>
> Well, you can proceed along those lines as long as you don’t expect
> community support after EOL.

Or, more importantly, critical updates. There usually will be someone
who can help with problems in older versions, but if an update is needed
to fix an issue, one is “out of luck” unless they build the patch
themselves. And of course no security patches are backported to EOL
releases, either.

Or switch to Tumbleweed. :slight_smile:

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C