Windows 7 partition problems

06
2014-04
  • taigi tanaka

    Some time ago I had installed on my PC Windows 7 and Ubuntu 13.04 and used to dual-boot them. After a while tho I had to reinstall Windows 7 ( after that the boot only showed the windows options, so I kinda forgot about the Ubuntu install ).

    A few days ago, I decided that I want Ubuntu back. I downloaded Ubuntu 13.10 and tried to install it, but I couldn't get my way around on getting it on the boot menu ( still the windows boot manager was showing ).

    After many tries and fails nothing really changed.

    A few hours ago I added EasyBCD to my Windows 7 and deleted one of the entries ( had Windows 7 and Windows 7 loader ), I deleted the Windows 7 Entry.

    After that, when booting into windows it gives me a BSOD at the logo part ( the 4 lights ). So I decided to boot Ubuntu 13.10 from the USB to see what can be done.

    Also when trying to reinstall Windows 7 it finds no drives ( like disk partitions where to install it ). Trying to do a sistem restore also doesn't work since it sees no Windows installations.

    I tried using the cmd prompt from the installation disk and when I wrote : list volumes it only showed me the USB flash drives.

    When trying to install Ubuntu, I can't make new partitions and I'm not sure how to go around changing the old ones ( the only old partition I can edit is the one that has the files I need the most )

    Problem is, now i have ablsolutly no clue how to install Ubuntu or fix my Windows.I would like to know the answers to both of this questions if possible.

    P.S. I realise this question is not full-on topic but, I have no clue where else to ask.

    Edit due to comment

    ubuntu@ubuntu:~$ sudo fdisk -lu 
    
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x6d4b81ae
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1              63        2047         992+  42  SFS
    /dev/sda2   *        2048      206847      102400   42  SFS
    /dev/sda3          206848   256206847   128000000   42  SFS
    /dev/sda4       256206848   842144347   292968750   83  Linux
    
    Disk /dev/sdc: 3995 MB, 3995074560 bytes
    255 heads, 63 sectors/track, 485 cylinders, total 7802880 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1   *         128     7802879     3901376    c  W95 FAT32 (LBA)
    ubuntu@ubuntu:~$ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /cow            3.9G   56M  3.8G   2% /
    udev            3.9G  4.0K  3.9G   1% /dev
    tmpfs           789M  1.2M  787M   1% /run
    /dev/sdc1       3.8G  883M  2.9G  24% /cdrom
    /dev/loop0      843M  843M     0 100% /rofs
    none            4.0K     0  4.0K   0% /sys/fs/cgroup
    tmpfs           3.9G  984K  3.9G   1% /tmp
    none            5.0M     0  5.0M   0% /run/lock
    none            3.9G   76K  3.9G   1% /run/shm
    none            100M   48K  100M   1% /run/user
    

    Also, the windows 7 BSOD error is : 0x0000007B ( also known as 0x7b )

    As far as I remember my partitions look like :

    sda1 - 1MB I have no clue what this is but I guess it is due to EasyBCD or something 
    sda2 - 104 MB - the one Windows always makes
    sda3 - 131072MB - Classic C drive ( the place where Windows is installed ) 
    sda4 - D: drive, where I keep my files.
    

    Also on Windows I recall making 2 more partitions, one 30GB and one 8GB partition in order to install ubuntu on one of them and use the other as a swap point.

    Some more information on this picture, as you can see the partitions don't look like they really are in GParted.

    Since I don't have 10 rep yet, I have to post an extrenal link to the picture : click here

  • Answers
  • Rod Smith

    I don't have a complete solution, but part of your problem is that when you added your two new partitions, Windows converted your disk from using standard partitions to using a Windows-specific Logical Disk Manager (LDM, aka "dynamic disks") configuration. That's what the "SFS" partitions are in your fdisk output. Basically, Linux can't install to a disk that uses LDM, so you can rule out installing Linux to this disk unless and until you convert back from LDM to a standard partitioning scheme. There are proprietary Windows tools that can do this, such as EaseUS Partition Master and one or two others. (I've never used these tools, though; I'm just reporting what I've heard about them.) Unfortunately, since you say you're having problems in Windows, my suspicion is that your LDM data have become damaged. A third-party tool might therefore become confused and fail to work, or even make matters worse. OTOH, perhaps a third-party tool would be able to fix the damage.

    Overall, I'd say that your first step should be to perform a low-level backup of the disk. In Linux, I'd use dd for this, as in dd if=/dev/sda of=/path/to/big/empty/space/sda.img. This will store an image backup of /dev/sda in /path/to/big/empty/space/sda.img, so that if whatever you do to recover your data makes matters worse, you'll be able to restore it. Obviously, /path/to/big/empty/space/sda.img must be on a disk other than /dev/sda. There are Windows tools that will do the same thing, but I'm not very familiar with them, so I can't make any specific recommendations.

    After that, there are at least two things you might try:

    • Try running any recovery tool you think might help. You say you've tried standard Windows tools, but there may be such a tool that you've overlooked. There are also third-party tools that might do the job.
    • Try deleting all your partitions using Linux fdisk or something similar and then running a filesystem-recovery tool like TestDisk. This operation is risky because LDM can create discontiguous filesystems that won't be handled properly by TestDisk; but if it works, you might get back your filesystems, and in a form that Linux could then handle.

    I make no guarantee that either approach will make your system bootable again. You might need to run Windows recovery tools to make that the case; or you might need to back up your personal data and re-install Windows.

    Good luck!


  • Related Question

    windows - With Ubuntu's fdisk, what does "omitting empty partition" mean?
  • Thierry Lam

    I currently have a 250 GB hard disk dual booting Windows XP and Ubuntu 11.04. The main partitions are as followed:

    • Windows XP main partition: 160 GB
    • An NTFS partition which only contains media files: 40 GB
    • Linux partition: 45 GB

    The rest of the space is probably in the Linux swap.

    By running sudo fdisk -l from the Ubuntu terminal, I get:

    omitting empty partition (5)
    
    Disk /dev/sda: 250.1 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 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: 0xc0cbc0cb
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1       19663   157943016    7  HPFS/NTFS
    /dev/sda2           19664       25252    44893642+  83  Linux
    /dev/sda3           25253       30400    41351310    f  W95 Ext'd (LBA)
    /dev/sda4           25497       30400    39391348+   7  HPFS/NTFS
    /dev/sda5           25253       25496     1959867   82  Linux swap / Solaris
    

    I'm not an expert at partitions and with the above data but is there an issue with /dev/sda3 and /dev/sda4? They seem to be overlapping each other. What is the empty partition in the above? If there's something wrong in the above partions, how can I fix them?


  • Related Answers
  • Doc

    If left to my own devices, I'd start by firing up gparted and resizing something superficially. Since your swap is merely swap, I'd probably just delete that, shift sda4 as far as it'll go to the left and then make a new swap after it. It is nice having swap located physically towards the start of the drive (for speed), but whatever.

    More meat has been tossed around for your enjoyment below.


    According to this, it means your partition table is corrupt:

    Any time fdisk reports "omitting empty partition (X)", unfortunately that is a sure sign that your partition table is corrupt; that would explain why the installer can not recognize your partitions.

    You should probably go read that discussion over there as it seems quite relevant. Seems like the overall verdict is your data is quite recoverable, just with some effort invested.


    I find it interesting that your Linux Swap is given sda5 but is physically located before sda4. Maybe that's causing fdisk to complain?


    Failing that, I suggest you back up the data completely. After doing that, I'd (VERY CAREFULLY) attempt to remake the partition table PRECISELY as it is reported to you by fdisk above. If you get everything aligned perfectly, the data will remain accessible - provided the given map was correct itself.


    This discussion here has a few suggestions in it, one suggestion that the author claims is fairly risky is:

    wipe all the partitions (using fdisk or GParted) and then use TestDisk (http://www.cgsecurity.org/wiki/TestDisk) from an emergency system to locate and recover the partitions. This is easy if it works, but it's possible that TestDisk will fail to identify a partition or misidentify a partition, in which case you'll be in very deep trouble.

  • jack love

    If you can confirm through fdisk that your partitions have no overlap (aside from the extended partition container), you should be ok.

    I have seen the "omitting empty partition" message crop up after running a partition restore with Paragon. And then a partition restore will make the same message go away. Here's why I don't think it's a cause for worry:

    In the extended partition (/dev/sda4, for example), the scheme permits one or more partitions within the sda4 container. Each of these is linked together on a linked list, with the first one pointed to by the extended boot record (EBR). When you hop from /dev/sda5 to ./sda6 and ./sda7, and so on, entries in each partition tell you where the next partition begins.

    If one of these happens to be empty - say from a partition restore utility - you can still jump to the next partition because the EBR is still intact. It just happens to be assigned to an unused partition.

    I don't know why Paragon is careless enough to leave this behind, but so far it has not been an issue with me. YMMV.