3

I wanted to format my USB stick in GParted and didn't see that my Computer drive was selected, so I ended up with this:

Screenshot of disk

I'm still logged in and everything is working right now.

So... Is this my last log in (& I can say farewell to the system) or is there a way to get things back?

(P.S.: I have a backup of important stuff.)

terdon
  • 100,812
  • Is this your system disk or some other? I've never tried, but I suppose Ubuntu wouldn't let you to such a thing to system disk while it's working. – Jacajack Jan 11 '17 at 14:58
  • 5
    Have you actually done anything? You need to apply for the changes to take effect and you shouldn't even be able to modify mounted partitions. – terdon Jan 11 '17 at 15:00
  • Please post a screenshot of the entire GParted window. That will clarify the situation. – wjandrea Jan 11 '17 at 17:27
  • Yes, this was a system disk. I unmounted and deleted (and applied) everything i could, only sda2 couldn't be deleted (that's actually the reason i realized that this isn't a usb drive :) Anyway, after an hour or so the system froze and after i restarted the system didn't load. Well i guess i tasted the linux medicine :D – user640219 Jan 11 '17 at 23:20

1 Answers1

3

You can try to recover lost partitions if no more actions have been done to the disk (format, write...).

Boot from a Ubuntu LiveCD/USB on that machine, open a terminal and install testdisk with sudo apt install testdisk.

Then run sudo testdisk and follow the on screen menu-like instructions to try to recover with this tool.

If you still can't recover or want more options, check this link about data recovery from Ubuntu wiki.

Hope it helps.

dgonzalez
  • 7,010
  • 6
  • 19
  • 28
  • Thank you for your help! In my particular case i figured it would probably be quicker to just do a new install and configure it back the way it was (because the system was quite new). But these are some valuable information, clearly written and i think this might come in handy in the future! :) – user640219 Jan 11 '17 at 23:40
  • Glad to help. I also prefer starting from scratch and reinstalling (in most cases), but like you said one never knows when recovering is the only way... – dgonzalez Jan 12 '17 at 01:36