1

I have two micro SD cards, one with Raspbian, one with Ubuntu MATE. After using a different monitor for a while, I went back to my flat screen, and it said "Not Supported". So I changed the HDMI output settings on config.txt on both SD's. They worked, but I forgot to fix the overscan. When I plugged them in to my PC to fix it, both config.txt's were 0 bytes for some odd reason.

So I took my card with RetroPie and copied config.txt from there and pasted it on both cards. I changed settings on the new config.txt files, and tried them. Raspbian works perfectly. But Ubuntu MATE, which I have all of my Python projects and information on, boots like Raspbian and loads the Raspbian login screen. For some reason, my username and password are that of my other card. Then, when logging into the login screen which shouldn't be there in the first place, it loads to a blank MATE gray background with a mouse.

Can someone please tell me why this is occurring? It's like Ubuntu mutated with Raspbian. I absolutely cannot lose all of my Python scripts. Did the config file for some reason change something else? Thank you.

As a side note, RetroPie is based on Raspbian.

  • Have you tried paragraphs? Stream of consciousness writing may work for James Joyce, but it is not going to encourage anyone to understand your post. – Milliways Jun 16 '16 at 1:58
1

Can someone please tell me why this is occurring?

Probably not beyond observing that most likely you accidentally did a lot more than you think you did.

It's like Ubuntu mutated with Raspbian.

Yeah, that's...well it did not happen through airborne infection if you get my drift. And the pi itself doesn't have the potential to do this by using first one card then the other.

So again, something most likely went wrong when you were doing this stuff with swapping the config.txts around. You didn't go into detail about how you did that but I assume it was on some other computer.

I absolutely cannot lose all of my Python scripts.

Okay, so if there is one lesson you learn from all of this, please let it be that if you have things you absolutely cannot lose, you absolutely need to keep them backed up properly. I know that programming is much more fun and interesting than learning to use tools like git and rsync but once you sort this mess out, before you go back to programming anything, you MUST sit down, look at options of that sort, and start learning how to use them. No system is bullet proof. If you dump a coffee on a pi and SD card you just lost $40-50 bucks, that's irritating. If that pi had two hundred or a thousand hours worth of work on it and that's now gone it is going to be way beyond "irritating". That's why things like git and rsync exist.

Anyway, what you need to do is focus on the priority of retrieving your irreplaceable data. To do that, you have to have a look at the root partition on the SD card. To do that properly you need one of three things that are within reach but, again, may require some doing some not-as-fun-as-coding stuff:

  • A computer with an SD card slot (or USB + SD Card adapter) running some form of linux.

  • Same computer running any OS that can run virtual machine software (the two most popular are probably VirtualBox and VMware) with some form of linux inside. This is probably the most complicated option, but it does save you the need to, e.g, set up a dual boot system with whatever OS you usually use.

  • A linux "live CD", presuming your computer has a DVD drive it can boot from (and really these are "live DVDs" now, the images don't fit on CDs). These are slow and there are a limited number of them, beware that some distros have gotten into the strange habit of calling their installer images "live CDs" when all they are really capable of is installing a system onto a hard drive. However, this Debian page strongly implies it can be used as a complete system run from the DVD (be warned this is very slow, but you don't have to use it for much). Since Raspbian is based on Debian, it should also be very familiar.

There are some other options here, e.g., I believe it is not so hard to access an ext4 partition from OSX and not impossible from MS Windows, but one way or another you need access, on something other than the pi, to the root filesystem on the SD card. Doing this means you don't have to login, etc., etc., you can just access everything the way you would stuff that's on an SD card or thumb drive.

That's the first step in attending to your first priority, doing your best to rescue your python work. Do not try to do it by screwing around with the card more so you can put it back in the pi again and get it that way -- doing anything to the card at this point is just going to increase the chances that you lose everything.

  • Sorry. I got everything completely mixed up. Apparently I had overwritten Ubuntu MATE with Raspbian before without notice, then after editing stuff, I plugged it in. Then panicked. I knew that that couldn't have been a possible result. And, thinking about it, Sorry. But, is there anyway to retrieve any of my files, even after a wipe and write? Thank you. – Random Stalker 135 Jun 17 '16 at 1:59
  • Not that I'm privy to. You probably have to ask someone knowledgable in digital forensics. If the card is only say 25% full (in terms of actual data, not partition size), because of how SD cards work (they use virtual addressing, and actually scatter data around), some of what was there may still be there. The problem is if so, it is scattered around in pieces, and finding and assembling the pieces of a python script is going to take some special software and skills. At least. – goldilocks Jun 17 '16 at 13:39
  • You could look around online to see if an automated thing of such type is available (or ask on Super User, since you certainly aren't going to be doing it in the pi). I think the issue with that is the card actually has a microcontroller chip in it, and getting it to give you the all the real physical blocks that are now considered "empty" may or may not be possible -- meaning digital forensics people would have to use special equipment too and take the card apart to get at it. But I don't know. – goldilocks Jun 17 '16 at 13:39
  • BTW, if you are satisfied with this answer (I did guess the real problem!), please tick the big checkmark top left under the score. In part, this makes it easier for other people with similar problems (or have made similar mistakes) to find the information, and I think I am giving you some good honest advice about a few things too ;) – goldilocks Jun 17 '16 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.