0

I had an old windows 7 installation, which I used occasionally when wine didn't work, which I used alongside my Ubuntu 20.04. I had 5 partitions including an extended Unix with data and swap on 1 1TB disk.

I booted into Windows 7 and started the upgrade to windows 10. All went ok, apart from a few interventions when the unattended reboots used the default and booted Ubuntu. Eventually had a nice new Windows 10. Rebooted and expected to see my normal grub menu but this had been wiped. Luckily I had my partition map from problems I had a few weeks ago so I knew where the partitions should be. I turned out that windows had modified them to change its existing 50GB partition into 2 (the additional partition is 505M Hidden NTFS WinRE). It also managed to change the ext4 portion of my extended Unix partition into unallocated (swap was still as expected)

Steps to recover so far.

  1. Boot into boot-repair and do Recommended repair. No change since unallocated partition which contained Ubuntu was ignored.

  2. Boot from installation disk into Ubuntu. Execute disks GUI utility and change unallocated partition into ext4. (This did look a bit strange in GUI since it didn't show ext4 and swap in extended partition). Opened Terminal and checked using fdisk. All start, size and end partition data seemed to match my previous saved data. Mounted new partition but it didn't show any data (only an empty lost+found).

  3. Unmounted new partition and run fsck (e2fsck 1.43.4) which returned

    /dev/sda6: clean, 11/45137920 files, 2883364/180529408 blocks

So looks like my data is still there but how do I recover ?

  • You should be able to use testdisk or parted rescue. If you know start & end of partition, its easier. Parted rescue seems easier than testdisk https://askubuntu.com/questions/665445/upgraded-to-windows-10-on-dual-boot-and-cant-boot-to-ubuntu-partition & https://www.gnu.org/software/parted/manual/parted.html#rescue This is a very old bug (feature?) of BIOS/MBR Windows. If newer UEFI hardware, better to totally reinstall in UEFI/gpt, but that will totally erase drive, so good backups required. With gpt, you have backup gpt partition table & Windows normally does not erase Linux. – oldfred Feb 03 '21 at 17:56
  • Oh dear. To be clear, when you say "Execute disks GUI utility and change unallocated partition into ext4.", you reformatted it as well! That e2fsck was bad news. 11/... files is correct for an empty filesystem. – Martin Thornton Feb 03 '21 at 19:02
  • Martin, When I executed Disks GUI I did NOT format and did quick create. What I am puzzled with is that fsck reports (see end of main post) files and blocks used but they do not show up (other than empty lost+found folder) – Brian Duffy Feb 04 '21 at 14:07
  • Martin, also just noticed your comment regarding "11/... files is correct for an empty filesystem" - can you explain the numbers after that ? – Brian Duffy Feb 04 '21 at 14:11

0 Answers0