geekybodhi
Posts: 1
Joined: Thu Dec 26, 2013 12:18 pm

Some notes on creating a custom distro with NOOBS

Thu Dec 26, 2013 7:24 pm

Hi,

I just created a custom Raspbian image following the procedure in the readme, and thought I’d share some notes. Since the procedure in the readme isn’t newbie proof, feel free to use any of this information to update the readme.

I started off by deleting all the distros from under the ‘os’ dir, except the Raspbian distro. There’s no point renaming the distro or changing the graphics at this point. Now boot the distro and install Raspbian as usual. Make the required changes, customize the wallpaper, configure the Wireless (if you are using a compatible adapter), install and remove apps.

When you are done, fire up a terminal and create the root and boot file systems as mentioned in the readme, with slight tweaks:

For the root filesystem:
$ cd /
$ tar -cvpf root.tar /* --exclude=proc/* --exclude=sys/* --exclude=dev/pts/*

For the boot filesystem:
$ cd /boot
$ tar -cvpf boot.tar

Instead of using the <label> to create the two tarballs as mentioned in the readme which would have created two file with identical names, I’m sticking with ‘boot’ and ‘root’.

Now the Pi doesn’t have the juice to compress these images. So you’ll have to move them out. You can do so by inserting a USB pen drive and copying the two tar files on to the USB drive. Assuming the drive is mounted at /media/usb:

$ cp /root.tar /media/usb
$ cp /boot/boot.tar /media/usb

Now shutdown the Pi, remove the SDCard and the USB drive and head to a normal Linux machine. Insert the drive and compress the tarballs just as mentioned in the readme:

$ xz -9 -e boot.tar
$ xz -9 -e root.tar

This will replace the files with their compressed versions, namely boot.tar.xz and root.tar.xz

Now format the SDcard and extract a fresh copy of NOOBS. Then remove all files under this directory except the distro you want to customise, for example Raspbian. Now follow Steps 4, 5, 6, 7 to customise the distro’s name, icon and slides.

If you are using Raspbian, also make sure to zap the flavour.json file, which I’m guessing overrides the os.json file.

You can safely skip step 8, unless you want to change the name of the compressed boot and root files we’ve just created.

Then follow step 9 and replace the existing boot.tar.xz and root.tar.xz with the versions in the USB drive that we’ve just created.

That’s it! Now boot the Pi with this card. The NOOBS menu will list your custom OS. After you’ve installed it, the distro will have all your customizations.

What a beautiful system! Kudos to everyone involved.

Cheers!

Mayank
geekybodhi.net

Return to “Advanced users”