0

Sorry if any of this comes across as uninformed etc, I'm normally on stack for code at work but I have a pi at home which I've only used for media up till now.

I'm trying to put RetroPie on it as I've bought some USB controllers. I have tried to copy the image file over but I apparently don't have enough space.

I've removed Wolfram & LibreOffice as I wasn't using these and I've seen from my searching these are 2 common things you can do to save space.

I've noticed that on the terminal if I do df -h I get quite a few entries starting with /dev/mmcblk0p with numbers on the end (5, then 8 through to 14). What are these and do I need them all? A lot of them are pretty large and it seems like a big win if I don't... However if I do, then what sort of things can I do to save some more space?

*furthermore: I seem to have Raspbian, OpenELEC_RP2, LibreELEC_RP2 & OSMC_PI2 at boot. I only seem to use Raspbian & OpenELEC so am I good to ditch the other 2 (guide on how would be useful too)?

I've read my initial question might be something to do with NOOBS but that makes no sense to me apart from me feeling like a complete and utter noob...

Thanks

Tim Edwards
  • 101
  • 3
  • Please have a look at ["What types of questions should I avoid asking?"](http://raspberrypi.stackexchange.com/help/dont-ask) and note *"Your questions should be reasonably scoped. If you can imagine an entire book that answers your question, you’re asking too much."* It might not be a long book, but it certainly would be a very long answer, including back and forth chatting to get you to clarify some points. – goldilocks Nov 05 '17 at 17:32
  • OK apologies, I know how Stack works generally, my problem is I'm not a linux native and to be perfectly honest I don't quite know what I'm doing. I've since deduced that my overall size isn't an issue. Am I right in saying that if I want RetroPie putting on then I don't need an img as otherwise I'm effectively overwriting everything else? So probably need another way of installing just that? – Tim Edwards Nov 05 '17 at 19:21
  • 2
    I would assume RetroPie is an image unto itself *unless* you are installing it through NOOBS. BTW, NOOBS seems to create confusion with users more than making life easier, so unless you really really want a card with multiple OSs on it, I'd recommend you just use one card per OS. It's probably worth the $5-10 a decent 8-16 GB card costs in saved hassles. – goldilocks Nov 05 '17 at 20:47
  • Thanks, there's a separate link talking about how to install with Raspbian https://retropie.org.uk/docs/Manual-Installation/ so I might give that a go even though it looks slightly more involved. If not I'll get another card. Thanks for persevering with me! – Tim Edwards Nov 06 '17 at 09:44

1 Answers1

2

I get quite a few entries starting with /dev/mmcblk0p with numbers on the end (5, then 8 through to 14). What are these and do I need them all?

They are device nodes; mmcblk0 represents the SD card and p[N] the partitions on the card. It is weird you have 14 of them; this is probably because of NOOBS.

A lot of them are pretty large

No, device nodes have a size of 0. This is because they are not actually stored files, they are interfaces to the kernel. Linux uses this strategy for a lot of things, e.g., what's mounted on /proc and /sys (and /dev) are special in memory filesystems only. However, since they are part of the kernel they do not occupy userspace RAM.

Which brings up an important point: You do not want to copy anything in those directories. If you examine the card when the system is not running, you will notice they are (or should be) empty.

You might have a read through this, which is about creating backups, for more about what should and should not be in a Pi filesystem image.

It also explains how to copy the contents of the filesystem rather than the whole thing as a blob, which may address this problem:

I have tried to copy the image file over but I apparently don't have enough space.

The image will be the size of the filesystem, which if it is 4 GB, will be 4 GB even if the filesystem is 99% empty.

goldilocks
  • 56,430
  • 17
  • 109
  • 217