Sometime back I bought a second PC to serve as my backup machine, but I've never managed to have it as I would like. Now I want to start over, but I've messed so much with it's disks that I'm kinda afraid to lose something on the way, thus this question.
Right now, I have a 1TB disk partitioned like this (as per GParted):
/dev/sda1 (ext4) 346.12Gb-> Is almost full, has an old install of Ubuntu 11.10. It no longer boots, ever since i installed Windows7 on
/sda3. Everything that matters to me is tucked into
/var/www/all the rest can just go.
/dev/sda2 (ext4) 196.45Gb-> has an old install of 12.04 and nothing important, it's pretty much empty and also doesn't boot.
/dev/sda3 (ntfs) 377.97Gb-> is my boot partition with Windows 7, some important files and I'd like to keep it untouched.
/dev/sda4 (extended) 10.97Gb-> was created when i first installed Ubuntu, i think.
In my ideal world, I'd like to safely reinstall Ubuntu from the 12.04 liveUSB and merge
sda2 without losing any files. Is that possible? How?
Things got really ugly right now. I tried for a few days to follow Marty's advice, but something is up. I did the first part, of wiping the second partition and enlarging the first. Then I couldn't get Super Grub Disk to work. Tried from the live USB, then tried to make a USB disk for it, and it wouldn't boot. So i let it cool and returned today to the system.
To my surprise, when i booted from the Live USB and ran Install Ubuntu 12.04 LTS the program recognized thw instalation of 11.10 and offered me an option to just update it without loosing any files. I went joyfully to it.
After the update finished, booting didn't work, i got "input not supported" and booted back from the USB. Then i went to see if everything was OK, and for my desperation, i just can't find the
/var/www folder where i had everything. Gparted also tells me the partition is now almost empty.
I didn't do any sav operation on the HD after this and shut it down immediately to avoid any more damage. Now i really need those files back. How can get them in the safest way possible?