Page 1 of 1

NOOBS partitioning with multiple OSes

Posted: Sat Mar 25, 2017 4:37 pm
by HunPi
Hi Forum,

brand-new Pi3 owner here. I'm still reading a lot of information/guides/tutorials for my first steps. My first personal goal set is to get my new 8GB Micro SD card running with the current NOOBS 2.3.0 and three OSes (Raspian, LibreELEC & RetroPie). That's why I'm trying to understand automatic partitioning in NOOBS as it's explained on the RaspberryPi Github.

The thing I don't understand is, how does NOOBS allocate the free space on the SD card when I install more than one OS? When there are multiple root partions all asking for "want_maximised: true", my first thought is, the first OS gets a small boot partition and the rest of the SD card is for the root partition (due to "want_maximised: true). Where does NOOBS take the space for the next OSes then?

Because of all the things I read, I know this is not at all how it works, but the description on GitHub doesn't go into detail (or I simply don't understand it)?
Let's say I want to install two OSes and each of the boot partitions takes up 60MB. How would NOOBS allocate the rest of the SD card? Does it simply deduct 120MB of the remaining space (minus 'recovery' and 'settings' partition of course) and divides the rest by 2? And if yes, where exactly does this happen file-wise? I'm really trying to understand this.

I hope it's okay to ask another question about NOOBS. I've read so much about it but still don't understand what happens when I boot a new OS? Let's say I was running Raspian, then reboot the Pi and choose e.g. LibreELEC. Will NOOBS then wipe the Raspian partitions and install LibreELEC? It's probably a stupid question but I've read NOOBS is an OS-installer and would wipe the card when pressing SHIFT on booting up. I'm guessing I'm confusing something here.

And last but not least a RetroPie question which honestly I'm not expecting an answer but simply trying my luck. Maybe a RetroPie buff comes across this by chance.

The current RetroPie guide for converting an SD image to a NOOBS image asks in Step #4 (.tar file of the retropie partition) for sudo:

Code: Select all

sudo tar -cvpf ~/Desktop/retropie.tar ./*
This understandibly creates the tar with root:root permissions. In step #6 (.xz of the tarball) however it doesn't explicitly ask for sudo:

Code: Select all

xz -9 -e -v retropie.tar
Running this command in my Ubuntu 16.04.2 terminal, issues an error on the commandline, because I'm running with userrights but the .tar belongs to root:root.

Code: Select all

xz: retropie.tar.xz: Cannot set the file group: Operation not permitted
As a result "retropie.tar.xz" is created with user:user permissions. My question is, if that's a problem in the end or is the guide simply missing the "sudo" in step #6?

Cheers
Martin

Re: NOOBS partitioning with multiple OSes

Posted: Sun Mar 26, 2017 12:57 am
by KLL
HunPi wrote:my new 8GB Micro SD card running
three OSes (Raspian, LibreELEC & RetroPie).
lets say the packed OS installation files need > 1GB each
the installed RASPBIAN need > 4GB
so where you want install 2 more OS?

Re: NOOBS partitioning with multiple OSes

Posted: Sun Mar 26, 2017 10:33 am
by procount
Hi & welcome to the forums.
HunPi wrote:My first personal goal set is to get my new 8GB Micro SD card running with the current NOOBS 2.3.0 and three OSes (Raspian, LibreELEC & RetroPie). That's why I'm trying to understand automatic partitioning in NOOBS as it's explained on the RaspberryPi Github.
You don't really need to understand how NOOBS works to use it, but here are some details.....
HunPi wrote:how does NOOBS allocate the free space on the SD card when I install more than one OS?
Each OS requires a minumum amount of space as detailed in its json file. These are all totalled to ensure they all fit on your SD card. If there is any remaining space left after this, it is divided equally between the number of partitions with "want_maximised=true".
HunPi wrote:Let's say I was running Raspian, then reboot the Pi and choose e.g. LibreELEC. Will NOOBS then wipe the Raspian partitions and install LibreELEC?
No. After you copy NOOBS onto the SD card, you use it to install your selected OSes. It wipes the card before installing them, but it installs them all at the same time. If you want to change any one of the OSes, by installing another, for example, NOOBS will wipe the whole card again in order to install your new set of selected OSes all at once.
Pressing SHIFT at boot up does not wipe the OSes (unless you choose to install a new set). Pressing Shift is just the way to enter the NOOBS multi-boot menu instead of it booting into the last OS.
HunPi wrote:The current RetroPie guide for converting an SD image to a NOOBS image asks in Step #4 (.tar file of the retropie partition) for sudo:

Code: Select all

sudo tar -cvpf ~/Desktop/retropie.tar ./*
This understandibly creates the tar with root:root permissions. In step #6 (.xz of the tarball) however it doesn't explicitly ask for sudo:

Code: Select all

xz -9 -e -v retropie.tar
Running this command in my Ubuntu 16.04.2 terminal, issues an error on the commandline, because I'm running with userrights but the .tar belongs to root:root.

Code: Select all

xz: retropie.tar.xz: Cannot set the file group: Operation not permitted
As a result "retropie.tar.xz" is created with user:user permissions. My question is, if that's a problem in the end or is the guide simply missing the "sudo" in step #6?
Use sudo.
As you found, NOOBS does not include retropie. It does now include recalbox, however.
If you want to avoid creating your own retropie NOOBS files, you can replace NOOBS with PINN (a compatible fork of NOOBS). It already includes all three OSes that you want to install, plus some other additional ones.

As stated above, 8GB is not very big for installing multiple OSes. You may need to get a bigger one especially if you have many games to install in Retropie. But why don't you just try it? NOOBS and PINN will tell you if you have enough SD card space to install all 3. And they allow you to easily change your set of installed OSes whenever you want.

Re: NOOBS partitioning with multiple OSes

Posted: Mon Mar 27, 2017 2:36 pm
by HunPi
Thanks guys. I had no idea 8GB won't be enough. I've read on different sites that 4GB would be sufficient and thought 8GB would leave me enough space to install at least two more OSes. Silly me. ;)
KLL wrote:lets say the packed OS installation files need > 1GB each
You're right. Didn't think about the installation files. That's why the next thing I'll try is to install just two OSes (Raspian & LibreELEC) and use NOOBS lite. Let's see what happens. :)
Since my network comes with static IP addresses and the DHCP server is disabled in my router, I'm currently trying to find out how to provide a static IP address in NOOBS so that I can access the OS list via ethernet cable.
procount wrote:You don't really need to understand how NOOBS works to use it, but here are some details...
I know but I'm curious and want to understand what NOOBS is doing on the SD card and how it's working in general. So thanks for the details you provided. :)

Cheers
Martin

Re: NOOBS partitioning with multiple OSes

Posted: Mon Mar 27, 2017 3:28 pm
by procount
This is the minimum amount of space required to install each OS:
Raspbian: 4GB
LibreELEC: 1GB
Retropie: 2GB
So you'll get an extra ~300MB of free space in each OS for your data files. So they will probably fit, but you might be limited on the amount of videos/games you can fit on the same card. You can always use external USB memory sticks or Hard Disk.

NOOBS does not support static IPs by default.
If you have a keyboard attached, press ctrl-alt-f2 to get a console window. Enter root/raspberry to login.
Set your static IP address manually with

Code: Select all

ifconfig eth0 <your.ip.add.ress>
e.g. ifconfig eth0 192.168.1.99
You may need to set your gateway too:

Code: Select all

route add default gw <your.router.add.ress>
e.g. route add default gw 192.168.1.1

Re: NOOBS partitioning with multiple OSes

Posted: Mon Mar 27, 2017 4:02 pm
by DougieLawson
procount wrote:This is the minimum amount of space required to install each OS:
Raspbian: 4GB
Raspbian is going to struggle with 4GB when the latest update to Wolfram is 500MB. It really needs a minimum of 8GB for the full (not lite) version. When it runs out of SDCard space bad and unexpected things happen that aren't always noted as a problem with lack of space. We get too many threads on here that are solved by a simple cleanup of junk files.

To run that collection of Raspbian, LibreElec and Retropie is going to need a 16GB SDCard.

Re: NOOBS partitioning with multiple OSes

Posted: Mon Mar 27, 2017 4:21 pm
by procount
Yes I agree. It is the barest minimum to install. 16GB would definitely be better. I should have emphasised that more.

Re: NOOBS partitioning with multiple OSes

Posted: Tue Mar 28, 2017 4:29 pm
by HunPi
Hi guys,

still having problems accessing the OS list in NOOBS lite.
procount wrote:If you have a keyboard attached, press ctrl-alt-f2 to get a console window. Enter root/raspbian to login.
Took me some time to find out it's root/raspberry and not "root/raspian". Besides that it took me hours to realize I don't use the german keyboard layout when in the recovery console. That's why I always entered "raspberrz" as password, which understandibly didn't work.

Once I neatly avoided this pitfall, I was able to enter the proposed commands:

Code: Select all

ifconfig eth0 192.168.1.10
route add default gw 192.168.1.1
Unfortunately when returning to the GUI with Ctrl-Alt-F1 nothing happend. Well, I got an error message saying "Error downloading distribution list from internet" but I'm not sure if this had appeared anyway (timed out?) during my session in the recovery console.

Any idea what to do next? Have I missed something? How do I refresh the GUI once I set a static IP address? I get the impression the GUI doesn't realize the Pi got a static IP.

Re: NOOBS partitioning with multiple OSes

Posted: Tue Mar 28, 2017 4:42 pm
by procount
Ah, Sorry for the typo. I have corrected my post now.
Hmm. I was hoping that procedure would work, but it looks like it is timing out on you before it can download the files.
In that case it just won't work with NOOBS.
However, I made a patch some time ago for PINN to allow you to specify a static IP.
I'll see if I can resurrect it for you....