-
Notifications
You must be signed in to change notification settings - Fork 434
Update README.md #384
base: master
Are you sure you want to change the base?
Update README.md #384
Conversation
9. Replace the `.tar.xz` root and boot filesystem tarballs with copies created from your custom OS version (these instructions assume you're only using a single OS at a time with NOOBS - they won't work if you're running multiple OSes from a single SD card). The name of these tarballs needs to match the labels given in `partitions.json`. | ||
1. To create the root tarball you will need to run `tar -cvpf <label>.tar /* --exclude=proc/* --exclude=sys/* --exclude=dev/pts/*` from within the root filesystem of your custom OS version. You should then compress the resulting tarball with `xz -9 -e <label>.tar`. | ||
2. To create the boot tarball you will need to run `tar -cvpf <label>.tar .` at the root directory of the boot partition of your custom OS version. You should then compress the resulting tarball with `xz -9 -e <label>.tar`. | ||
1. "partition_size_nominal" - replace the numerical value with the size of the paritions (round up) you want in your custom OS version. (Also note the size is in MB). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual size should be in MiB (1024x1024 bytes)
1. To create the root tarball you will need to run `tar -cvpf <label>.tar /* --exclude=proc/* --exclude=sys/* --exclude=dev/pts/*` from within the root filesystem of your custom OS version. You should then compress the resulting tarball with `xz -9 -e <label>.tar`. | ||
2. To create the boot tarball you will need to run `tar -cvpf <label>.tar .` at the root directory of the boot partition of your custom OS version. You should then compress the resulting tarball with `xz -9 -e <label>.tar`. | ||
1. "partition_size_nominal" - replace the numerical value with the size of the paritions (round up) you want in your custom OS version. (Also note the size is in MB). | ||
2. "uncompressed_tarball_size" - replace the numerical value with the size of your filesystem tarballs (round up) when uncompressed (this can be obtained by running the command ll within the directory where the tarball is located). Also note the size is in MB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual size should be in MiB (1024x1024 bytes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@procount are you sure about that?
I wise man (@lurch) once told me this:
- partitions.json needs to have "correct" partition sizes (the base-10
version rather than the base-2 version, because that's what parted
uses) for each partition
- the "uncompressed_tarball_size" should be the size in MB, rounded
up to the next whole MB (i.e. the uncompressed root.tar file has a
size of 2,336,133,120 bytes and so should have
"uncompressed_tarball_size": 2337). This is simply used for the
install-progress-bar.- the "partition_size_nominal" is the minimal size that the
partition will be created at. For Raspbian's root partition, this
experimentally needs to be approximately 400MB larger than the
"uncompressed_tarball_size" as this then leaves (at least) enough
space for the 100MB swapfile that gets created during the first
bootup, and to allow the user to run both apt-get upgrade and
rpi-update before running out of diskspace.
A wise man indeed! But maybe that information is now out of date? No, I'm not sure, but I am fairly certain. I invite you to verify my findings. There are many calculation instances in multiimagewritethread.cpp, but here are a few pertinent ones I pulled out for you: https://github.com/raspberrypi/noobs/blob/master/recovery/multiimagewritethread.cpp#L45 https://github.com/raspberrypi/noobs/blob/master/recovery/multiimagewritethread.cpp#L140 https://github.com/raspberrypi/noobs/blob/master/recovery/multiimagewritethread.cpp#L400 AFAICT, all calculations of partition sizes use multiples of 1024. There are only 3 mentions of 1000, and each is to do with converting milliseconds to seconds. However, I think there might be something slightly wrong with the progress bar calculation, because I often notice that the progress bar reaches 100% quite a while before it has finished writing the partitions. I've not had time to look into it yet as I consider it fairly minor. |
Ah, thanks. Looks like I'll need to take a closer look at some point. Sounds like I may have been doing it wrong for quite a while then. I assumed the reason it waits after 100% is that it's flushing the cached data. By default linux will flush every X seconds or when it reaches a certain percentage of RAM. I don't remember off the top of my head exactly, but it's something like 30 seconds or 20% or RAM. So although linux may claim the data has been written, it won't actually be until fsync completes. |
You're probably right. |
|
Combined and merged information from this examples site:
https://github.com/raspberrypi/noobs/wiki/Adding-custom-OS-version-examples
With the original noobs site:
https://github.com/raspberrypi/noobs#how-to-create-a-custom-os-version
This produces a single source that was tested on a Raspberry Pi3 yesterday 2/7/2017. Using Custom OS instructions from the two sites was able to port and build the current 16.04LTS UbuntuMate for install with noobs. Noobs load contains the Raspbian that comes with the latest noobs, Kano OS, OSMC, and UbuntuMate 16.04 all on a single 32GB SD card. Raspbian, UbuntuMate, and Kano OS all are set to 8GB OS partitions. Read and Review.