Recently, I ran the command:


After running that command, Raspbian didn't let me login. So I reset the OS using NOOBS. I remember running startx because I had to to use gparted or something. It was my first time using it and so I'm not sure what I was doing.

However, after booting the RaspberryPi, when checking my storage devices, this happened:

Apparently, I had a 32GB MicroSD plugged into one of the USB ports using a TF Card to USB reader. Now the MicroSD only has 8GB and is inaccessible. It shows only 1 partition in Windows 10 disk partition program and there is no free space. Where did the other 24GB go to? It says that the 8GB of memory is of type RAW.

Does anyone know how I can fix my MicroSD?


  • If you're checking the sd card in windows it will only see the boot partition, not the full sd card as the main system partition is formatted to ext4 which windows doesn't recognise. I think it's easier to avoid noobs and just flash raspian directly to the card. Can you give more details as to what went wrong, when you say you reset using noobs did you fully reformat the card or just install a second instance of raspian? Running startx shouldn't affect your login, if you've been able to run the command you are already logged in and should just see the desktop launch.
    – rohtua
    Mar 15, 2019 at 7:32
  • @rohtua I think it is similar to this case: raspberrypi.stackexchange.com/questions/56432/… It's not the MicroSD with Raspbian in it BTW. It's a MicroSD attached to the USB port. After running startx, I couldn't login to Raspbian anymore. I ran NOOBS and re-installed Raspbian. But when trying to access my MicroSD card that is inserted via USB port, it seemed to have corrupted. I can only access 8GB of storage. Originally, it was 32GB. And I can't reformat it to 32GB as it doesn't detect other free space in the MicroSD. Tried reformat in Rpian and Win. Mar 15, 2019 at 7:45
  • @rohtua I was trying to run gparted or something. And I remember the site I was referring to to run startx. And after running startx, my wallpaper changed and all files in Raspbian disappeared. Mar 15, 2019 at 7:47
  • Were you following a tutorial? What was your goal with gparted? Can you outline exactly what steps you went through when the issue appeared. Gparted is a partition manager and don't think it would have anything to do with startx unless you were trying to launch the Gparted gui from the command line without a valid desktop installed or able to run (if you were trying to run it in an ssh session for example).
    – rohtua
    Mar 15, 2019 at 9:13


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.