How to setup Noobs
Part 1 - Posted in 2 parts because of forum limits
This has been asked for before and I wanted this for my own recent Picade/Mobro project. Its possible to setup a multiboot system with noobs and this is the how I managed it. I can't take all the credit. The specific bits for Mobro is all me… The rest is from the retropie/noobs how to found here (https://retropie.org.uk/docs/Convert-RetroPie-SD-Card-Image-to-NOOBS-Image/). Let us being.
First you need:
- Linux system… Can be doing using a Pi if you have enough storage
- 1 SD Card (32GB or larger really)
- SD Card Reader
- Noobs Image (https://downloads.raspberrypi.org/NOOBS_latest)
- Mobro Image (https://www.mod-bros.com/mobro-image/download)
- Raspberry Pi Imager (helpful)
To start with you need to burn the Mobro to the SD card. Now the bit you need the Linux system for. You need to mount all three paritions:
mkdir -p /tmp/mobro/mobro /tmp/mobro/stoage /tmp/mobro/boot
mount /dev/<your sd card drive>1 /tmp/mobro/boot
mount /dev/<your sd card drive>2 /tmp/mobro/mobro
mount /dev/<your sd card drive>3 /tmp/mobro/stoarge
Now you need to create tar images of each of these drives. While the mobro drive is being tared up you'll may want to grab a drink.
cd /tmp/mobro/boot
sudo tar -cvpf ~/Desktop/boot.tar ./*
xz -9 -e -v boot.tar
cd /tmp/mobro/mobro
sudo tar -cvpf ~/Desktop/mobro.tar ./*
xz -9 -e -v mobro.tar
cd /tmp/mobro/storage
sudo tar -cvpf ~/Desktop/storage.tar ./*
xz -9 -e -v storage.tar
Now you need to unzip your noobs image go in to its os directory and create a new directory called Mobro_armf. You now need to copy the xz files from you desktop in to this directory.
Part 2
Now you need to add the following files to the directory as is. These are bits which tell Noobs how to setup your Mobro parition.
os.json
{
"description": "MoBro system monitor display by ModBros",
"feature_level": 35120124,
"kernel": "5.10",
"name": "Modbros (32-bit)",
"password": "modbros",
"release_date": "2021-10-30",
"supported_hex_revisions": "2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,1040,1041,0092,0093,2082",
"supported_models": [
"Pi Model",
"Pi 2",
"Pi Zero",
"Pi 3",
"Pi Compute Module 3",
"Pi 4"
],
"url": "https://www.mod-bros.com/en/projects/mobro/",
"username": "modbros",
"version": "bullseye"
}
paritions.json
{
"partitions": [
{
"filesystem_type": "FAT",
"label": "boot",
"mkfs_options": "-F 32",
"partition_size_nominal": 256,
"uncompressed_tarball_size": 80,
"want_maximised": false,
"sha256sum": "e44f54ef2a41e7ed98e3cc7187e62c5237c5d1bb299138532ab6b171967b2e46"
},
{
"filesystem_type": "ext4",
"label": "mobro",
"mkfs_options": "-O ^huge_file",
"partition_size_nominal": 3993,
"uncompressed_tarball_size": 2993,
"want_maximised": true,
"sha256sum": "c45dc54a9896dd162f749ebd5f9fbb1ee75c45b9d0799ba137ceeb68d102d39d"
},
{
"filesystem_type": "FAT",
"label": "storage",
"mkfs_options": "-F 32",
"partition_size_nominal": 1024,
"uncompressed_tarball_size": 1,
"want_maximised": false,
"sha256sum": "d3816c264af3f9f78b1db8cfdec214f2e85b4c6f6c7d0068212caee120ad2a03"
}
]
}
parition_setup.sh
#!/bin/sh
#supports_backup in PINN
set -ex
# shellcheck disable=SC2154
if [ -z "$part1" ] || [ -z "$part2" ] || [ -z "$part3" ]; then
printf "Error: missing environment variable part1, part2 or part3\n" 1>&2
exit 1
fi
mkdir -p /tmp/1 /tmp/2 /tmp/3
mount "$part1" /tmp/1
mount "$part2" /tmp/2
mount "$part3" /tmp/3
sed /tmp/1/cmdline.txt -i -e "s|root=[^ ]*|root=${part2}|"
sed /tmp/2/etc/fstab -i -e "s|^[^#].* / |${part2} / |"
sed /tmp/2/etc/fstab -i -e "s|^[^#].* /boot |${part1} /boot |"
sed /tmp/2/etc/fstab -i -e "s|^[^#].* /mobro |${part3} /mobro |"
sed /tmp/2/etc/.fstab -i -e "s|^[^#].* / |${part2} / |"
sed /tmp/2/etc/.fstab -i -e "s|^[^#].* /boot |${part1} /boot |"
sed /tmp/2/home/modbros/mobro-raspberrypi/config/fstab -i -e "s|^[^#].* / |${part2} / |"
sed /tmp/2/home/modbros/mobro-raspberrypi/config/fstab -i -e "s|^[^#].* /boot |${part1} /boot |"
sed /tmp/2/home/modbros/mobro-raspberrypi/config/fstab -i -e "s|^[^#].* /mobro |${part3} /mobro |"
sed /tmp/2/home/modbros/mobro-raspberrypi/config/cmdline.txt -i -e "s|root=[^ ]*|root=${part2}|"
sed /tmp/2/home/modbros/display-drivers/Waveshare/cmdline.txt -i -e "s|root=[^ ]*|root=${part2}|"
sed /tmp/2/home/modbros/display-drivers/GoodTFT/usr/cmdline.txt -i -e "s|root=[^ ]*|root=${part2}|"
sed /tmp/2/home/modbros/display-drivers/GoodTFT/usr/cmdline.txt-original -i -e "s|root=[^ ]*|root=${part2}|"
umount /tmp/1
umount /tmp/2
umount /tmp/3
Finally find a suitable icon file in png format 40px x 40px and call it mobro_armf.png
Now you just need to reformat your SD Card using the erase option in the Raspberry Pi Imager application and then copy everything in your noobs directroy to the SD Card. Stick the card in your drive and if everything has gone according to plan you should see noobs with an option to install Mobro. Select the option to install along with which other OS's you may want (In my case Retropie) and let it run. It should boot in to Mobro when you let it and just run through the normal setup process.
This is only a brief explaination of how to do it but hopefully it should fill in some of the blanks and its pretty straight forward. If you run in to difficulty look at the retropie guide to fill in the blanks. I'll try to upload a video at somepoint, open a github PR for the files for Noobs along with this walk through. I can say this works for me but your milage maybe different.
I shall try to get round to raising a PR on Github so people can just get to the files in the coming days and video as proof of success.
Hi, any news? Is this possible for PINN also?