[How To] Set the partition sizes in NOOBS Lite

Here is a new method to allow you to set extra partition sizes when using standard NOOBS Lite.
This is great when you have multiple OS's and want one OS to have much larger space than others.


How to

Step 1

We will be switching the URL that NOOBS uses to a new proxy URL that will generate the new partition files from our supplied sizes.

The base URL is:
http://files.matthuisman.nz/noobs.php?url=http://downloads.raspberrypi.org/os_list_v3.json

It's pretty long - and it's about to get a bit longer...
We now need to find the os_name of the system we want to modify.

Open the THIS FILE and you will be able to see the os_name for each available system.


Find the names for all the systems you want to set the partition sizes for.

For this example, I want to install LibreELEC + Recalbox + Lakka.
Normally they would split the free space between them.

For my 16GB Card, I want Recalbox to have 8GB and Lakka have 4GB and LibreELEC the rest.

So LibreELEC will be kept to expand and I want Recalbox to be 8000MB (8GB) & Lakka to be 4000MB (4GB).

All we need to do is append &{os_name}={size in MB} to the above URL for each system size we want to change.

Therefore my final URL is:
http://files.matthuisman.nz/noobs.php?url=http://downloads.raspberrypi.org/os_list_v3.json&recalboxOS-rpi3=8000&Lakka_RPi2=4000

If you open that URL, you will see it has modified the Recalbox & Lakka systems.


And let's see what that new linked partitions.json file looks like.


Great!
It will no longer try to maximise but instead set it's size to our supplied 4000MB.

Once you have your correct URL move onto the next step.

Step 2

Copy NOOBS Lite to your SD Card as normal.

Step 3

We now need to edit recovery.cmdline on the root of the SD card.


Simply open it with your favourite text editor.

It will look like this


Now add repo={URL} to the end of this line (where {URL} is the URL from step 1) 
It should now look like this


Make sure all the text is on the first line.

Save the file, eject the SD card and put it in your Pi and boot.

Select your OS's and install.
They will use your specified sizes.

Enjoy!

Note:
The proxy script (view source) will only change partitions that have want_maximised set to true.
It will change this to false and then set the nominal size to your specified size.
You can not use it to change the size of other partitions.

The script will also only extend partitions (not shrink them).
For a system that already wants nominal space, this will get expanded with the value you provide.
eg. Raspbian wants 3956. You set it to 1000 & it will expand to 4956 giving you 1000 free space.

Comments

  1. Thanks for sharing. Btw I think you missed a link for your script source here in your blog, I did catch it from your git post though :)

    ReplyDelete
    Replies
    1. Thanks for spotting that :)
      I have now linked to the source from the note at the bottom of the post.

      Delete
  2. Hi, Matt! First of all, thanks for your great job!
    I have an 8GB microSD created with your image (with LibreELEC+recalbox) in my RPi3, but I prefer a bigger "storage" partition in LibreELEC as I've moved all the ROMs for recalbox to an USB drive. I've found the two partitions.json in its folder, but I'm not sure which size I must write in "partition_size_nominal" instead of 1100. I'll be waiting for your response. Thanks in advance for your attention! Best regards!

    ReplyDelete
    Replies
    1. Open the partitions.json file in the OS/Recalbox directory. Change the nominal_size on the SHARE partition to 100. Then change want_maximized to false.

      Then open the partitions.json file in os OS/LibreELEC directory. Make sure want_maximized is true.

      Now, you need to boot NOOBS and re-install both OS's.

      There is no easy way to adjust the sizes without completely re-installing them.

      Delete
    2. As you will need to re-install anyway - you may as well start with my new method :)
      Then use the above method to do the sizing.

      The URL you would use is:

      http://files.matthuisman.nz/noobs.php?url=http://downloads.raspberrypi.org/os_list_v3.json&recalboxOS-rpi3=100

      This saves more space on the card as you don't have the 2x full systems sitting in the FAT partition. They are instead downloaded and installed.

      Delete
    3. Thanks for your fast response! I did it as you explained and it worked like a charm, but now I've found another issue...
      As the "share" partition is too small, I've had to set it to 500, because the update progress od Recalbox to 4.0.2 couldn't be achieved with only 100MB. Apparently after changing nominal_size to 500 the update progress did well. I've launched several free ROMs included and they work fine, but if I try to enter in "SYSTEM SETTINGS" in EmulationStation, the system goes to the black screen with the logo of Recalbox and the 4.0.2 on the lower left. There's no way to exit from there except rebooting the system...
      I'm not sure if the problem is with the size of the partitions or with another configuration...
      Later, I realized that in the URL you provided me I haven't changed the end from 100 to 500, but I'm not sure if this could be causing the problem I've described.

      Thanks in advance for your help!

      Delete
    4. Not sure sorry. But yes, I would recommend using a value of at least 500 for Recalbox.
      They don't set a nominal size of the share partition - so whatever value you put will be it's total size.
      It might even need more space than that. Maybe try 1000. See if you have same issue.
      Remember, if you don't set a value on an OS, it will just get the remainder of the free space.

      Delete
    5. I've tried using 1000 and even 2000 with the same result... Finally, I've done the installation with NOOBS Lite Extra following your instructions of the other post (http://www.matthuisman.nz/2017/03/set-partition-sizes-in-noobs-lite-extra.html) giving 2000 to recalbox and it worked perfectly. After the installation I've added your repository and the NOOBS Companion Add-on and now everything is working fine, fitting perfectly my needs.
      Thank you again for your help and congratulations!

      Delete

Post a Comment