Ubuntu: Grub not listing windows partition


I have a windows partition on my ubuntu 14.04 but I've not used it in a while and have now noticed I can't see it in the grub boot loader. I've tried sudo fdisk -l and get the output

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes  255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0x4eb6e04c       Device Boot      Start         End      Blocks   Id  System  /dev/sda1   *          63   212700599   106350268+   b  W95 FAT32  /dev/sda2       212701184   391024639    89161728   82  Linux swap / Solaris  /dev/sda3       391026686  1953523711   781248513    5  Extended  /dev/sda5      1919977472  1953523711    16773120   82  Linux swap / Solaris  /dev/sda6       391026688  1919977471   764475392   83  Linux  Partition table entries are not in disk order  

I tried upgrading grub but it made no difference.

I've also tried boot repair with the output file


It also returns:

The boot files of [The OS now in use - Ubuntu 14.04.3 LTS] are far from the start of the disk. Your BIOS may not detect them. You may want to retry after creating a /boot partition (EXT4, >200MB, start of the disk). This can be performed via tools such as gParted. Then select this partition via the [Separate /boot partition:] option of [Boot Repair]. (https://help.ubuntu.com/community/BootPartition)

It's been a while since I last accessed the windows partition, and since I last remember seeing an option for it. I think since before I upgraded to 14.04. I need to access it no so if you can advise how I can get it back on grub boot options that'd be excellent.



What version of Windows do you believe is installed on the disk? The only place that Windows could be installed is in /dev/sda1, which is FAT; but IIRC, the last version of Windows that supported FAT installation was XP, and I seem to recall that installing XP on FAT required some extra hoop-jumping. Furthermore, the Boot Info Script output you've provided shows no evidence of Windows on that FAT partition -- but that could be a Boot Info Script limitation. Modern versions of Windows all install to NTFS, not to FAT.

I also note that your /dev/sda2 is marked as being swap, but Boot Info Script couldn't identify its filesystem type. You also have another swap partition (/dev/sda5), so /dev/sda2 is a bit of a mystery. It's possible that Windows was on /dev/sda2, but somewhere along the line you accidentally changed its type code and overwrite at least part of it with 0s or random data, which would explain its current state. If so, it may be difficult or impossible to recover it. If you were to attempt it, though, I recommend:

  1. Do a low-level backup of /dev/sda2, as in sudo dd if=/dev/sda2 of=/path/to/lots/of/free/space/sda2-backup.img bs=4096. (The partition is 42.5GiB in size, so you'll need at least that much free space somewhere.)
  2. Use fdisk to change the type code of /dev/sda2 from 0x83 to 0x07. You use the t option in fdisk to change the type code, then save your changes with w.
  3. Use CHKDSK in a Windows emergency disk on /dev/sda2 (which will of course be called something else -- perhaps C: -- in Windows).

If that doesn't help, it's conceivable that a third-party tool will be able to recover data. There's also a slim chance that TestDisk will be able to recover a Windows partition. As there's no unused space on your disk, that partition might be covered by /dev/sda2, so you might have to delete it for TestDisk to do its thing (or maybe TestDisk can delete /dev/sda2 for you if it finds something else there).

If you mainly just want to recover personal files, you may have better luck with PhotoRec, which can recover files from badly damaged filesystems. The last time I checked, PhotoRec did a poor job of recovering filenames. I've heard there are some Windows tools that can do a better job with preserving filenames, but I don't have names or URLs. You might want to ask about this on a Windows forum.

If you simply want to get Windows booting again but have no personal data to recover, re-installing it to /dev/sda2 may be the best option. To do this, you should change its type code to 0x07 (as described earlier). I'd also use mkfs.ntfs or GParted to create a fresh filesystem (NTFS) on that partition. After you re-install Windows, you'll need to restore GRUB in any of many ways that are well-documented (but I don't happen to have a URL handy).

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »