1

I have a dual boot Windows 7/Linux Mint 14 system (installed Windows first) with a single hard disk and four partitions (in order: System Reserved, Windows 7, Linux, swap). I wanted to reinstall Windows 7 and shrink its partition (to extend the Linux partition), so here was what I did:

  1. Ran through Windows 7 installation (custom) until the hard disk part
  2. Chose the second partition (Windows 7) and clicked Format
  3. Still selecting the Windows 7 partition, clicked Delete (now unallocated with no type)
  4. Realized that the third partition (Linux) was affected by the delete (it became unallocated with 100% free space with type "Extended"; other two partitions are fine)
  5. Stopped the installation and restarted (it showed "No such partition" and grub rescue's prompt)
  6. Booted up an Ubuntu LiveCD through a flash drive and ran boot-repair's info function for details (didn't modify anything)

If it'll help, this is the information boot-repair gave me. The Windows partition isn't listed in fdisk -l (it jumps from System Reserved to the Linux partition).

Note that doing

mount /dev/sda2 /mnt/

gives me

mount: you must specify the filesystem type

and ext2, ext3, and ext4 as parameters to -t gives

mount: wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error

Mounting sda1 (System Reserved) works, but I don't see how that would help.

I want to restore my Linux partition cause I suspect that since I formatted the Windows partition, it won't have anything inside it anyway (both partitions have roughly the same personal files).

Thanks in advance and please redirect me if this isn't the right place to ask.

2 Answers 2

2

Follow the following steps and you should be able to fix your issue. You can also use bootable usb to replace the CD. In order to do that download Gparted & unetbootin and use unetbootin to create a bootable usb.

   Download the Gparted disk image.

6) Burn the image to CD using a disc burning application. Once the disc burning is complete, leave 
   the CD in the drive.

7)  Restart your computer.

8) Access the system BIOS by immediately pressing "F10" or "Delete" when the computers boots. You may
   need to press a different button on some systems as specified at the bottom of your screen.

9) Set the CD-ROM as the primary boot device.

10) Exit the system BIOS, making certain to save the changes to boot order you have made.

11) Select Gparted Live from the boot menu.

12) Select the hard drive on which you wish to restore the partition table.

13) Select "Partition," and "check" to scan the hard drive for existing partitions.

14) Select "Write Partition Table" to restore the partition table. You can now restart the computer, 
    and set the boot order back to the default settings.
1
  • Tried it, but got "Assertion (head_size <= 63) at ../../../libparted/labels/dos.c:662 in function probe_partition_for_geom() failed".
    – redherring
    Jan 4, 2013 at 10:42
0

Boot from a LiveCD, set the filesystem of /dev/sda2 to what it was before the format, then do a grub repair.

I don't know the exact commands to do this, but it's a place to start. As long as you don't format the partition, you should be fine.

1
  • Can anyone tell me how to set the filesystem? I've tried searching, but to no avail.
    – redherring
    Jan 4, 2013 at 10:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .