Here's what happened -
I am seeing grub> when I boot (NOT grub rescue)
I have a dual boot computer, To summarise, I was running out of space in ubuntu but my windows had abundance of space, I previously went to windows 10 disk management and "shrink partition" from there. I extended my partition twice previously, but last time I shrank partition, I shrank the maximum amount of space I was allowed by windows 10. and added it to Ubuntu. Windows won't let me shrink more, this time i used a bootable drive and ran gparted and sheank windows 10 by 25 gbs and added it right into Ubuntu. and then I thought i was done. And I rebooted and operating system selection did show up AND I SELECTED WINDOWS 10 not Ubuntu, because I had some stuff to do in windows. And when I logged into windows (typed password) a black screen appeared and I forcefully shut down my laptop by holding power key for few seconds. then when I booted again It showed grub> and If i select windows from boot menu (ctrl+f12 something, in my laptop i got a button to open bios etc.) I see the default windows 10 troubleshooting window. (that blue window)
Idk what happened, but when I now check my Ubuntu system from a bootable live Ubuntu, I see nothing at /dev/sda5
and when I type the command -
ls (hd0,gpt5)
it prints - Partition hd0,gpt5: Filesystem type ext* - Last modification time 2022-06-03 14:05:31 Friday, UUID <some_uuid> - Partition start at 120710144KiB - Total size 113189888KiB
(I am sure beyond anything /dev/sda5 is my ubuntu partition)
and when I type
ls (hd0,gpt5)/
It prints nothing
https://sourceforge.net/p/boot-repair/home/Home/ – oldfred Jun 03 '22 at 16:52
ext4magic
to recovery my data, and I recovered almost all my data. and thanks for the advice and help! It really helped! thanks! – Jun 05 '22 at 04:33